npm-install-checks
Advanced tools
Comparing version 6.1.1 to 6.2.0
@@ -25,3 +25,3 @@ const semver = require('semver') | ||
const checkPlatform = (target, force = false) => { | ||
const checkPlatform = (target, force = false, environment = {}) => { | ||
if (force) { | ||
@@ -31,4 +31,4 @@ return | ||
const platform = process.platform | ||
const arch = process.arch | ||
const platform = environment.os || process.platform | ||
const arch = environment.cpu || process.arch | ||
const osOk = target.os ? checkList(platform, target.os) : true | ||
@@ -35,0 +35,0 @@ const cpuOk = target.cpu ? checkList(arch, target.cpu) : true |
{ | ||
"name": "npm-install-checks", | ||
"version": "6.1.1", | ||
"version": "6.2.0", | ||
"description": "Check the engines and platform fields in package.json", | ||
@@ -11,3 +11,3 @@ "main": "lib/index.js", | ||
"@npmcli/eslint-config": "^4.0.0", | ||
"@npmcli/template-oss": "4.13.0", | ||
"@npmcli/template-oss": "4.18.0", | ||
"tap": "^16.0.1" | ||
@@ -43,3 +43,3 @@ }, | ||
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", | ||
"version": "4.13.0", | ||
"version": "4.18.0", | ||
"publish": "true" | ||
@@ -46,0 +46,0 @@ }, |
@@ -22,3 +22,3 @@ # npm-install-checks | ||
### .checkPlatform(pkg, force) | ||
### .checkPlatform(pkg, force, environment) | ||
@@ -29,2 +29,4 @@ Check if a package's `os`, `cpu` and `libc` match the running system. | ||
`environment` overrides the execution environment which comes from `process.platform` and `process.arch` by default. `environment.os` and `environment.cpu` are available. | ||
Error code: 'EBADPLATFORM' |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
6072
31
0