Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: @npmcli/run-script@4.1.4 #5086

Merged
merged 2 commits into from Jun 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions node_modules/@npmcli/run-script/lib/escape.js
Expand Up @@ -65,7 +65,13 @@ const sh = (input) => {
return result
}

// disabling the no-control-regex rule for this line as we very specifically _do_ want to
// replace those characters if they somehow exist at this point, which is highly unlikely
// eslint-disable-next-line no-control-regex
const filename = (input) => input.replace(/[<>:"/\\|?*\x00-\x31]/g, '')

module.exports = {
cmd,
sh,
filename,
}
5 changes: 3 additions & 2 deletions node_modules/@npmcli/run-script/lib/make-spawn-args.js
Expand Up @@ -30,6 +30,7 @@ const makeSpawnArgs = options => {
npm_config_node_gyp,
})

const fileName = escape.filename(`${event}-${Date.now()}`)
let scriptFile
let script = ''

Expand Down Expand Up @@ -61,7 +62,7 @@ const makeSpawnArgs = options => {

const doubleEscape = pathToInitial.endsWith('.cmd') || pathToInitial.endsWith('.bat')

scriptFile = resolve(tmpdir(), `${event}-${Date.now()}.cmd`)
scriptFile = resolve(tmpdir(), `${fileName}.cmd`)
script += '@echo off\n'
script += cmd
if (args.length) {
Expand All @@ -71,7 +72,7 @@ const makeSpawnArgs = options => {
const shebang = isAbsolute(scriptShell)
? `#!${scriptShell}`
: `#!/usr/bin/env ${scriptShell}`
scriptFile = resolve(tmpdir(), `${event}-${Date.now()}.sh`)
scriptFile = resolve(tmpdir(), `${fileName}.sh`)
script += `${shebang}\n`
script += cmd
if (args.length) {
Expand Down
9 changes: 3 additions & 6 deletions node_modules/@npmcli/run-script/package.json
@@ -1,6 +1,6 @@
{
"name": "@npmcli/run-script",
"version": "4.1.3",
"version": "4.1.5",
"description": "Run a lifecycle script for a package (descendant of npm-lifecycle)",
"author": "GitHub Inc.",
"license": "ISC",
Expand All @@ -17,10 +17,6 @@
"posttest": "npm run lint",
"template-oss-apply": "template-oss-apply --force"
},
"tap": {
"check-coverage": true,
"coverage-map": "map.js"
},
"devDependencies": {
"@npmcli/eslint-config": "^3.0.1",
"@npmcli/template-oss": "3.5.0",
Expand All @@ -32,7 +28,8 @@
"@npmcli/node-gyp": "^2.0.0",
"@npmcli/promise-spawn": "^3.0.0",
"node-gyp": "^9.0.0",
"read-package-json-fast": "^2.0.3"
"read-package-json-fast": "^2.0.3",
"which": "^2.0.2"
},
"files": [
"bin/",
Expand Down
11 changes: 6 additions & 5 deletions package-lock.json
Expand Up @@ -93,7 +93,7 @@
"@npmcli/fs": "^2.1.0",
"@npmcli/map-workspaces": "^2.0.3",
"@npmcli/package-json": "^2.0.0",
"@npmcli/run-script": "^4.1.3",
"@npmcli/run-script": "^4.1.5",
"abbrev": "~1.1.1",
"archy": "~1.0.0",
"cacache": "^16.1.1",
Expand Down Expand Up @@ -1042,15 +1042,16 @@
}
},
"node_modules/@npmcli/run-script": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-4.1.3.tgz",
"integrity": "sha512-xb47c2KMkn6ERw2AwPPGKIITbWoXOT1yDV5rU3SYeC1vksYOodbgN0pnOptIVnRgS2e9G8R7BVDVm8lWp92unQ==",
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-4.1.5.tgz",
"integrity": "sha512-FyrZkZ+O0bCnQqm+mRb6sKbEJgyJudInwFN84gCcMUcxrWkR15Ags1uOHwnxHYdpj3T5eqrCZNW/Ys20MGTQ6Q==",
"inBundle": true,
"dependencies": {
"@npmcli/node-gyp": "^2.0.0",
"@npmcli/promise-spawn": "^3.0.0",
"node-gyp": "^9.0.0",
"read-package-json-fast": "^2.0.3"
"read-package-json-fast": "^2.0.3",
"which": "^2.0.2"
},
"engines": {
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -62,7 +62,7 @@
"@npmcli/fs": "^2.1.0",
"@npmcli/map-workspaces": "^2.0.3",
"@npmcli/package-json": "^2.0.0",
"@npmcli/run-script": "^4.1.3",
"@npmcli/run-script": "^4.1.5",
"abbrev": "~1.1.1",
"archy": "~1.0.0",
"cacache": "^16.1.1",
Expand Down