build: update to yarn v4 (#48994)
* build: update to yarn v4 (cherry picked from commit 6adec744f3411240a63fd194a319b510872eca93) * chore: fixup types after yarn v4 migration * chore: update nan yarn.lock patch * build: automatically install git for dugite
This commit is contained in:
parent
aeb5af803f
commit
b2e73d28e2
48 changed files with 18341 additions and 11314 deletions
18
script/yarn.js
Normal file → Executable file
18
script/yarn.js
Normal file → Executable file
|
|
@ -1,21 +1,7 @@
|
|||
const cp = require('node:child_process');
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
|
||||
const YARN_VERSION = /'yarn_version': '(.+?)'/.exec(fs.readFileSync(path.resolve(__dirname, '../DEPS'), 'utf8'))[1];
|
||||
const NPX_CMD = process.platform === 'win32' ? 'npx.cmd' : 'npx';
|
||||
exports.YARN_SCRIPT_PATH = path.resolve(__dirname, '..', '.yarn/releases/yarn-4.11.0.cjs');
|
||||
|
||||
if (require.main === module) {
|
||||
const child = cp.spawn(NPX_CMD, [`yarn@${YARN_VERSION}`, ...process.argv.slice(2)], {
|
||||
stdio: 'inherit',
|
||||
env: {
|
||||
...process.env,
|
||||
npm_config_yes: 'true'
|
||||
},
|
||||
shell: process.platform === 'win32'
|
||||
});
|
||||
|
||||
child.on('exit', code => process.exit(code));
|
||||
require(exports.YARN_SCRIPT_PATH);
|
||||
}
|
||||
|
||||
exports.YARN_VERSION = YARN_VERSION;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue