{"id":13534593,"url":"https://github.com/npm/npm-install-checks","last_synced_at":"2025-05-15T23:05:08.626Z","repository":{"id":13139273,"uuid":"15821540","full_name":"npm/npm-install-checks","owner":"npm","description":"contains checks that npm runs during the installation","archived":false,"fork":false,"pushed_at":"2025-04-09T14:29:26.000Z","size":258,"stargazers_count":27,"open_issues_count":0,"forks_count":15,"subscribers_count":22,"default_branch":"main","last_synced_at":"2025-05-14T00:17:42.514Z","etag":null,"topics":["npm-cli"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/npm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-01-11T11:39:16.000Z","updated_at":"2025-05-06T13:28:39.000Z","dependencies_parsed_at":"2024-04-20T22:55:38.490Z","dependency_job_id":"db416132-8c85-48b8-a37a-92728f2e8f3d","html_url":"https://github.com/npm/npm-install-checks","commit_stats":{"total_commits":130,"total_committers":19,"mean_commits":6.842105263157895,"dds":0.7615384615384615,"last_synced_commit":"e8631b46fd02d216f89ecf8263b9179408b15de2"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npm%2Fnpm-install-checks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npm%2Fnpm-install-checks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npm%2Fnpm-install-checks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npm%2Fnpm-install-checks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/npm","download_url":"https://codeload.github.com/npm/npm-install-checks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254059395,"owners_count":22007757,"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":["npm-cli"],"created_at":"2024-08-01T08:00:30.597Z","updated_at":"2025-05-15T23:05:08.398Z","avatar_url":"https://github.com/npm.png","language":"JavaScript","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# npm-install-checks\n\nCheck the engines and platform fields in package.json\n\n## API\n\nBoth functions will throw an error if the check fails, or return\n`undefined` if everything is ok.\n\nErrors have a `required` and `current` fields.\n\n### .checkEngine(pkg, npmVer, nodeVer, force = false)\n\nCheck if a package's `engines.node` and `engines.npm` match the running system.\n\n`force` argument will override the node version check, but not the npm\nversion check, as this typically would indicate that the current version of\nnpm is unable to install the package properly for some reason.\n\nError code: 'EBADENGINE'\n\n### .checkPlatform(pkg, force, environment)\n\nCheck if a package's `os`, `cpu` and `libc` match the running system.\n\n`force` argument skips all checks.\n\n`environment` overrides the execution environment which comes from `process.platform` `process.arch` and current `libc` environment by default. `environment.os` `environment.cpu` and `environment.libc` are available.\n\nError code: 'EBADPLATFORM'\n\n\n### .checkDevEngines(wanted, current, opts)\n\nCheck if a package's `devEngines` property matches the current system environment.\n\nReturns an array of `Error` objects, some of which may be warnings, this can be checked with `.isError` and `.isWarn`. Errors correspond to an error for a given \"engine\" failure, reasons for each engine \"dependency\" failure can be found within `.errors`.   ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpm%2Fnpm-install-checks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnpm%2Fnpm-install-checks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpm%2Fnpm-install-checks/lists"}