Skip to content

Commit

Permalink
Merge pull request #52 from dominicfraser/npm_9
Browse files Browse the repository at this point in the history
Support NPM 9.0.0
  • Loading branch information
olliecurtis committed Mar 21, 2023
2 parents 5fb3738 + 9546265 commit 0136f0a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## Unreleased

- Update to support `npm bin` being removed in NPM `9.0.0`

### Breaking
- Upgraded to support `lts/gallium` (Node 16)

Expand Down
2 changes: 1 addition & 1 deletion dist/cli.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ const checkVersion = (engineName, command) => {
let localVersionValid = null;

try {
const localBinFolder = execSync('npm bin').toString().trim();
const localRootFolder = execSync('npm root').toString().trim();
const localBinFolder = `${localRootFolder}${path.sep}.bin`;

const hasLocalVersion = existsSync(
`${localBinFolder}${path.sep}${engineName}`,
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"dist"
],
"engines": {
"node": "^16.14.2",
"npm": "^8.5.0"
"node": "^16.14.2 || ^18.14.1",
"npm": "^8.5.0 || ^9.3.1"
},
"scripts": {
"lint": "eslint .",
Expand Down

0 comments on commit 0136f0a

Please sign in to comment.