Skip to content

Commit 2076368

Browse files
committed
deps: update @npmcli/package-json@6.0.1
1 parent feac87c commit 2076368

File tree

107 files changed

+2499
-145
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+2499
-145
lines changed

node_modules/.gitignore

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,30 +24,38 @@
2424
/@npmcli/map-workspaces/node_modules/*
2525
!/@npmcli/map-workspaces/node_modules/@npmcli/
2626
/@npmcli/map-workspaces/node_modules/@npmcli/*
27-
!/@npmcli/map-workspaces/node_modules/@npmcli/git
2827
!/@npmcli/map-workspaces/node_modules/@npmcli/name-from-folder
29-
!/@npmcli/map-workspaces/node_modules/@npmcli/package-json
30-
!/@npmcli/map-workspaces/node_modules/@npmcli/promise-spawn
31-
!/@npmcli/map-workspaces/node_modules/hosted-git-info
32-
!/@npmcli/map-workspaces/node_modules/ini
33-
!/@npmcli/map-workspaces/node_modules/isexe
34-
!/@npmcli/map-workspaces/node_modules/json-parse-even-better-errors
35-
!/@npmcli/map-workspaces/node_modules/normalize-package-data
36-
!/@npmcli/map-workspaces/node_modules/npm-install-checks
37-
!/@npmcli/map-workspaces/node_modules/npm-normalize-package-bin
38-
!/@npmcli/map-workspaces/node_modules/npm-package-arg
39-
!/@npmcli/map-workspaces/node_modules/npm-pick-manifest
40-
!/@npmcli/map-workspaces/node_modules/proc-log
41-
!/@npmcli/map-workspaces/node_modules/validate-npm-package-name
42-
!/@npmcli/map-workspaces/node_modules/which
4328
!/@npmcli/metavuln-calculator
4429
!/@npmcli/name-from-folder
4530
!/@npmcli/node-gyp
4631
!/@npmcli/package-json
32+
!/@npmcli/package-json/node_modules/
33+
/@npmcli/package-json/node_modules/*
34+
!/@npmcli/package-json/node_modules/@npmcli/
35+
/@npmcli/package-json/node_modules/@npmcli/*
36+
!/@npmcli/package-json/node_modules/@npmcli/git
37+
!/@npmcli/package-json/node_modules/@npmcli/promise-spawn
38+
!/@npmcli/package-json/node_modules/hosted-git-info
39+
!/@npmcli/package-json/node_modules/ini
40+
!/@npmcli/package-json/node_modules/isexe
41+
!/@npmcli/package-json/node_modules/json-parse-even-better-errors
42+
!/@npmcli/package-json/node_modules/normalize-package-data
43+
!/@npmcli/package-json/node_modules/npm-install-checks
44+
!/@npmcli/package-json/node_modules/npm-normalize-package-bin
45+
!/@npmcli/package-json/node_modules/npm-package-arg
46+
!/@npmcli/package-json/node_modules/npm-pick-manifest
47+
!/@npmcli/package-json/node_modules/proc-log
48+
!/@npmcli/package-json/node_modules/validate-npm-package-name
49+
!/@npmcli/package-json/node_modules/which
4750
!/@npmcli/promise-spawn
4851
!/@npmcli/query
4952
!/@npmcli/redact
5053
!/@npmcli/run-script
54+
!/@npmcli/run-script/node_modules/
55+
/@npmcli/run-script/node_modules/*
56+
!/@npmcli/run-script/node_modules/@npmcli/
57+
/@npmcli/run-script/node_modules/@npmcli/*
58+
!/@npmcli/run-script/node_modules/@npmcli/package-json
5159
!/@pkgjs/
5260
/@pkgjs/*
5361
!/@pkgjs/parseargs
@@ -121,6 +129,11 @@
121129
!/indent-string
122130
!/ini
123131
!/init-package-json
132+
!/init-package-json/node_modules/
133+
/init-package-json/node_modules/*
134+
!/init-package-json/node_modules/@npmcli/
135+
/init-package-json/node_modules/@npmcli/*
136+
!/init-package-json/node_modules/@npmcli/package-json
124137
!/ip-address
125138
!/ip-regex
126139
!/is-cidr
@@ -176,6 +189,11 @@
176189
!/p-map
177190
!/package-json-from-dist
178191
!/pacote
192+
!/pacote/node_modules/
193+
/pacote/node_modules/*
194+
!/pacote/node_modules/@npmcli/
195+
/pacote/node_modules/@npmcli/*
196+
!/pacote/node_modules/@npmcli/package-json
179197
!/parse-conflict-json
180198
!/path-key
181199
!/path-scurry

node_modules/@npmcli/package-json/lib/normalize.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,9 @@ function unixifyPath (ref) {
127127
return ref.replace(/\\|:/g, '/')
128128
}
129129

130-
function securePath (ref) {
131-
const secured = path.join('.', path.join('/', unixifyPath(ref)))
132-
return secured.startsWith('.') ? '' : secured
133-
}
134-
135130
function secureAndUnixifyPath (ref) {
136-
return unixifyPath(securePath(ref))
131+
const secured = unixifyPath(path.join('.', path.join('/', unixifyPath(ref))))
132+
return secured.startsWith('./') ? '' : secured
137133
}
138134

139135
// We don't want the `changes` array in here by default because this is a hot
@@ -376,7 +372,7 @@ const normalize = async (pkg, { strict, steps, root, changes, allowLegacyCase })
376372

377373
// expand "directories.bin"
378374
if (steps.includes('binDir') && data.directories?.bin && !data.bin) {
379-
const binsDir = path.resolve(pkg.path, securePath(data.directories.bin))
375+
const binsDir = path.resolve(pkg.path, secureAndUnixifyPath(data.directories.bin))
380376
const bins = await lazyLoadGlob()('**', { cwd: binsDir })
381377
data.bin = bins.reduce((acc, binFile) => {
382378
if (binFile && !binFile.startsWith('.')) {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)