Skip to content

Commit 939a188

Browse files
authoredJun 20, 2023
fix: ignore node prereleases in npm engines check (#6574)
They don't currently have any so that code would never have mattered cf https://nodejs.org/download/release/
1 parent 405ffbf commit 939a188

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎lib/es6/validate-engines.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const { engines: { node: engines }, version } = require('../../package.json')
99
const npm = `v${version}`
1010

1111
module.exports = (process, getCli) => {
12-
const node = process.version.replace(/-.*$/, '')
12+
const node = process.version
1313

1414
/* eslint-disable-next-line max-len */
1515
const unsupportedMessage = `npm ${npm} does not support Node.js ${node}. This version of npm supports the following node versions: \`${engines}\`. You can find the latest version at https://nodejs.org/.`

0 commit comments

Comments
 (0)
Please sign in to comment.