pnpm 10.33.3 → 10.34.0

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 (29) hide show
  1. package/dist/node_modules/.modules.yaml +76 -76
  2. package/dist/node_modules/.pnpm/lock.yaml +21 -20
  3. package/dist/node_modules/.pnpm-workspace-state-v1.json +4 -3
  4. package/dist/node_modules/brace-expansion/index.js +1 -1
  5. package/dist/node_modules/brace-expansion/package.json +1 -1
  6. package/dist/node_modules/semver/bin/semver.js +14 -10
  7. package/dist/node_modules/semver/classes/range.js +7 -0
  8. package/dist/node_modules/semver/functions/truncate.js +48 -0
  9. package/dist/node_modules/semver/index.js +2 -0
  10. package/dist/node_modules/semver/internal/re.js +1 -1
  11. package/dist/node_modules/semver/package.json +3 -3
  12. package/dist/node_modules/semver/range.bnf +5 -4
  13. package/dist/node_modules/semver/ranges/subset.js +2 -2
  14. package/dist/node_modules/socks/package.json +2 -2
  15. package/dist/node_modules/tar/dist/commonjs/index.min.js +3 -3
  16. package/dist/node_modules/tar/dist/commonjs/index.min.js.map +3 -3
  17. package/dist/node_modules/tar/dist/commonjs/pack.d.ts.map +1 -1
  18. package/dist/node_modules/tar/dist/commonjs/pack.js +41 -7
  19. package/dist/node_modules/tar/dist/commonjs/pack.js.map +1 -1
  20. package/dist/node_modules/tar/dist/esm/index.min.js +3 -3
  21. package/dist/node_modules/tar/dist/esm/index.min.js.map +3 -3
  22. package/dist/node_modules/tar/dist/esm/pack.d.ts.map +1 -1
  23. package/dist/node_modules/tar/dist/esm/pack.js +41 -7
  24. package/dist/node_modules/tar/dist/esm/pack.js.map +1 -1
  25. package/dist/node_modules/tar/package.json +4 -4
  26. package/dist/pnpm.cjs +1500 -852
  27. package/dist/worker.js +40 -13
  28. package/package.json +1 -1
  29. package/dist/node_modules/socks/.claude/settings.local.json +0 -26
@@ -19,28 +19,28 @@
19
19
  "nopt@8.1.0": [
20
20
  "node_modules/nopt"
21
21
  ],
