-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Support breaking change introduced in Node.js v17 * Update message * actually set the node variable * Use node script instead * add node-version file for most managers * use a better name
- Loading branch information
1 parent
c5c4e19
commit 777ea05
Showing
3 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v16.19.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env node | ||
|
||
const { spawn } = require('child_process'); | ||
|
||
const args = process.argv.slice(2); | ||
|
||
console.log(`Running on Node.js ${process.version}.`); | ||
|
||
const match = /v(\d+)/.exec(process.version); | ||
|
||
const needsOpenSslLegacyProvider = match && match[1] > 16; | ||
|
||
needsOpenSslLegacyProvider && console.warn('Setting --openssl-legacy-provider to support Node.js v17+.'); | ||
|
||
const child = spawn('cross-env', | ||
needsOpenSslLegacyProvider ? ['NODE_OPTIONS=--openssl-legacy-provider', ...args] : args, { | ||
shell: true, | ||
stdio: 'inherit' | ||
} | ||
); | ||
|
||
child.on('exit', function (code) { | ||
process.exit(code) | ||
}) |