# @mapbox/check-file-dependencies

> Takes a file path and checks to see if the modules it requires match the package.json

Latest version **6.0.5** (published 2026-06-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install @mapbox/check-file-dependencies
pnpm add @mapbox/check-file-dependencies
yarn add @mapbox/check-file-dependencies
bun add @mapbox/check-file-dependencies
```

Provides the command `check-file-dependencies`.

## Health

**Score 60/100 (C)** — status: active.

Positive: no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support; large bundle.

## Facts

| | |
|---|---|
| Version | 6.0.5 |
| Published | 2026-06-24 |
| First published | 2017-01-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=24.18.0 |
| Dependencies | 8 |
| Unpacked size | 14.2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 0 |
| Author | Mapbox |
| Maintainers | mapbox-npm-01, mapbox-npm-02, mapbox-npm-07, mapbox-npm-03, mapbox-npm-04, mapbox-npm-09, mapbox-npm-05, mapbox-npm-06, mapbox-npm-08, mapbox-npm-advanced-actions, mapbox-npm-ci, mapbox-npm, mapbox-admin, mapbox-machine-user, mbx-npm-ci-staging, mbx-npm-ci-production, mbx-npm-01-production, mbx-npm-02-production, mbx-npm-03-production, mbx-npm-04-production, mbx-npm-05-production, mbx-npm-06-production, mbx-npm-07-production, mbx-npm-08-production, mbx-npm-09-production, mbx-npm-02-staging, mbx-npm-advanced-actions-staging, mbx-npm-advanced-actions-production |
| Keywords | dependencies, check, confirm, valid |

## Links

- npm: https://www.npmjs.com/package/@mapbox/check-file-dependencies
- Repository: https://github.com/mapbox/check-file-dependencies
- Homepage: https://github.com/mapbox/check-file-dependencies#readme
- Issues: https://github.com/mapbox/check-file-dependencies/issues
- npm.io page: https://npm.io/package/@mapbox/check-file-dependencies

## Dependencies (8)

- [got](https://npm.io/package/got.md) ^11.8.6
- [tar](https://npm.io/package/tar.md) ^7.5.16
- [acorn](https://npm.io/package/acorn.md) ^8.17.0
- [semver](https://npm.io/package/semver.md) ^7.8.5
- [parents](https://npm.io/package/parents.md) 1.0.1
- [resolve](https://npm.io/package/resolve.md) 1.22.12
- [escodegen](https://npm.io/package/escodegen.md) ^2.1.0
- [acorn-walk](https://npm.io/package/acorn-walk.md) ^8.3.5

## Alternatives

- [@regle/core](https://npm.io/package/@regle/core.md) — 47.0K weekly downloads
- [typeof-arguments](https://npm.io/package/typeof-arguments.md) — 12.5K weekly downloads
- [@lokalise/projects-engine-contracts](https://npm.io/package/@lokalise/projects-engine-contracts.md) — 978 weekly downloads
- [@osjwnpm/nam-laboriosam-quibusdam](https://npm.io/package/@osjwnpm/nam-laboriosam-quibusdam.md) — 70 weekly downloads
- [@oridune/validator](https://npm.io/package/@oridune/validator.md) — 16 weekly downloads

## Recent versions

- 6.0.5 (latest) — 2026-06-24
- 4.0.0-alpha.0 (dev) — 2022-10-21
- 6.0.4 — 2026-06-22
- 6.0.3 — 2026-03-30
- 6.0.2 — 2026-03-12
- 6.0.1 — 2025-06-20
- 6.0.0 — 2025-06-20
- 5.0.0 — 2023-09-14
- 4.0.0 — 2022-12-01
- 3.2.1 — 2019-06-04
- 3.2.0 — 2019-04-01
- 3.1.0 — 2018-04-24
- 3.0.2 — 2017-02-27
- 3.0.1 — 2017-02-20
- 3.0.0 — 2017-02-02
- … 4 more at https://npm.io/package/@mapbox/check-file-dependencies/versions

## README

# Check File Dependencies

Takes a file path and checks to see if the modules it requires match the package.json

## Usage

```js
var checkFileDependencies = require('@mapbox/check-file-dependencies');

checkFileDependencies(path.join(__dirname, 'path', 'to', 'file.js'), function(err) {
  if (err) console.log(err.message);
  if (err) process.exit(1);
})
```

Or as a CLI

```
check-file-dependencies ./path/to/file.js
```

## Contributing

- Open a PR
  - Include changes in Changelog.md
- Merge PR
- Locally switch to master
  - `npm version [major, minor, patch]`
  - `git push origin master --tags`
  - `npm publish`

---
_Source: https://npm.io/package/@mapbox/check-file-dependencies · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
