diff --git a/node_modules/@npmcli/arborist/lib/add-rm-pkg-deps.js b/node_modules/@npmcli/arborist/lib/add-rm-pkg-deps.js index dad85c48c9320..4479328f94ae4 100644 --- a/node_modules/@npmcli/arborist/lib/add-rm-pkg-deps.js +++ b/node_modules/@npmcli/arborist/lib/add-rm-pkg-deps.js @@ -55,7 +55,8 @@ const addSingle = ({pkg, spec, saveBundle, saveType, path}) => { pkg[type] = pkg[type] || {} if (rawSpec !== '' || pkg[type][name] === undefined) { // if we're in global mode, file specs are based on cwd, not arb path - pkg[type][name] = specType === 'file' ? `file:${relpath(path, fetchSpec)}` + pkg[type][name] = specType === 'file' || specType === 'directory' + ? `file:${relpath(path, fetchSpec)}` : (rawSpec || '*') } diff --git a/node_modules/@npmcli/arborist/lib/arborist/rebuild.js b/node_modules/@npmcli/arborist/lib/arborist/rebuild.js index 2a0057887ccd7..26f841e7766e6 100644 --- a/node_modules/@npmcli/arborist/lib/arborist/rebuild.js +++ b/node_modules/@npmcli/arborist/lib/arborist/rebuild.js @@ -184,13 +184,16 @@ module.exports = cls => class Builder extends cls { dev, devOptional, package: pkg, + location, } = node // skip any that we know we'll be deleting if (this[_trashList].has(path)) return - process.emit('time', `build:run:${event}:${node.location}`) + const timer = `build:run:${event}:${location}` + process.emit('time', timer) + this.log.info('run', pkg._id, event, location, pkg.scripts[event]) const p = runScript({ event, path, @@ -207,10 +210,19 @@ module.exports = cls => class Builder extends cls { boolEnv(devOptional && !dev && !optional), }, scriptShell: this[_scriptShell], + }).catch(er => { + const { code, signal } = er + this.log.info('run', pkg._id, event, {code, signal}) + throw er + }).then(({code, signal}) => { + this.log.info('run', pkg._id, event, {code, signal}) }) - return this[_doHandleOptionalFailure] - ? this[_handleOptionalFailure](node, p) : p + await (this[_doHandleOptionalFailure] + ? this[_handleOptionalFailure](node, p) + : p) + + process.emit('timeEnd', timer) })) process.emit('timeEnd', `build:run:${event}`) } diff --git a/node_modules/@npmcli/arborist/package.json b/node_modules/@npmcli/arborist/package.json index 75770b29cd276..fead51d1c6070 100644 --- a/node_modules/@npmcli/arborist/package.json +++ b/node_modules/@npmcli/arborist/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/arborist", - "version": "0.0.21", + "version": "0.0.23", "description": "Manage node_modules trees", "dependencies": { "@npmcli/installed-package-contents": "^1.0.5", diff --git a/package-lock.json b/package-lock.json index d54900b3727bc..68d871df12ea1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -88,7 +88,7 @@ ], "license": "Artistic-2.0", "dependencies": { - "@npmcli/arborist": "^0.0.21", + "@npmcli/arborist": "^0.0.23", "@npmcli/ci-detect": "^1.2.0", "@npmcli/config": "^1.1.7", "@npmcli/run-script": "^1.5.0", @@ -397,9 +397,9 @@ "dev": true }, "node_modules/@npmcli/arborist": { - "version": "0.0.21", - "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-0.0.21.tgz", - "integrity": "sha512-5yZ9xL4yDqqmjaJmql5HQ99lA/zMPZJL9DrmABiHAp22U5hR08e0E4DYBRlnLy/mdjjiopJ+aAm0hIgcD56vdg==", + "version": "0.0.23", + "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-0.0.23.tgz", + "integrity": "sha512-GP3QFAr5TWYzoG7JkfClc4XCwFGUk+R/pJpErpHzyiwf8TI9Ib1Psxjmdb+lVGYaX6QlO0iJeuvL5tvmOI4LlQ==", "inBundle": true, "dependencies": { "@npmcli/installed-package-contents": "^1.0.5", @@ -9460,9 +9460,9 @@ "dev": true }, "@npmcli/arborist": { - "version": "0.0.21", - "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-0.0.21.tgz", - "integrity": "sha512-5yZ9xL4yDqqmjaJmql5HQ99lA/zMPZJL9DrmABiHAp22U5hR08e0E4DYBRlnLy/mdjjiopJ+aAm0hIgcD56vdg==", + "version": "0.0.23", + "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-0.0.23.tgz", + "integrity": "sha512-GP3QFAr5TWYzoG7JkfClc4XCwFGUk+R/pJpErpHzyiwf8TI9Ib1Psxjmdb+lVGYaX6QlO0iJeuvL5tvmOI4LlQ==", "requires": { "@npmcli/installed-package-contents": "^1.0.5", "@npmcli/map-workspaces": "0.0.0-pre.1", diff --git a/package.json b/package.json index 1ed4cc905b549..17544784e3460 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@npmcli/arborist": "^0.0.21", + "@npmcli/arborist": "^0.0.23", "@npmcli/ci-detect": "^1.2.0", "@npmcli/run-script": "^1.5.0", "abbrev": "~1.1.1",