pnpm 7.9.1 → 7.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/README.md +22 -7
  2. package/bin/pnpm.cjs +3 -0
  3. package/bin/pnpx.cjs +1 -15
  4. package/dist/node_modules/.modules.yaml +3 -3
  5. package/dist/node_modules/.pnpm/lock.yaml +76 -42
  6. package/dist/node_modules/@npmcli/fs/lib/common/owner-sync.js +96 -0
  7. package/dist/node_modules/@npmcli/fs/lib/common/owner.js +8 -4
  8. package/dist/node_modules/@npmcli/fs/lib/copy-file.js +3 -9
  9. package/dist/node_modules/@npmcli/fs/lib/fs.js +9 -3
  10. package/dist/node_modules/@npmcli/fs/lib/index.js +3 -1
  11. package/dist/node_modules/@npmcli/fs/lib/mkdir.js +19 -0
  12. package/dist/node_modules/@npmcli/fs/lib/mkdtemp.js +3 -8
  13. package/dist/node_modules/@npmcli/fs/lib/with-owner-sync.js +21 -0
  14. package/dist/node_modules/@npmcli/fs/lib/with-owner.js +21 -0
  15. package/dist/node_modules/@npmcli/fs/lib/with-temp-dir.js +4 -2
  16. package/dist/node_modules/@npmcli/fs/lib/write-file.js +3 -8
  17. package/dist/node_modules/@npmcli/fs/package.json +21 -9
  18. package/dist/node_modules/@npmcli/move-file/{index.js → lib/index.js} +50 -27
  19. package/dist/node_modules/@npmcli/move-file/package.json +20 -7
  20. package/dist/node_modules/@tootallnate/once/LICENSE +21 -0
  21. package/dist/node_modules/@tootallnate/once/dist/index.js +21 -36
  22. package/dist/node_modules/@tootallnate/once/dist/index.js.map +1 -1
  23. package/dist/node_modules/@tootallnate/once/dist/overloaded-parameters.js +3 -0
  24. package/dist/node_modules/@tootallnate/once/dist/overloaded-parameters.js.map +1 -0
  25. package/dist/node_modules/@tootallnate/once/dist/types.js +3 -0
  26. package/dist/node_modules/@tootallnate/once/dist/types.js.map +1 -0
  27. package/dist/node_modules/@tootallnate/once/package.json +22 -15
  28. package/dist/node_modules/cacache/lib/content/read.js +99 -102
  29. package/dist/node_modules/cacache/lib/content/rm.js +9 -8
  30. package/dist/node_modules/cacache/lib/content/write.js +67 -67
  31. package/dist/node_modules/cacache/lib/entry-index.js +128 -118
  32. package/dist/node_modules/cacache/{get.js → lib/get.js} +88 -100
  33. package/dist/node_modules/cacache/{index.js → lib/index.js} +5 -6
  34. package/dist/node_modules/cacache/lib/memoization.js +10 -11
  35. package/dist/node_modules/cacache/{put.js → lib/put.js} +23 -26
  36. package/dist/node_modules/cacache/{rm.js → lib/rm.js} +3 -3
  37. package/dist/node_modules/cacache/lib/util/fix-owner.js +41 -38
  38. package/dist/node_modules/cacache/lib/util/move-file.js +36 -47
  39. package/dist/node_modules/cacache/lib/util/tmp.js +5 -7
  40. package/dist/node_modules/cacache/lib/verify.js +160 -190
  41. package/dist/node_modules/cacache/node_modules/brace-expansion/.github/FUNDING.yml +2 -0
  42. package/dist/node_modules/cacache/node_modules/brace-expansion/LICENSE +21 -0
  43. package/dist/node_modules/cacache/node_modules/brace-expansion/index.js +203 -0
  44. package/dist/node_modules/cacache/node_modules/brace-expansion/package.json +46 -0
  45. package/dist/node_modules/cacache/node_modules/glob/LICENSE +15 -0
  46. package/dist/node_modules/cacache/node_modules/glob/common.js +240 -0
  47. package/dist/node_modules/cacache/node_modules/glob/glob.js +790 -0
  48. package/dist/node_modules/cacache/node_modules/glob/package.json +55 -0
  49. package/dist/node_modules/cacache/node_modules/glob/sync.js +486 -0
  50. package/dist/node_modules/cacache/node_modules/minimatch/LICENSE +15 -0
  51. package/dist/node_modules/cacache/node_modules/minimatch/lib/path.js +4 -0
  52. package/dist/node_modules/cacache/node_modules/minimatch/minimatch.js +906 -0
  53. package/dist/node_modules/cacache/node_modules/minimatch/package.json +32 -0
  54. package/dist/node_modules/cacache/package.json +34 -30
  55. package/dist/node_modules/http-proxy-agent/dist/agent.js +3 -3
  56. package/dist/node_modules/http-proxy-agent/dist/agent.js.map +1 -1
  57. package/dist/node_modules/http-proxy-agent/package.json +4 -4
  58. package/dist/node_modules/lru-cache/LICENSE +1 -1
  59. package/dist/node_modules/lru-cache/index.js +921 -247
  60. package/dist/node_modules/lru-cache/package.json +49 -9
  61. package/dist/node_modules/make-fetch-happen/LICENSE +1 -1
  62. package/dist/node_modules/make-fetch-happen/lib/agent.js +34 -14
  63. package/dist/node_modules/make-fetch-happen/lib/cache/entry.js +90 -106
  64. package/dist/node_modules/make-fetch-happen/lib/cache/errors.js +1 -0
  65. package/dist/node_modules/make-fetch-happen/lib/cache/index.js +10 -6
  66. package/dist/node_modules/make-fetch-happen/lib/cache/policy.js +21 -21
  67. package/dist/node_modules/make-fetch-happen/lib/dns.js +49 -0
  68. package/dist/node_modules/make-fetch-happen/lib/fetch.js +40 -22
  69. package/dist/node_modules/make-fetch-happen/lib/index.js +4 -3
  70. package/dist/node_modules/make-fetch-happen/lib/options.js +17 -9
  71. package/dist/node_modules/make-fetch-happen/lib/pipeline.js +41 -0
  72. package/dist/node_modules/make-fetch-happen/lib/remote.js +28 -9
  73. package/dist/node_modules/make-fetch-happen/package.json +36 -33
  74. package/dist/node_modules/minipass-fetch/lib/blob.js +4 -4
  75. package/dist/node_modules/minipass-fetch/lib/body.js +63 -49
  76. package/dist/node_modules/minipass-fetch/lib/fetch-error.js +2 -1
  77. package/dist/node_modules/minipass-fetch/lib/headers.js +38 -21
  78. package/dist/node_modules/minipass-fetch/lib/index.js +130 -106
  79. package/dist/node_modules/minipass-fetch/lib/request.js +46 -28
  80. package/dist/node_modules/minipass-fetch/lib/response.js +3 -2
  81. package/dist/node_modules/minipass-fetch/package.json +27 -14
  82. package/dist/node_modules/node-gyp/.github/workflows/release-please.yml +1 -1
  83. package/dist/node_modules/node-gyp/.github/workflows/tests.yml +16 -9
  84. package/dist/node_modules/node-gyp/.github/workflows/visual-studio.yml +16 -8
  85. package/dist/node_modules/node-gyp/lib/build.js +7 -0
  86. package/dist/node_modules/node-gyp/lib/configure.js +26 -1
  87. package/dist/node_modules/node-gyp/lib/create-config-gypi.js +2 -1
  88. package/dist/node_modules/node-gyp/lib/find-visualstudio.js +9 -8
  89. package/dist/node_modules/node-gyp/lib/node-gyp.js +4 -0
  90. package/dist/node_modules/node-gyp/package.json +4 -4
  91. package/dist/node_modules/semver/node_modules/lru-cache/LICENSE +15 -0
  92. package/dist/node_modules/semver/node_modules/lru-cache/index.js +334 -0
  93. package/dist/node_modules/semver/node_modules/lru-cache/package.json +34 -0
  94. package/dist/node_modules/socks-proxy-agent/dist/index.js +3 -3
  95. package/dist/node_modules/socks-proxy-agent/dist/index.js.map +1 -1
  96. package/dist/node_modules/socks-proxy-agent/package.json +2 -2
  97. package/dist/node_modules/ssri/{index.js → lib/index.js} +78 -24
  98. package/dist/node_modules/ssri/package.json +27 -16
  99. package/dist/pnpm.cjs +67042 -65886
  100. package/package.json +6 -6
  101. package/dist/node_modules/@npmcli/fs/lib/common/file-url-to-path/index.js +0 -17
  102. package/dist/node_modules/@npmcli/fs/lib/common/file-url-to-path/polyfill.js +0 -121
  103. package/dist/node_modules/@npmcli/fs/lib/mkdir/index.js +0 -32
  104. package/dist/node_modules/@npmcli/fs/lib/mkdir/polyfill.js +0 -81
  105. package/dist/node_modules/cacache/lib/util/disposer.js +0 -30
  106. package/dist/node_modules/cacache/ls.js +0 -6
  107. package/dist/node_modules/cacache/verify.js +0 -3
  108. package/dist/node_modules/minipass-fetch/index.js +0 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pnpm",
