Update build scripts to target es2020

This commit is contained in:
Matt Bierner
2022-02-28 14:00:17 -08:00
parent 1d77856203
commit 433bf7cd88
17 changed files with 44 additions and 35 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ function asYarnDependency(prefix, tree) {
return { name, version, path: dependencyPath, children };
}
function getYarnProductionDependencies(cwd) {
const raw = cp.execSync('yarn list --json', { cwd, encoding: 'utf8', env: Object.assign(Object.assign({}, process.env), { NODE_ENV: 'production' }), stdio: [null, null, 'inherit'] });
const raw = cp.execSync('yarn list --json', { cwd, encoding: 'utf8', env: { ...process.env, NODE_ENV: 'production' }, stdio: [null, null, 'inherit'] });
const match = /^{"type":"tree".*$/m.exec(raw);
if (!match || match.length !== 1) {
throw new Error('Could not parse result of `yarn list --json`');