Skip to content

Commit

Permalink
Enforce matching engines on npm install (#481)
Browse files Browse the repository at this point in the history
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
Co-authored-by: Itai Steinherz <itaisteinherz@gmail.com>
  • Loading branch information
3 people committed Dec 30, 2019
1 parent 91ba1ef commit b14dbc9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions readme.md
Expand Up @@ -22,6 +22,7 @@
- Ensures you are publishing from the `master` branch
- Ensures the working directory is clean and that there are no unpulled changes
- Reinstalls dependencies to ensure your project works with the latest dependency tree
- Ensures your Node.js and npm versions are supported by the project and its dependencies
- Runs the tests
- Bumps the version in package.json and npm-shrinkwrap.json (if present) and creates a git tag
- Prevents [accidental publishing](https://github.com/npm/npm/issues/13248) of pre-release versions under the `latest` [dist-tag](https://docs.npmjs.com/cli/dist-tag)
Expand Down
2 changes: 1 addition & 1 deletion source/index.js
Expand Up @@ -140,7 +140,7 @@ module.exports = async (input = 'patch', options) => {
enabled: () => options.yarn === false,
task: () => {
const args = hasLockFile ? ['ci'] : ['install', '--no-package-lock', '--no-production'];
return exec('npm', args);
return exec('npm', [...args, '--engine-strict']);
}
}
]);
Expand Down

0 comments on commit b14dbc9

Please sign in to comment.