22
- "tar@7.5.13": [
22
+ "tar@7.5.15": [
23
23
  "node_modules/tar"
24
24
  ],
25
- "env-paths@2.2.1": [
26
- "node_modules/env-paths"
27
- ],
28
25
  "tinyglobby@0.2.16": [
29
26
  "node_modules/tinyglobby"
30
27
  ],
31
- "proc-log@5.0.0": [
32
- "node_modules/proc-log"
33
- ],
34
28
  "which@5.0.0": [
35
29
  "node_modules/which"
36
30
  ],
31
+ "env-paths@2.2.1": [
32
+ "node_modules/env-paths"
33
+ ],
37
34
  "exponential-backoff@3.1.3": [
38
35
  "node_modules/exponential-backoff"
39
36
  ],
37
+ "proc-log@5.0.0": [
38
+ "node_modules/proc-log"
39
+ ],
40
40
  "graceful-fs@4.2.11": [
41
41
  "node_modules/graceful-fs"
42
42
  ],
43
- "semver@7.7.4": [
43
+ "semver@7.8.1": [
44
44
  "node_modules/semver"
45
45
  ],
46
46
  "make-fetch-happen@14.0.3": [
@@ -49,41 +49,35 @@
49
49
  "abbrev@3.0.1": [
50
50
  "node_modules/abbrev"
51
51
  ],
52
+ "chownr@3.0.0": [
53
+ "node_modules/chownr"
54
+ ],
52
55
  "yallist@5.0.0": [
53
56
  "node_modules/yallist"
54
57
  ],
55
58
  "@isaacs/fs-minipass@4.0.1": [
56
59
  "node_modules/@isaacs/fs-minipass"
57
60
  ],
58
- "chownr@3.0.0": [
59
- "node_modules/chownr"
60
- ],
61
61
  "minizlib@3.1.0": [
62
62
  "node_modules/minizlib"
63
63
  ],
64
64
  "minipass@7.1.3": [
65
65
  "node_modules/minipass"
66
66
  ],
67
- "fdir@6.5.0(picomatch@4.0.4)": [
68
- "node_modules/fdir"
69
- ],
70
67
  "picomatch@4.0.4": [
71
68
  "node_modules/picomatch"
72
69
  ],
70
+ "fdir@6.5.0(picomatch@4.0.4)": [
71
+ "node_modules/fdir"
72
+ ],
73
73
  "isexe@3.1.1": [
74
74
  "node_modules/isexe"
75
75
  ],
76
- "promise-retry@2.0.1": [
77
- "node_modules/promise-retry"
78
- ],
79
- "negotiator@1.0.0": [
80
- "node_modules/negotiator"
81
- ],
82
76
  "ssri@12.0.0": [
83
77
  "node_modules/ssri"
84
78
  ],
85
- "minipass-fetch@4.0.1": [
86
- "node_modules/minipass-fetch"
79
+ "cacache@19.0.1": [
80
+ "node_modules/cacache"
87
81
  ],
88
82
  "minipass@3.3.6": [
89
83
  "node_modules/minipass-flush/node_modules/minipass",
@@ -95,65 +89,62 @@
95
89
  "node_modules/minipass-pipeline/node_modules/yallist",
96
90
  "node_modules/minipass-sized/node_modules/yallist"
97
91
  ],
98
- "@npmcli/agent@3.0.0": [
99
- "node_modules/@npmcli/agent"
92
+ "promise-retry@2.0.1": [
93
+ "node_modules/promise-retry"
100
94
  ],
101
- "cacache@19.0.1": [
102
- "node_modules/cacache"
95
+ "negotiator@1.0.0": [
96
+ "node_modules/negotiator"
103
97
  ],
104
98
  "http-cache-semantics@4.2.0": [
105
99
  "node_modules/http-cache-semantics"
106
100
  ],
107
- "retry@0.12.0": [
108
- "node_modules/retry"
109
- ],
110
- "err-code@2.0.3": [
111
- "node_modules/err-code"
112
- ],
113
- "encoding@0.1.13": [
114
- "node_modules/encoding"
115
- ],
116
- "agent-base@7.1.4": [
117
- "node_modules/agent-base"
118
- ],
119
- "http-proxy-agent@7.0.2": [
120
- "node_modules/http-proxy-agent"
101
+ "@npmcli/agent@3.0.0": [
102
+ "node_modules/@npmcli/agent"
121
103
  ],
122
- "https-proxy-agent@7.0.6": [
123
- "node_modules/https-proxy-agent"
104
+ "minipass-fetch@4.0.1": [
105
+ "node_modules/minipass-fetch"
124
106
  ],
125
- "socks-proxy-agent@8.0.5": [
126
- "node_modules/socks-proxy-agent"
107
+ "minipass-collect@2.0.1": [
108
+ "node_modules/minipass-collect"
127
109
  ],
128
- "lru-cache@10.4.3": [
129
- "node_modules/lru-cache"
110
+ "p-map@7.0.4": [
111
+ "node_modules/p-map"
130
112
  ],
131
113
  "unique-filename@4.0.0": [
132
114
  "node_modules/unique-filename"
133
115
  ],
134
- "minipass-collect@2.0.1": [
135
- "node_modules/minipass-collect"
116
+ "@npmcli/fs@4.0.0": [
117
+ "node_modules/@npmcli/fs"
136
118
  ],
137
119
  "fs-minipass@3.0.3": [
138
120
  "node_modules/fs-minipass"
139
121
  ],
140
- "p-map@7.0.4": [
141
- "node_modules/p-map"
142
- ],
143
- "@npmcli/fs@4.0.0": [
144
- "node_modules/@npmcli/fs"
122
+ "lru-cache@10.4.3": [
123
+ "node_modules/lru-cache"
145
124
  ],
146
125
  "glob@10.5.0": [
147
126
  "node_modules/glob"
148
127
  ],
149
- "iconv-lite@0.6.3": [
150
- "node_modules/iconv-lite"
128
+ "retry@0.12.0": [
129
+ "node_modules/retry"
151
130
  ],
152
- "debug@4.4.3": [
153
- "node_modules/debug"
131
+ "err-code@2.0.3": [
132
+ "node_modules/err-code"
154
133
  ],
155
- "socks@2.8.8": [
156
- "node_modules/socks"
134
+ "socks-proxy-agent@8.0.5": [
135
+ "node_modules/socks-proxy-agent"
136
+ ],
137
+ "agent-base@7.1.4": [
138
+ "node_modules/agent-base"
139
+ ],
140
+ "http-proxy-agent@7.0.2": [
141
+ "node_modules/http-proxy-agent"
142
+ ],
143
+ "https-proxy-agent@7.0.6": [
144
+ "node_modules/https-proxy-agent"
145
+ ],
146
+ "encoding@0.1.13": [
147
+ "node_modules/encoding"
157
148
  ],
158
149
  "unique-slug@5.0.0": [
159
150
  "node_modules/unique-slug"
@@ -173,39 +164,48 @@
173
164
  "minimatch@9.0.9": [
174
165
  "node_modules/minimatch"
175
166
  ],
176
- "safer-buffer@2.1.2": [
177
- "node_modules/safer-buffer"
178
- ],
179
- "ms@2.1.3": [
180
- "node_modules/ms"
167
+ "debug@4.4.3": [
168
+ "node_modules/debug"
181
169
  ],
182
- "smart-buffer@4.2.0": [
183
- "node_modules/smart-buffer"
170
+ "socks@2.8.9": [
171
+ "node_modules/socks"
184
172
  ],
185
- "ip-address@10.2.0": [
186
- "node_modules/ip-address"
173
+ "iconv-lite@0.6.3": [
174
+ "node_modules/iconv-lite"
187
175
  ],
188
176
  "imurmurhash@0.1.4": [
189
177
  "node_modules/imurmurhash"
190
178
  ],
191
- "signal-exit@4.1.0": [
192
- "node_modules/signal-exit"
193
- ],
194
179
  "which@2.0.2": [
195
180
  "node_modules/cross-spawn/node_modules/which"
196
181
  ],
197
182
  "isexe@2.0.0": [
198
183
  "node_modules/cross-spawn/node_modules/isexe"
199
184
  ],
185
+ "signal-exit@4.1.0": [
186
+ "node_modules/signal-exit"
187
+ ],
200
188
  "@isaacs/cliui@8.0.2": [
201
189
  "node_modules/@isaacs/cliui"
202
190
  ],
203
191
  "@pkgjs/parseargs@0.11.0": [
204
192
  "node_modules/@pkgjs/parseargs"
205
193
  ],
206
- "brace-expansion@2.1.0": [
194
+ "brace-expansion@2.1.1": [
207
195
  "node_modules/brace-expansion"
208
196
  ],
197
+ "ms@2.1.3": [
198
+ "node_modules/ms"
199
+ ],
200
+ "ip-address@10.2.0": [
201
+ "node_modules/ip-address"
202
+ ],
203
+ "smart-buffer@4.2.0": [
204
+ "node_modules/smart-buffer"
205
+ ],
206
+ "safer-buffer@2.1.2": [
207
+ "node_modules/safer-buffer"
208
+ ],
209
209
  "shebang-command@2.0.0": [
210
210
  "node_modules/shebang-command"
211
211
  ],
@@ -260,12 +260,12 @@
260
260
  "color-convert@2.0.1": [
261
261
  "node_modules/color-convert"
262
262
  ],
263
- "eastasianwidth@0.2.0": [
264
- "node_modules/eastasianwidth"
265
- ],
266
263
  "emoji-regex@9.2.2": [
267
264
  "node_modules/emoji-regex"
268
265
  ],
266
+ "eastasianwidth@0.2.0": [
267
+ "node_modules/eastasianwidth"
268
+ ],
269
269
  "color-name@1.1.4": [
270
270
  "node_modules/color-name"
271
271
  ],
@@ -289,7 +289,7 @@
289
289
  "packageManager": "pnpm@10.33.1",
290
290
  "pendingBuilds": [],
291
291
  "publicHoistPattern": [],
292
- "prunedAt": "Mon, 04 May 2026 21:25:54 GMT",
292
+ "prunedAt": "Wed, 27 May 2026 14:56:27 GMT",
293
293
  "registries": {
294
294
  "default": "https://registry.npmjs.org/",
295
295
  "@jsr": "https://npm.jsr.io/"
@@ -8,6 +8,7 @@ overrides:
8
8
  '@yarnpkg/fslib@2': '3'
9
9
  ajv@>=7.0.0-alpha.0 <8.18.0: '>=8.18.0'
10
10
  body-parser@<1.20.3: ^1.20.3
11
+ brace-expansion@>=5.0.0 <5.0.6: '>=5.0.6'
11
12
  clipanion: 3.2.0-rc.6
12
13
  cookie@<0.7.0: '>=0.7.0'
13
14
  cross-spawn@<7.0.5: '>=7.0.5'
@@ -36,14 +37,14 @@ overrides:
36
37
  path-to-regexp@<0.1.12: ^0.1.12
37
38
  path-to-regexp@>=4.0.0 <6.3.0: '>=6.3.0'
38
39
  path-to-regexp@>=7.0.0 <8.0.0: '>=8.0.0'
39
- qs@<6.14.1: '>=6.14.1'
40
+ qs@<=6.15.1: '>=6.15.2'
40
41
  request: npm:postman-request@2.88.1-postman.40
41
42
  semver@<7.5.2: ^7.7.4
42
43
  send@<0.19.0: ^0.19.0
43
44
  serve-static@<1.16.0: ^1.16.0
44
45
  socks@2: ^2.8.1
45
46
  tar@<=7.5.10: '>=7.5.11'
46
- tmp@<=0.2.3: '>=0.2.4'
47
+ tmp@<0.2.6: '>=0.2.6'
47
48
  tough-cookie@<4.1.3: '>=4.1.3'
48
49
  validator@<13.15.22: '>=13.15.22'
49
50
  yaml@<2.2.2: '>=2.2.2'
@@ -109,8 +110,8 @@ packages:
109
110
  balanced-match@1.0.2:
110
111
  resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
111
112
 
112
- brace-expansion@2.1.0:
113
- resolution: {integrity: sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==}
113
+ brace-expansion@2.1.1:
114
+ resolution: {integrity: sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA==}
114
115
 
115
116
  cacache@19.0.1:
116
117
  resolution: {integrity: sha512-hdsUxulXCi5STId78vRVYEtDAjq99ICAUktLTeTYsLoTE6Z8dS0c8pWNCxwdrk9YfJeobDZc2Y186hD/5ZQgFQ==}
@@ -318,8 +319,8 @@ packages:
318
319
  safer-buffer@2.1.2:
319
320
  resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}
320
321
 
321
- semver@7.7.4:
322
- resolution: {integrity: sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==}
322
+ semver@7.8.1:
323
+ resolution: {integrity: sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==}
323
324
  engines: {node: '>=10'}
324
325
  hasBin: true
325
326
 
@@ -343,8 +344,8 @@ packages:
343
344
  resolution: {integrity: sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==}
344
345
  engines: {node: '>= 14'}
345
346
 
346
- socks@2.8.8:
347
- resolution: {integrity: sha512-NlGELfPrgX2f1TAAcz0WawlLn+0r3FyhhCRpFFK2CemXenPYvzMWWZINv3eDNo9ucdwme7oCHRY0Jnbs4aIkog==}
347
+ socks@2.8.9:
348
+ resolution: {integrity: sha512-LJhUYUvItdQ0LkJTmPeaEObWXAqFyfmP85x0tch/ez9cahmhlBBLbIqDFnvBnUJGagb0JbIQrkBs1wJ+yRYpEw==}
348
349
  engines: {node: '>= 10.0.0', npm: '>= 3.0.0'}
349
350
 
350
351
  ssri@12.0.0:
@@ -367,8 +368,8 @@ packages:
367
368
  resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==}
368
369
  engines: {node: '>=12'}
369
370
 
370
- tar@7.5.13:
371
- resolution: {integrity: sha512-tOG/7GyXpFevhXVh8jOPJrmtRpOTsYqUIkVdVooZYJS/z8WhfQUX8RJILmeuJNinGAMSu1veBr4asSHFt5/hng==}
371
+ tar@7.5.15:
372
+ resolution: {integrity: sha512-dzGK0boVlC4W5QFuQN1EFSl3bIDYsk7Tj40U6eIBnK2k/8ml7TZ5agbI5j5+qnoVcAA+rNtBml8SEiLxZpNqRQ==}
372
373
  engines: {node: '>=18'}
373
374
 
374
375
  tinyglobby@0.2.16:
@@ -441,7 +442,7 @@ snapshots:
441
442
 
442
443
  '@npmcli/fs@4.0.0':
443
444
  dependencies:
444
- semver: 7.7.4
445
+ semver: 7.8.1
445
446
  optional: true
446
447
 
447
448
  '@pkgjs/parseargs@0.11.0':
@@ -470,7 +471,7 @@ snapshots:
470
471
  balanced-match@1.0.2:
471
472
  optional: true
472
473
 
473
- brace-expansion@2.1.0:
474
+ brace-expansion@2.1.1:
474
475
  dependencies:
475
476
  balanced-match: 1.0.2
476
477
  optional: true
@@ -487,7 +488,7 @@ snapshots:
487
488
  minipass-pipeline: 1.2.4
488
489
  p-map: 7.0.4
489
490
  ssri: 12.0.0
490
- tar: 7.5.13
491
+ tar: 7.5.15
491
492
  unique-filename: 4.0.0
492
493
  optional: true
493
494
 
@@ -634,7 +635,7 @@ snapshots:
634
635
 
635
636
  minimatch@9.0.9:
636
637
  dependencies:
637
- brace-expansion: 2.1.0
638
+ brace-expansion: 2.1.1
638
639
  optional: true
639
640
 
640
641
  minipass-collect@2.0.1:
@@ -693,8 +694,8 @@ snapshots:
693
694
  make-fetch-happen: 14.0.3
694
695
  nopt: 8.1.0
695
696
  proc-log: 5.0.0
696
- semver: 7.7.4
697
- tar: 7.5.13
697
+ semver: 7.8.1
698
+ tar: 7.5.15
698
699
  tinyglobby: 0.2.16
699
700
  which: 5.0.0
700
701
  transitivePeerDependencies:
@@ -739,7 +740,7 @@ snapshots:
739
740
  safer-buffer@2.1.2:
740
741
  optional: true
741
742
 
742
- semver@7.7.4:
743
+ semver@7.8.1:
743
744
  optional: true
744
745
 
745
746
  shebang-command@2.0.0:
@@ -760,12 +761,12 @@ snapshots:
760
761
  dependencies:
761
762
  agent-base: 7.1.4
762
763
  debug: 4.4.3
763
- socks: 2.8.8
764
+ socks: 2.8.9
764
765
  transitivePeerDependencies:
765
766
  - supports-color
766
767
  optional: true
767
768
 
768
- socks@2.8.8:
769
+ socks@2.8.9:
769
770
  dependencies:
770
771
  ip-address: 10.2.0
771
772
  smart-buffer: 4.2.0
@@ -800,7 +801,7 @@ snapshots:
800
801
  ansi-regex: 6.2.2
801
802
  optional: true
802
803
 
803
- tar@7.5.13:
804
+ tar@7.5.15:
804
805
  dependencies:
805
806
  '@isaacs/fs-minipass': 4.0.1
806
807
  chownr: 3.0.0
@@ -1,5 +1,5 @@
1
1
  {
2
- "lastValidatedTimestamp": 1777929954849,
2
+ "lastValidatedTimestamp": 1779893787941,
3
3
  "projects": {},
4
4
  "pnpmfiles": [],
5
5
  "settings": {
@@ -22,6 +22,7 @@
22
22
  "@yarnpkg/fslib@2": "3",
23
23
  "ajv@>=7.0.0-alpha.0 <8.18.0": ">=8.18.0",
24
24
  "body-parser@<1.20.3": "^1.20.3",
25
+ "brace-expansion@>=5.0.0 <5.0.6": ">=5.0.6",
25
26
  "clipanion": "3.2.0-rc.6",
26
27
  "cookie@<0.7.0": ">=0.7.0",
27
28
  "cross-spawn@<7.0.5": ">=7.0.5",
@@ -50,14 +51,14 @@
50
51
  "path-to-regexp@<0.1.12": "^0.1.12",
51
52
  "path-to-regexp@>=4.0.0 <6.3.0": ">=6.3.0",
52
53
  "path-to-regexp@>=7.0.0 <8.0.0": ">=8.0.0",
53
- "qs@<6.14.1": ">=6.14.1",
54
+ "qs@<=6.15.1": ">=6.15.2",
54
55
  "request": "npm:postman-request@2.88.1-postman.40",
55
56
  "semver@<7.5.2": "^7.7.4",
56
57
  "send@<0.19.0": "^0.19.0",
57
58
  "serve-static@<1.16.0": "^1.16.0",
58
59
  "socks@2": "^2.8.1",
59
60
  "tar@<=7.5.10": ">=7.5.11",
60
- "tmp@<=0.2.3": ">=0.2.4",
61
+ "tmp@<0.2.6": ">=0.2.6",
61
62
  "tough-cookie@<4.1.3": ">=4.1.3",
62
63
  "validator@<13.15.22": ">=13.15.22",
63
64
  "yaml@<2.2.2": ">=2.2.2"
@@ -163,7 +163,7 @@ function expand(str, max, isTop) {
163
163
 
164
164
  N = [];
165
165
 
166
- for (var i = x; test(i, y); i += incr) {
166
+ for (var i = x; test(i, y) && N.length < max; i += incr) {
167
167
  var c;
168
168
  if (isAlphaSequence) {
169
169
  c = String.fromCharCode(i);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "brace-expansion",
3
3
  "description": "Brace expansion as known from sh/bash",
4
- "version": "2.1.0",
4
+ "version": "2.1.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git://github.com/juliangruber/brace-expansion.git"
@@ -46,6 +46,7 @@ const main = () => {
46
46
  a = a.slice(0, indexOfEqualSign)
47
47
  argv.unshift(value)
48
48
  }
49
+
49
50
  switch (a) {
50
51
  case '-rv': case '-rev': case '--rev': case '--reverse':
51
52
  reverse = true
@@ -60,15 +61,10 @@ const main = () => {
60
61
  versions.push(argv.shift())
61
62
  break
62
63
  case '-i': case '--inc': case '--increment':
63
- switch (argv[0]) {
64
- case 'major': case 'minor': case 'patch': case 'prerelease':
65
- case 'premajor': case 'preminor': case 'prepatch':
66
- case 'release':
67
- inc = argv.shift()
68
- break
69
- default:
70
- inc = 'patch'
71
- break
64
+ if (semver.RELEASE_TYPES.includes(argv[0]) || (argv[0] === 'release')) {
65
+ inc = { value: argv.shift(), maybeErrantValue: null, option: a }
66
+ } else {
67
+ inc = { value: 'patch', maybeErrantValue: argv[0], option: a }
72
68
  }
73
69
  break
74
70
  case '--preid':
@@ -102,6 +98,14 @@ const main = () => {
102
98
 
103
99
  options = parseOptions({ loose, includePrerelease, rtl })
104
100
 
101
+ if (
102
+ inc &&
103
+ versions.includes(inc.maybeErrantValue) &&
104
+ !semver.valid(inc.maybeErrantValue, options)
105
+ ) {
106
+ console.warn(`Invalid value for ${inc.option}; defaulting to 'patch'. This may become a failure in future major versions.`)
107
+ }
108
+
105
109
  versions = versions.map((v) => {
106
110
  return coerce ? (semver.coerce(v, options) || { version: v }).version : v
107
111
  }).filter((v) => {
@@ -125,7 +129,7 @@ const main = () => {
125
129
  versions
126
130
  .sort((a, b) => semver[reverse ? 'rcompare' : 'compare'](a, b, options))
127
131
  .map(v => semver.clean(v, options))
128
- .map(v => inc ? semver.inc(v, inc, options, identifier, identifierBase) : v)
132
+ .map(v => inc ? semver.inc(v, inc.value, options, identifier, identifierBase) : v)
129
133
  .forEach(v => console.log(v))
130
134
  }
131
135
 
@@ -98,6 +98,9 @@ class Range {
98
98
  }
99
99
 
100
100
  parseRange (range) {
101
+ // strip build metadata so it can't bleed into the version
102
+ range = range.replace(BUILDSTRIPRE, '')
103
+
101
104
  // memoize range parsing for performance.
102
105
  // this is a very hot path, and fully deterministic.
103
106
  const memoOpts =
@@ -223,6 +226,7 @@ const debug = require('../internal/debug')
223
226
  const SemVer = require('./semver')
224
227
  const {
225
228
  safeRe: re,
229
+ src,
226
230
  t,
227
231
  comparatorTrimReplace,
228
232
  tildeTrimReplace,
@@ -230,6 +234,9 @@ const {
230
234
  } = require('../internal/re')
231
235
  const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')
232
236
 
237
+ // unbounded global build-metadata stripper used by parseRange
238
+ const BUILDSTRIPRE = new RegExp(src[t.BUILD], 'g')
239
+
233
240
  const isNullSet = c => c.value === '<0.0.0-0'
234
241
  const isAny = c => c.value === ''
235
242
 
@@ -0,0 +1,48 @@
1
+ 'use strict'
2
+
3
+ const parse = require('./parse')
4
+ const constants = require('../internal/constants')
5
+ const SemVer = require('../classes/semver')
6
+
7
+ const truncate = (version, truncation, options) => {
8
+ if (!constants.RELEASE_TYPES.includes(truncation)) {
9
+ return null
10
+ }
11
+
12
+ const clonedVersion = cloneInputVersion(version, options)
13
+ return clonedVersion && doTruncation(clonedVersion, truncation)
14
+ }
15
+
16
+ const cloneInputVersion = (version, options) => {
17
+ const versionStringToParse = (
18
+ version instanceof SemVer ? version.version : version
19
+ )
20
+
21
+ return parse(versionStringToParse, options)
22
+ }
23
+
24
+ const doTruncation = (version, truncation) => {
25
+ if (isPrerelease(truncation)) {
26
+ return version.version
27
+ }
28
+
29
+ version.prerelease = []
30
+
31
+ switch (truncation) {
32
+ case 'major':
33
+ version.minor = 0
34
+ version.patch = 0
35
+ break
36
+ case 'minor':
37
+ version.patch = 0
38
+ break
39
+ }
40
+
41
+ return version.format()
42
+ }
43
+
44
+ const isPrerelease = (type) => {
45
+ return type.startsWith('pre')
46
+ }
47
+
48
+ module.exports = truncate
@@ -28,6 +28,7 @@ const gte = require('./functions/gte')
28
28
  const lte = require('./functions/lte')
29
29
  const cmp = require('./functions/cmp')
30
30
  const coerce = require('./functions/coerce')
31
+ const truncate = require('./functions/truncate')
31
32
  const Comparator = require('./classes/comparator')
32
33
  const Range = require('./classes/range')
33
34
  const satisfies = require('./functions/satisfies')
@@ -66,6 +67,7 @@ module.exports = {
66
67
  lte,
67
68
  cmp,
68
69
  coerce,
70
+ truncate,
69
71
  Comparator,
70
72
  Range,
71
73
  satisfies,
@@ -136,7 +136,7 @@ createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)
136
136
  createToken('GTLT', '((?:<|>)?=?)')
137
137
 
138
138
  // Something like "2.*" or "1.2.x".
139
- // Note that "x.x" is a valid xRange identifer, meaning "any version"
139
+ // Note that "x.x" is a valid xRange identifier, meaning "any version"
140
140
  // Only the first item is strictly required.
141
141
  createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`)
142
142
  createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`)
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "semver",
3
- "version": "7.7.4",
3
+ "version": "7.8.1",
4
4
  "description": "The semantic version parser used by npm.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "devDependencies": {
17
17
  "@npmcli/eslint-config": "^6.0.0",
18
- "@npmcli/template-oss": "4.29.0",
18
+ "@npmcli/template-oss": "5.0.0",
19
19
  "benchmark": "^2.1.4",
20
20
  "tap": "^16.0.0"
21
21
  },
@@ -52,7 +52,7 @@
52
52
  "author": "GitHub Inc.",
53
53
  "templateOSS": {
54
54
  "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
55
- "version": "4.29.0",
55
+ "version": "5.0.0",
56
56
  "engines": ">=10",
57
57
  "distPaths": [
58
58
  "classes/",
@@ -10,7 +10,8 @@ nr ::= '0' | [1-9] ( [0-9] ) *
10
10
  tilde ::= '~' partial
11
11
  caret ::= '^' partial
12
12
  qualifier ::= ( '-' pre )? ( '+' build )?
13
- pre ::= parts
14
- build ::= parts
15
- parts ::= part ( '.' part ) *
16
- part ::= nr | [-0-9A-Za-z]+
13
+ pre ::= prepart ( '.' prepart ) *
14
+ prepart ::= nr | alphanumid
15
+ build ::= buildid ( '.' buildid ) *
16
+ alphanumid ::= ( [0-9] ) * [A-Za-z-] [-0-9A-Za-z] *
17
+ buildid ::= [-0-9A-Za-z]+