{"id":16515616,"url":"https://github.com/insin/package-config-checker","last_synced_at":"2025-06-14T15:03:08.453Z","repository":{"id":57317644,"uuid":"58021727","full_name":"insin/package-config-checker","owner":"insin","description":"Checks if your dependencies have package.json files config or an .npmignore for packaging","archived":false,"fork":false,"pushed_at":"2017-02-03T00:12:43.000Z","size":18,"stargazers_count":47,"open_issues_count":7,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-31T14:40:41.815Z","etag":null,"topics":["dependencies","nodejs","package-json","tool"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/insin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-04T04:03:31.000Z","updated_at":"2024-01-09T10:26:09.000Z","dependencies_parsed_at":"2022-08-25T20:40:29.259Z","dependency_job_id":null,"html_url":"https://github.com/insin/package-config-checker","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insin%2Fpackage-config-checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insin%2Fpackage-config-checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insin%2Fpackage-config-checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insin%2Fpackage-config-checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/insin","download_url":"https://codeload.github.com/insin/package-config-checker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insin%2Fpackage-config-checker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259193333,"owners_count":22819558,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dependencies","nodejs","package-json","tool"],"created_at":"2024-10-11T16:17:38.700Z","updated_at":"2025-06-14T15:03:08.399Z","avatar_url":"https://github.com/insin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Package Config Checker\n\n[![npm package][npm-badge]][npm]\n\nTells you things about your dependencies and transitive dependencies.\n\n## Usage\n\n```\nnpm install -g package-config-checker\n```\n```\nUsage: package-config-checker \u003cshow\u003e [options]\n\nOptions:\n  -h, --help     display this help message\n  -d, --depth    max depth for checking dependency tree (default: ∞)\n\nShow:\n  -f, --files    show presence of files config or .npmignore\n  -r, --recent   show recently updated dependencies\n```\n\n## Show Flags\n\nYou must specify at least one thing to show.\n\n### `-f, --files`\n\nChecks if your npm dependencies (and transitive dependencies) have [`files` config in `package.json`](https://docs.npmjs.com/files/package.json#files) or have an [`.npmignore` file](https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package) to avoid including unnecessary files when your module is being packaged for publishing to the npm registry.\n\nSince [npm automatically whitelists certain essential files and blacklists common files which should not be included in module packages](https://docs.npmjs.com/files/package.json#files) (such as source control directories, `npm-debug.log` and `.DS_Store`), submitting a Pull Request to one of your dependencies to add a `files` whitelist to its `package.json` is a quick and easy way to reduce the size of your - and everybody else's - `npm install`.\n\n### `-r, --recent`\n\nShows the 10 most recently published dependencies - use this if you have a hunch you just got broken by a transitive dependency.\n\n## Example\n\nChecking `package-config-checker`'s own direct dependencies as an example:\n\n```\n$ package-config-checker -f -d 0\n```\n![](example-output.png)\n\n`minimist@1.2.0` has been flagged as not having any configuration to control publishing.\n\nLet's look at what was included in its npm packge:\n\n```\n$ ls -a node_modules/minimist/\n./   .travis.yml  index.js  package.json     test/\n../  example/     LICENSE   readme.markdown\n\n```\n\nIt includes `example/` and `test/` directories, and a Travis CI config file, which most likely aren't required to use minimist. These take up an additional 18.2 KB of space, which isn't really a big deal in absolute terms.\n\nLet's package the module up again and rename the resulting file so we can compare later.\n\n```\n$ cd node_modules/minimist/\n$ npm pack\nminimist-1.2.0.tgz\n$ mv minimist-1.2.0.tgz minimist-1.2.0-pre.tgz\n```\n\nNow let's add suitable `files` config to `package.json`:\n\n```json\n  \"files\": [\n    \"index.js\"\n  ],\n```\n\nIf we repackage the module, npm will now use the `files` config.\n\nListing the contents of the new package shows an example of the default files npm whitelists in addition to the module-specific whitelist we provided:\n\n```\n$ npm pack\nminimist-1.2.0.tgz\n$ tar -tf minimist-1.2.0.tgz\npackage/package.json\npackage/LICENSE\npackage/index.js\npackage/readme.markdown\n```\n\nNow we can compare the before and after size of the package which would be published to npm:\n\n```\n$ ls *.tgz -l | awk '{print $9,$5}'\nminimist-1.2.0.tgz 4300\nminimist-1.2.0-pre.tgz 7984\n```\n\nThat's approximately 3.6 KB less to download.\n\nThe bandwith and `node_modules/` savings in this example are fairly insignificant per install, but at the time of writing minimist has been downloaded from npm *27,095,636* times in the last month.\n\nThe reduced package size would have resulted in a *93GB* bandwith saving for the npm registry for that number of downloads.\n\nNow that we've done the research, the final step is to [create a Pull Request](https://github.com/substack/minimist/pull/88) with the packaging config changes.\n\nYou can do this by editing `package.json` directly from the GitHub UI, which will fork the project for you in the background and let you create a Pull Request at the same time.\n\n## MIT Licensed\n\n[npm-badge]: https://img.shields.io/npm/v/package-config-checker.png\n[npm]: https://www.npmjs.org/package/package-config-checker\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsin%2Fpackage-config-checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finsin%2Fpackage-config-checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsin%2Fpackage-config-checker/lists"}