()
| 69 | } |
| 70 | |
| 71 | async function checkYarnConfig() { |
| 72 | const { yarn } = PACKAGE_MANAGERS; |
| 73 | const yarnVersion = await spawnPackageManager(yarn, ['--version']); |
| 74 | const nodeLinker = await spawnPackageManager(yarn, [ |
| 75 | 'config', |
| 76 | 'get', |
| 77 | 'nodeLinker', |
| 78 | ]); |
| 79 | if ( |
| 80 | yarnVersion && |
| 81 | semver.gte(yarnVersion, '2.0.0') && |
| 82 | nodeLinker !== 'node-modules' |
| 83 | ) { |
| 84 | throw new Error( |
| 85 | 'When using Yarn 2+, `nodeLinker` must be set to "node-modules". Run `yarn config set nodeLinker node-modules` to set this config value, or add it to your project\'s `.yarnrc.yml` file.', |
| 86 | ); |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | // TODO(erickzhao): Drop antiquated versions of npm for Forge v8 |
| 91 | const ALLOWLISTED_VERSIONS: Record< |
no test coverage detected