Skip to content

Commit dd62328

Browse files
nlflukekarrys
authored andcommitted
deps: @npmcli/[email protected]
1 parent 5be7d6e commit dd62328

File tree

5 files changed

+15
-12
lines changed

5 files changed

+15
-12
lines changed

node_modules/@npmcli/run-script/lib/escape.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,13 @@ const sh = (input) => {
6565
return result
6666
}
6767

68+
// disabling the no-control-regex rule for this line as we very specifically _do_ want to
69+
// replace those characters if they somehow exist at this point, which is highly unlikely
70+
// eslint-disable-next-line no-control-regex
71+
const filename = (input) => input.replace(/[<>:"/\\|?*\x00-\x31]/g, '')
72+
6873
module.exports = {
6974
cmd,
7075
sh,
76+
filename,
7177
}

node_modules/@npmcli/run-script/lib/make-spawn-args.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const makeSpawnArgs = options => {
3030
npm_config_node_gyp,
3131
})
3232

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

@@ -61,7 +62,7 @@ const makeSpawnArgs = options => {
6162

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

64-
scriptFile = resolve(tmpdir(), `${event}-${Date.now()}.cmd`)
65+
scriptFile = resolve(tmpdir(), `${fileName}.cmd`)
6566
script += '@echo off\n'
6667
script += cmd
6768
if (args.length) {
@@ -71,7 +72,7 @@ const makeSpawnArgs = options => {
7172
const shebang = isAbsolute(scriptShell)
7273
? `#!${scriptShell}`
7374
: `#!/usr/bin/env ${scriptShell}`
74-
scriptFile = resolve(tmpdir(), `${event}-${Date.now()}.sh`)
75+
scriptFile = resolve(tmpdir(), `${fileName}.sh`)
7576
script += `${shebang}\n`
7677
script += cmd
7778
if (args.length) {

node_modules/@npmcli/run-script/package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@npmcli/run-script",
3-
"version": "4.1.3",
3+
"version": "4.1.4",
44
"description": "Run a lifecycle script for a package (descendant of npm-lifecycle)",
55
"author": "GitHub Inc.",
66
"license": "ISC",
@@ -17,10 +17,6 @@
1717
"posttest": "npm run lint",
1818
"template-oss-apply": "template-oss-apply --force"
1919
},
20-
"tap": {
21-
"check-coverage": true,
22-
"coverage-map": "map.js"
23-
},
2420
"devDependencies": {
2521
"@npmcli/eslint-config": "^3.0.1",
2622
"@npmcli/template-oss": "3.5.0",

package-lock.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
"@npmcli/fs": "^2.1.0",
9494
"@npmcli/map-workspaces": "^2.0.3",
9595
"@npmcli/package-json": "^2.0.0",
96-
"@npmcli/run-script": "^4.1.3",
96+
"@npmcli/run-script": "^4.1.4",
9797
"abbrev": "~1.1.1",
9898
"archy": "~1.0.0",
9999
"cacache": "^16.1.1",
@@ -1042,9 +1042,9 @@
10421042
}
10431043
},
10441044
"node_modules/@npmcli/run-script": {
1045-
"version": "4.1.3",
1046-
"resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-4.1.3.tgz",
1047-
"integrity": "sha512-xb47c2KMkn6ERw2AwPPGKIITbWoXOT1yDV5rU3SYeC1vksYOodbgN0pnOptIVnRgS2e9G8R7BVDVm8lWp92unQ==",
1045+
"version": "4.1.4",
1046+
"resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-4.1.4.tgz",
1047+
"integrity": "sha512-1Qk/EsHBKc40XkN1dF79ztae+ua9jEjDupU0rQgO/k+94t7eFjXGN/baRvA00aEOJuTZ4VjwlC2u+XECImJi5w==",
10481048
"inBundle": true,
10491049
"dependencies": {
10501050
"@npmcli/node-gyp": "^2.0.0",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"@npmcli/fs": "^2.1.0",
6363
"@npmcli/map-workspaces": "^2.0.3",
6464
"@npmcli/package-json": "^2.0.0",
65-
"@npmcli/run-script": "^4.1.3",
65+
"@npmcli/run-script": "^4.1.4",
6666
"abbrev": "~1.1.1",
6767
"archy": "~1.0.0",
6868
"cacache": "^16.1.1",

0 commit comments

Comments
 (0)