{"id":19006891,"url":"https://github.com/yowainwright/intrinsic-dependencies","last_synced_at":"2025-04-22T19:24:25.932Z","repository":{"id":225762258,"uuid":"766423492","full_name":"yowainwright/intrinsic-dependencies","owner":"yowainwright","description":"a simple utility ensuring invisible but required node dependencies aren't removed","archived":false,"fork":false,"pushed_at":"2025-04-10T04:16:56.000Z","size":170,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-17T11:59:15.257Z","etag":null,"topics":["ci","dependencies","performance","security"],"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/yowainwright.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-03T08:14:29.000Z","updated_at":"2025-04-10T04:16:59.000Z","dependencies_parsed_at":"2024-03-04T07:20:20.748Z","dependency_job_id":"9f9818f2-81ef-4a3d-a1a8-ff0f37e64335","html_url":"https://github.com/yowainwright/intrinsic-dependencies","commit_stats":{"total_commits":19,"total_committers":2,"mean_commits":9.5,"dds":0.3157894736842105,"last_synced_commit":"2cca33cd99b0398aeee731928b795dfba94a24b3"},"previous_names":["yowainwright/intrinsic-dependencies"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yowainwright%2Fintrinsic-dependencies","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yowainwright%2Fintrinsic-dependencies/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yowainwright%2Fintrinsic-dependencies/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yowainwright%2Fintrinsic-dependencies/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yowainwright","download_url":"https://codeload.github.com/yowainwright/intrinsic-dependencies/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250307081,"owners_count":21409030,"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":["ci","dependencies","performance","security"],"created_at":"2024-11-08T18:34:58.531Z","updated_at":"2025-04-22T19:24:25.909Z","avatar_url":"https://github.com/yowainwright.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Intrinsic Dependencies\n\n[![npm version](https://badge.fury.io/js/intrinsic-dependencies.svg)](https://badge.fury.io/js/intrinsic-dependencies)\n![ci](https://github.com/yowainwright/intrinsic-dependencies/actions/workflows/ci.yml/badge.svg)\n[![Github](https://badgen.net/badge/icon/github?icon=github\u0026label\u0026color=grey)](https://github.com/yowainwright/intrinsic-dependencies)\n\n#### A utility for ensuring invisible _but required_ dependencies aren\\'t removed.\n\n---\n\n#### Scenario\n\nYou may be reviewing dependencies for security or performance reasons and see a dependency which appears to be unneeded. You remove the dependency and suddenly your project is broken. This problem can be fatal—for example, if the dependency is required for something specific to production.\n\nThe solution is just a few functions. However, it can be difficult to remember to add these functions to your project. And, this issue usually doesn't come up unless you have a big work project.\n\nThat's where **Intrinsic Dependencies** comes in. Just add the cli to your npm scripts and you're good to go! Intrinsic Dependencies fails or passes with a log of dependencies that are required. That's it.\n\n---\n\n#### Solution Overview\n\nAdd your \"intrinsic dependencies\" in a object to your `package.json` with notes like so:\n\n```json\n{\n  \"intrinsicDependencies\": {\n    \"dockerode\": \"Referenced during production deployment. Production will fail if removed!\",\n  }\n}\n```\n\nAnd then add a command to your node scripts to run in your ci (or where ever):\n\n```json\n\"scripts\": {\n  \"prod-check\": \"intrinsic-dep-check\"\n}\n```\n\nNow, `intrinsic-dep-check` will fail (fail your ci) if a required intrinsic dependency is removed.\n\n---\n\n## Installation\n\n```sh\nnpm install intrinsic-dependencies -save-dev\n```\n\nThis should never be a dependency! Just use it as a dev dependency. Or better yet, with npx.\n\n## Usage\n\nAs a cli (recommended)\n\n```sh\nintrinsic-dep-check\n```\n\nAs a node function\n\n```js\nimport { checkIntrinsicDependencies } from 'intrinsic-dependencies';\n\ncheckIntrinsicDependencies();\n```\n\nSee below for more usage details.\n\n---\n\n### Cli\n\nIntrinsic Dependencies can be invoked via a few cli names; clearest is `intrinsic-dep-check`. See the `package.json` bin object for reference.\n\nThe cli also accepts 2 options (not required), `--filePath` and `--configPath`. These options can be used to specify a custom path for the `package.json` or an optional json formated `config` file.\n\n```sh\nintrinsic-dep-check --filePath /path/to/package.json --configPath /path/to/config.json\n```\n---\n\n### Node\n\nYou can use Intrinsic Dependencies as a node function as well.\n\n```js\nimport { checkIntrinsicDependencies } from 'intrinsic-dependencies';\n\ncheckIntrinsicDependencies();\n```\n\nThis function also accepts 2 options (not required), `filePath` and `configPath`. These options can be used to specify a custom path for the `package.json` or an optional json formated `config` file.\n\n```js\nimport { checkIntrinsicDependencies } from 'intrinsic-dependencies';\n\ncheckIntrinsicDependencies({ filePath: '/path/to/package.json', configPath: '/path/to/config.json' });\n```\n\n---\n\n## Details\n\nThis project was intentionally made with \"just node\"; no Typescript.\nThis keeps the project pure, small, and as close to \"just node\" as possible.\n\nFor development, esbuild, prettier and eslint are used because no similar functionality is provided by \"just node\".\n\n---\n\nMade by [@yowainwright](https://github.com/yowainwright) for fun with passion! MIT, 2024.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyowainwright%2Fintrinsic-dependencies","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyowainwright%2Fintrinsic-dependencies","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyowainwright%2Fintrinsic-dependencies/lists"}