3
3
  "description": "Fast, disk space efficient package manager",
4
- "version": "7.9.1",
4
+ "version": "7.9.2",
5
5
  "bin": {
6
6
  "pnpm": "bin/pnpm.cjs",
7
7
  "pnpx": "bin/pnpx.cjs"
@@ -16,7 +16,7 @@
16
16
  "bin"
17
17
  ],
18
18
  "__optionalDependencies": {
19
- "node-gyp": "^8.4.1"
19
+ "node-gyp": "^9.1.0"
20
20
  },
21
21
  "__devDependencies": {
22
22
  "@pnpm/assert-project": "workspace:*",
@@ -56,7 +56,7 @@
56
56
  "@pnpm/prepare": "workspace:*",
57
57
  "@pnpm/read-package-json": "workspace:*",
58
58
  "@pnpm/read-project-manifest": "workspace:*",
59
- "@pnpm/registry-mock": "2.20.0",
59
+ "@pnpm/registry-mock": "3.0.0-0",
60
60
  "@pnpm/run-npm": "workspace:*",
61
61
  "@pnpm/tabtab": "^0.1.2",
62
62
  "@pnpm/types": "workspace:*",
@@ -65,8 +65,8 @@
65
65
  "@types/is-ci": "^3.0.0",
66
66
  "@types/is-windows": "^1.0.0",
67
67
  "@types/pnpm__byline": "npm:@types/byline@^4.2.33",
68
- "@types/ramda": "0.28.14",
69
- "@types/semver": "^7.3.10",
68
+ "@types/ramda": "0.28.15",
69
+ "@types/semver": "7.3.10",
70
70
  "@types/which": "^2.0.1",
71
71
  "@zkochan/retry": "^0.2.0",
72
72
  "@zkochan/rimraf": "^2.1.2",
@@ -76,7 +76,7 @@
76
76
  "deep-require-cwd": "1.0.0",
77
77
  "delay": "^5.0.0",
78
78
  "dir-is-case-sensitive": "^2.0.0",
79
- "esbuild": "^0.14.51",
79
+ "esbuild": "^0.15.2",
80
80
  "execa": "npm:safe-execa@^0.1.2",
81
81
  "exists-link": "2.0.0",
82
82
  "is-ci": "^3.0.1",
@@ -1,17 +0,0 @@
1
- const url = require('url')
2
-
3
- const node = require('../node.js')
4
- const polyfill = require('./polyfill.js')
5
-
6
- const useNative = node.satisfies('>=10.12.0')
7
-
8
- const fileURLToPath = (path) => {
9
- // the polyfill is tested separately from this module, no need to hack
10
- // process.version to try to trigger it just for coverage
11
- // istanbul ignore next
12
- return useNative
13
- ? url.fileURLToPath(path)
14
- : polyfill(path)
15
- }
16
-
17
- module.exports = fileURLToPath
@@ -1,121 +0,0 @@
1
- const { URL, domainToUnicode } = require('url')
2
-
3
- const CHAR_LOWERCASE_A = 97
4
- const CHAR_LOWERCASE_Z = 122
5
-
6
- const isWindows = process.platform === 'win32'
7
-
8
- class ERR_INVALID_FILE_URL_HOST extends TypeError {
9
- constructor (platform) {
10
- super(`File URL host must be "localhost" or empty on ${platform}`)
11
- this.code = 'ERR_INVALID_FILE_URL_HOST'
12
- }
13
-
14
- toString () {
15
- return `${this.name} [${this.code}]: ${this.message}`
16
- }
17
- }
18
-
19
- class ERR_INVALID_FILE_URL_PATH extends TypeError {
20
- constructor (msg) {
21
- super(`File URL path ${msg}`)
22
- this.code = 'ERR_INVALID_FILE_URL_PATH'
23
- }
24
-
25
- toString () {
26
- return `${this.name} [${this.code}]: ${this.message}`
27
- }
28
- }
29
-
30
- class ERR_INVALID_ARG_TYPE extends TypeError {
31
- constructor (name, actual) {
32
- super(`The "${name}" argument must be one of type string or an instance ` +
33
- `of URL. Received type ${typeof actual} ${actual}`)
34
- this.code = 'ERR_INVALID_ARG_TYPE'
35
- }
36
-
37
- toString () {
38
- return `${this.name} [${this.code}]: ${this.message}`
39
- }
40
- }
41
-
42
- class ERR_INVALID_URL_SCHEME extends TypeError {
43
- constructor (expected) {
44
- super(`The URL must be of scheme ${expected}`)
45
- this.code = 'ERR_INVALID_URL_SCHEME'
46
- }
47
-
48
- toString () {
49
- return `${this.name} [${this.code}]: ${this.message}`
50
- }
51
- }
52
-
53
- const isURLInstance = (input) => {
54
- return input != null && input.href && input.origin
55
- }
56
-
57
- const getPathFromURLWin32 = (url) => {
58
- const hostname = url.hostname
59
- let pathname = url.pathname
60
- for (let n = 0; n < pathname.length; n++) {
61
- if (pathname[n] === '%') {
62
- const third = pathname.codePointAt(n + 2) | 0x20
63
- if ((pathname[n + 1] === '2' && third === 102) ||
64
- (pathname[n + 1] === '5' && third === 99)) {
65
- throw new ERR_INVALID_FILE_URL_PATH('must not include encoded \\ or / characters')
66
- }
67
- }
68
- }
69
-
70
- pathname = pathname.replace(/\//g, '\\')
71
- pathname = decodeURIComponent(pathname)
72
- if (hostname !== '') {
73
- return `\\\\${domainToUnicode(hostname)}${pathname}`
74
- }
75
-
76
- const letter = pathname.codePointAt(1) | 0x20
77
- const sep = pathname[2]
78
- if (letter < CHAR_LOWERCASE_A || letter > CHAR_LOWERCASE_Z ||
79
- (sep !== ':')) {
80
- throw new ERR_INVALID_FILE_URL_PATH('must be absolute')
81
- }
82
-
83
- return pathname.slice(1)
84
- }
85
-
86
- const getPathFromURLPosix = (url) => {
87
- if (url.hostname !== '') {
88
- throw new ERR_INVALID_FILE_URL_HOST(process.platform)
89
- }
90
-
91
- const pathname = url.pathname
92
-
93
- for (let n = 0; n < pathname.length; n++) {
94
- if (pathname[n] === '%') {
95
- const third = pathname.codePointAt(n + 2) | 0x20
96
- if (pathname[n + 1] === '2' && third === 102) {
97
- throw new ERR_INVALID_FILE_URL_PATH('must not include encoded / characters')
98
- }
99
- }
100
- }
101
-
102
- return decodeURIComponent(pathname)
103
- }
104
-
105
- const fileURLToPath = (path) => {
106
- if (typeof path === 'string') {
107
- path = new URL(path)
108
- } else if (!isURLInstance(path)) {
109
- throw new ERR_INVALID_ARG_TYPE('path', ['string', 'URL'], path)
110
- }
111
-
112
- if (path.protocol !== 'file:') {
113
- throw new ERR_INVALID_URL_SCHEME('file')
114
- }
115
-
116
- return isWindows
117
- ? getPathFromURLWin32(path)
118
- : getPathFromURLPosix(path)
119
- }
120
-
121
- module.exports = fileURLToPath
@@ -1,32 +0,0 @@
1
- const fs = require('../fs.js')
2
- const getOptions = require('../common/get-options.js')
3
- const node = require('../common/node.js')
4
- const owner = require('../common/owner.js')
5
-
6
- const polyfill = require('./polyfill.js')
7
-
8
- // node 10.12.0 added the options parameter, which allows recursive and mode
9
- // properties to be passed
10
- const useNative = node.satisfies('>=10.12.0')
11
-
12
- // extends mkdir with the ability to specify an owner of the new dir
13
- const mkdir = async (path, opts) => {
14
- const options = getOptions(opts, {
15
- copy: ['mode', 'recursive', 'owner'],
16
- wrap: 'mode',
17
- })
18
- const { uid, gid } = await owner.validate(path, options.owner)
19
-
20
- // the polyfill is tested separately from this module, no need to hack
21
- // process.version to try to trigger it just for coverage
22
- // istanbul ignore next
23
- const result = useNative
24
- ? await fs.mkdir(path, options)
25
- : await polyfill(path, options)
26
-
27
- await owner.update(path, uid, gid)
28
-
29
- return result
30
- }
31
-
32
- module.exports = mkdir
@@ -1,81 +0,0 @@
1
- const { dirname } = require('path')
2
-
3
- const fileURLToPath = require('../common/file-url-to-path/index.js')
4
- const fs = require('../fs.js')
5
-
6
- const defaultOptions = {
7
- mode: 0o777,
8
- recursive: false,
9
- }
10
-
11
- const mkdir = async (path, opts) => {
12
- const options = { ...defaultOptions, ...opts }
13
-
14
- // if we're not in recursive mode, just call the real mkdir with the path and
15
- // the mode option only
16
- if (!options.recursive) {
17
- return fs.mkdir(path, options.mode)
18
- }
19
-
20
- const makeDirectory = async (dir, mode) => {
21
- // we can't use dirname directly since these functions support URL
22
- // objects with the file: protocol as the path input, so first we get a
23
- // string path, then we can call dirname on that
24
- const parent = dir != null && dir.href && dir.origin
25
- ? dirname(fileURLToPath(dir))
26
- : dirname(dir)
27
-
28
- // if the parent is the dir itself, try to create it. anything but EISDIR
29
- // should be rethrown
30
- if (parent === dir) {
31
- try {
32
- await fs.mkdir(dir, opts)
33
- } catch (err) {
34
- if (err.code !== 'EISDIR') {
35
- throw err
36
- }
37
- }
38
- return undefined
39
- }
40
-
41
- try {
42
- await fs.mkdir(dir, mode)
43
- return dir
44
- } catch (err) {
45
- // ENOENT means the parent wasn't there, so create that
46
- if (err.code === 'ENOENT') {
47
- const made = await makeDirectory(parent, mode)
48
- await makeDirectory(dir, mode)
49
- // return the shallowest path we created, i.e. the result of creating
50
- // the parent
51
- return made
52
- }
53
-
54
- // an EEXIST means there's already something there
55
- // an EROFS means we have a read-only filesystem and can't create a dir
56
- // any other error is fatal and we should give up now
57
- if (err.code !== 'EEXIST' && err.code !== 'EROFS') {
58
- throw err
59
- }
60
-
61
- // stat the directory, if the result is a directory, then we successfully
62
- // created this one so return its path. otherwise, we reject with the
63
- // original error by ignoring the error in the catch
64
- try {
65
- const stat = await fs.stat(dir)
66
- if (stat.isDirectory()) {
67
- // if it already existed, we didn't create anything so return
68
- // undefined
69
- return undefined
70
- }
71
- } catch (_) {}
72
-
73
- // if the thing that's there isn't a directory, then just re-throw
74
- throw err
75
- }
76
- }
77
-
78
- return makeDirectory(path, options.mode)
79
- }
80
-
81
- module.exports = mkdir
@@ -1,30 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports.disposer = disposer
4
-
5
- function disposer (creatorFn, disposerFn, fn) {
6
- const runDisposer = (resource, result, shouldThrow = false) => {
7
- return disposerFn(resource)
8
- .then(
9
- // disposer resolved, do something with original fn's promise
10
- () => {
11
- if (shouldThrow)
12
- throw result
13
-
14
- return result
15
- },
16
- // Disposer fn failed, crash process
17
- (err) => {
18
- throw err
19
- // Or process.exit?
20
- })
21
- }
22
-
23
- return creatorFn
24
- .then((resource) => {
25
- // fn(resource) can throw, so wrap in a promise here
26
- return Promise.resolve().then(() => fn(resource))
27
- .then((result) => runDisposer(resource, result))
28
- .catch((err) => runDisposer(resource, err, true))
29
- })
30
- }
@@ -1,6 +0,0 @@
1
- 'use strict'
2
-
3
- const index = require('./lib/entry-index')
4
-
5
- module.exports = index.ls
6
- module.exports.stream = index.lsStream
@@ -1,3 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = require('./lib/verify')
@@ -1 +0,0 @@
1
- module.exports = require('./lib/index.js')