pnpm 6.32.4 → 6.32.5

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 (27) hide show
  1. package/dist/node_modules/.modules.yaml +1 -1
  2. package/dist/node_modules/.pnpm/lock.yaml +15 -9
  3. package/dist/node_modules/graceful-fs/LICENSE +1 -1
  4. package/dist/node_modules/graceful-fs/graceful-fs.js +23 -4
  5. package/dist/node_modules/graceful-fs/package.json +1 -1
  6. package/dist/node_modules/graceful-fs/polyfills.js +35 -28
  7. package/dist/node_modules/semver/bin/semver.js +17 -8
  8. package/dist/node_modules/semver/classes/comparator.js +3 -2
  9. package/dist/node_modules/semver/classes/index.js +1 -1
  10. package/dist/node_modules/semver/classes/range.js +31 -22
  11. package/dist/node_modules/semver/functions/cmp.js +8 -4
  12. package/dist/node_modules/semver/functions/coerce.js +3 -2
  13. package/dist/node_modules/semver/functions/parse.js +1 -1
  14. package/dist/node_modules/semver/internal/constants.js +2 -2
  15. package/dist/node_modules/semver/internal/identifiers.js +1 -1
  16. package/dist/node_modules/semver/internal/parse-options.js +3 -3
  17. package/dist/node_modules/semver/internal/re.js +3 -3
  18. package/dist/node_modules/semver/node_modules/lru-cache/LICENSE +15 -0
  19. package/dist/node_modules/semver/node_modules/lru-cache/index.js +798 -0
  20. package/dist/node_modules/semver/node_modules/lru-cache/package.json +44 -0
  21. package/dist/node_modules/semver/package.json +46 -13
  22. package/dist/node_modules/semver/ranges/min-version.js +2 -1
  23. package/dist/node_modules/semver/ranges/outside.js +1 -1
  24. package/dist/node_modules/semver/ranges/simplify.js +15 -12
  25. package/dist/node_modules/semver/ranges/subset.js +53 -31
  26. package/dist/pnpm.cjs +2 -2
  27. package/package.json +2 -2
@@ -11,7 +11,7 @@ packageManager: pnpm@7.0.0-alpha.2
11
11
  pendingBuilds:
12
12
  - /node-gyp/8.4.1
13
13
  - /encoding/0.1.13
14
- prunedAt: Thu, 31 Mar 2022 15:39:08 GMT
14
+ prunedAt: Thu, 07 Apr 2022 19:00:53 GMT
15
15
  publicHoistPattern:
16
16
  - '*types*'
17
17
  - '*eslint*'
@@ -17,7 +17,7 @@ packages:
17
17
  resolution: {integrity: sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==}
18
18
  dependencies:
19
19
  '@gar/promisify': 1.1.3
20
- semver: 7.3.5
20
+ semver: 7.3.6
21
21
  dev: false
22
22
  optional: true
23
23
 
@@ -246,8 +246,8 @@ packages:
246
246
  dev: false
247
247
  optional: true
248
248
 
249
- /graceful-fs/4.2.9:
250
- resolution: {integrity: sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==}
249
+ /graceful-fs/4.2.10:
250
+ resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==}
251
251
  dev: false
252
252
  optional: true
253
253
 
@@ -358,6 +358,12 @@ packages:
358
358
  dev: false
359
359
  optional: true
360
360
 
361
+ /lru-cache/7.7.3:
362
+ resolution: {integrity: sha512-WY9wjJNQt9+PZilnLbuFKM+SwDull9+6IAguOrarOMoOHTcJ9GnXSO11+Gw6c7xtDkBkthR57OZMtZKYr+1CEw==}
363
+ engines: {node: '>=12'}
364
+ dev: false
365
+ optional: true
366
+
361
367
  /make-fetch-happen/9.1.0:
362
368
  resolution: {integrity: sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==}
363
369
  engines: {node: '>= 10'}
@@ -482,12 +488,12 @@ packages:
482
488
  dependencies:
483
489
  env-paths: 2.2.1
484
490
  glob: 7.2.0
485
- graceful-fs: 4.2.9
491
+ graceful-fs: 4.2.10
486
492
  make-fetch-happen: 9.1.0
487
493
  nopt: 5.0.0
488
494
  npmlog: 6.0.1
489
495
  rimraf: 3.0.2
490
- semver: 7.3.5
496
+ semver: 7.3.6
491
497
  tar: 6.1.11
492
498
  which: 2.0.2
493
499
  transitivePeerDependencies:
@@ -584,12 +590,12 @@ packages:
584
590
  dev: false
585
591
  optional: true
586
592
 
587
- /semver/7.3.5:
588
- resolution: {integrity: sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==}
589
- engines: {node: '>=10'}
593
+ /semver/7.3.6:
594
+ resolution: {integrity: sha512-HZWqcgwLsjaX1HBD31msI/rXktuIhS+lWvdE4kN9z+8IVT4Itc7vqU2WvYsyD6/sjYCt4dEKH/m1M3dwI9CC5w==}
595
+ engines: {node: ^10.0.0 || ^12.0.0 || ^14.0.0 || >=16.0.0}
590
596
  hasBin: true
591
597
  dependencies:
592
- lru-cache: 6.0.0
598
+ lru-cache: 7.7.3
593
599
  dev: false
594
600
  optional: true
595
601
 
@@ -1,6 +1,6 @@
1
1
  The ISC License
2
2
 
3
- Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors
3
+ Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors
4
4
 
5
5
  Permission to use, copy, modify, and/or distribute this software for any
6
6
  purpose with or without fee is hereby granted, provided that the above
@@ -191,16 +191,35 @@ function patch (fs) {
191
191
 
192
192
  var fs$readdir = fs.readdir
193
193
  fs.readdir = readdir
194
+ var noReaddirOptionVersions = /^v[0-5]\./
194
195
  function readdir (path, options, cb) {
195
196
  if (typeof options === 'function')
196
197
  cb = options, options = null
197
198
 
199
+ var go$readdir = noReaddirOptionVersions.test(process.version)
200
+ ? function go$readdir (path, options, cb, startTime) {
201
+ return fs$readdir(path, fs$readdirCallback(
202
+ path, options, cb, startTime
203
+ ))
204
+ }
205
+ : function go$readdir (path, options, cb, startTime) {
206
+ return fs$readdir(path, options, fs$readdirCallback(
207
+ path, options, cb, startTime
208
+ ))
209
+ }
210
+
198
211
  return go$readdir(path, options, cb)
199
212
 
200
- function go$readdir (path, options, cb, startTime) {
201
- return fs$readdir(path, options, function (err, files) {
213
+ function fs$readdirCallback (path, options, cb, startTime) {
214
+ return function (err, files) {
202
215
  if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
203
- enqueue([go$readdir, [path, options, cb], err, startTime || Date.now(), Date.now()])
216
+ enqueue([
217
+ go$readdir,
218
+ [path, options, cb],
219
+ err,
220
+ startTime || Date.now(),
221
+ Date.now()
222
+ ])
204
223
  else {
205
224
  if (files && files.sort)
206
225
  files.sort()
@@ -208,7 +227,7 @@ function patch (fs) {
208
227
  if (typeof cb === 'function')
209
228
  cb.call(this, err, files)
210
229
  }
211
- })
230
+ }
212
231
  }
213
232
  }
214
233
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "graceful-fs",
3
3
  "description": "A drop-in replacement for fs, making various improvements.",
4
- "version": "4.2.9",
4
+ "version": "4.2.10",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/isaacs/node-graceful-fs"
@@ -71,13 +71,13 @@ function patch (fs) {
71
71
  fs.lstatSync = statFixSync(fs.lstatSync)
72
72
 
73
73
  // if lchmod/lchown do not exist, then make them no-ops
74
- if (!fs.lchmod) {
74
+ if (fs.chmod && !fs.lchmod) {
75
75
  fs.lchmod = function (path, mode, cb) {
76
76
  if (cb) process.nextTick(cb)
77
77
  }
78
78
  fs.lchmodSync = function () {}
79
79
  }
80
- if (!fs.lchown) {
80
+ if (fs.chown && !fs.lchown) {
81
81
  fs.lchown = function (path, uid, gid, cb) {
82
82
  if (cb) process.nextTick(cb)
83
83
  }
@@ -94,32 +94,38 @@ function patch (fs) {
94
94
  // CPU to a busy looping process, which can cause the program causing the lock
95
95
  // contention to be starved of CPU by node, so the contention doesn't resolve.
96
96
  if (platform === "win32") {
97
- fs.rename = (function (fs$rename) { return function (from, to, cb) {
98
- var start = Date.now()
99
- var backoff = 0;
100
- fs$rename(from, to, function CB (er) {
101
- if (er
102
- && (er.code === "EACCES" || er.code === "EPERM")
103
- && Date.now() - start < 60000) {
104
- setTimeout(function() {
105
- fs.stat(to, function (stater, st) {
106
- if (stater && stater.code === "ENOENT")
107
- fs$rename(from, to, CB);
108
- else
109
- cb(er)
110
- })
111
- }, backoff)
112
- if (backoff < 100)
113
- backoff += 10;
114
- return;
115
- }
116
- if (cb) cb(er)
117
- })
118
- }})(fs.rename)
97
+ fs.rename = typeof fs.rename !== 'function' ? fs.rename
98
+ : (function (fs$rename) {
99
+ function rename (from, to, cb) {
100
+ var start = Date.now()
101
+ var backoff = 0;
102
+ fs$rename(from, to, function CB (er) {
103
+ if (er
104
+ && (er.code === "EACCES" || er.code === "EPERM")
105
+ && Date.now() - start < 60000) {
106
+ setTimeout(function() {
107
+ fs.stat(to, function (stater, st) {
108
+ if (stater && stater.code === "ENOENT")
109
+ fs$rename(from, to, CB);
110
+ else
111
+ cb(er)
112
+ })
113
+ }, backoff)
114
+ if (backoff < 100)
115
+ backoff += 10;
116
+ return;
117
+ }
118
+ if (cb) cb(er)
119
+ })
120
+ }
121
+ if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename)
122
+ return rename
123
+ })(fs.rename)
119
124
  }
120
125
 
121
126
  // if read() returns EAGAIN, then just try it again.
122
- fs.read = (function (fs$read) {
127
+ fs.read = typeof fs.read !== 'function' ? fs.read
128
+ : (function (fs$read) {
123
129
  function read (fd, buffer, offset, length, position, callback_) {
124
130
  var callback
125
131
  if (callback_ && typeof callback_ === 'function') {
@@ -140,7 +146,8 @@ function patch (fs) {
140
146
  return read
141
147
  })(fs.read)
142
148
 
143
- fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) {
149
+ fs.readSync = typeof fs.readSync !== 'function' ? fs.readSync
150
+ : (function (fs$readSync) { return function (fd, buffer, offset, length, position) {
144
151
  var eagCounter = 0
145
152
  while (true) {
146
153
  try {
@@ -199,7 +206,7 @@ function patch (fs) {
199
206
  }
200
207
 
201
208
  function patchLutimes (fs) {
202
- if (constants.hasOwnProperty("O_SYMLINK")) {
209
+ if (constants.hasOwnProperty("O_SYMLINK") && fs.futimes) {
203
210
  fs.lutimes = function (path, at, mt, cb) {
204
211
  fs.open(path, constants.O_SYMLINK, function (er, fd) {
205
212
  if (er) {
@@ -233,7 +240,7 @@ function patch (fs) {
233
240
  return ret
234
241
  }
235
242
 
236
- } else {
243
+ } else if (fs.futimes) {
237
244
  fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) }
238
245
  fs.lutimesSync = function () {}
239
246
  }
@@ -27,10 +27,12 @@ const semver = require('../')
27
27
 
28
28
  let reverse = false
29
29
 
30
- const options = {}
30
+ let options = {}
31
31
 
32
32
  const main = () => {
33
- if (!argv.length) return help()
33
+ if (!argv.length) {
34
+ return help()
35
+ }
34
36
  while (argv.length) {
35
37
  let a = argv.shift()
36
38
  const indexOfEqualSign = a.indexOf('=')
@@ -85,26 +87,31 @@ const main = () => {
85
87
  }
86
88
  }
87
89
 
88
- const options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl }
90
+ options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl }
89
91
 
90
92
  versions = versions.map((v) => {
91
93
  return coerce ? (semver.coerce(v, options) || { version: v }).version : v
92
94
  }).filter((v) => {
93
95
  return semver.valid(v)
94
96
  })
95
- if (!versions.length) return fail()
96
- if (inc && (versions.length !== 1 || range.length)) { return failInc() }
97
+ if (!versions.length) {
98
+ return fail()
99
+ }
100
+ if (inc && (versions.length !== 1 || range.length)) {
101
+ return failInc()
102
+ }
97
103
 
98
104
  for (let i = 0, l = range.length; i < l; i++) {
99
105
  versions = versions.filter((v) => {
100
106
  return semver.satisfies(v, range[i], options)
101
107
  })
102
- if (!versions.length) return fail()
108
+ if (!versions.length) {
109
+ return fail()
110
+ }
103
111
  }
104
112
  return success(versions)
105
113
  }
106
114
 
107
-
108
115
  const failInc = () => {
109
116
  console.error('--inc can only be used on a single version with no range')
110
117
  fail()
@@ -120,7 +127,9 @@ const success = () => {
120
127
  return semver.clean(v, options)
121
128
  }).map((v) => {
122
129
  return inc ? semver.inc(v, inc, options, identifier) : v
123
- }).forEach((v, i, _) => { console.log(v) })
130
+ }).forEach((v, i, _) => {
131
+ console.log(v)
132
+ })
124
133
  }
125
134
 
126
135
  const help = () => console.log(
@@ -4,6 +4,7 @@ class Comparator {
4
4
  static get ANY () {
5
5
  return ANY
6
6
  }
7
+
7
8
  constructor (comp, options) {
8
9
  options = parseOptions(options)
9
10
 
@@ -80,7 +81,7 @@ class Comparator {
80
81
  if (!options || typeof options !== 'object') {
81
82
  options = {
82
83
  loose: !!options,
83
- includePrerelease: false
84
+ includePrerelease: false,
84
85
  }
85
86
  }
86
87
 
@@ -128,7 +129,7 @@ class Comparator {
128
129
  module.exports = Comparator
129
130
 
130
131
  const parseOptions = require('../internal/parse-options')
131
- const {re, t} = require('../internal/re')
132
+ const { re, t } = require('../internal/re')
132
133
  const cmp = require('../functions/cmp')
133
134
  const debug = require('../internal/debug')
134
135
  const SemVer = require('./semver')
@@ -1,5 +1,5 @@
1
1
  module.exports = {
2
2
  SemVer: require('./semver.js'),
3
3
  Range: require('./range.js'),
4
- Comparator: require('./comparator.js')
4
+ Comparator: require('./comparator.js'),
5
5
  }
@@ -29,9 +29,9 @@ class Range {
29
29
  // First, split based on boolean or ||
30
30
  this.raw = range
31
31
  this.set = range
32
- .split(/\s*\|\|\s*/)
32
+ .split('||')
33
33
  // map the range to a 2d array of comparators
34
- .map(range => this.parseRange(range.trim()))
34
+ .map(r => this.parseRange(r.trim()))
35
35
  // throw out any comparator lists that are empty
36
36
  // this generally means that it was not a valid range, which is allowed
37
37
  // in loose mode, but will still throw if the WHOLE range is invalid.
@@ -46,9 +46,9 @@ class Range {
46
46
  // keep the first one, in case they're all null sets
47
47
  const first = this.set[0]
48
48
  this.set = this.set.filter(c => !isNullSet(c[0]))
49
- if (this.set.length === 0)
49
+ if (this.set.length === 0) {
50
50
  this.set = [first]
51
- else if (this.set.length > 1) {
51
+ } else if (this.set.length > 1) {
52
52
  // if we have any that are *, then the range is just *
53
53
  for (const c of this.set) {
54
54
  if (c.length === 1 && isAny(c[0])) {
@@ -84,8 +84,9 @@ class Range {
84
84
  const memoOpts = Object.keys(this.options).join(',')
85
85
  const memoKey = `parseRange:${memoOpts}:${range}`
86
86
  const cached = cache.get(memoKey)
87
- if (cached)
87
+ if (cached) {
88
88
  return cached
89
+ }
89
90
 
90
91
  const loose = this.options.loose
91
92
  // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
@@ -94,7 +95,7 @@ class Range {
94
95
  debug('hyphen replace', range)
95
96
  // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
96
97
  range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)
97
- debug('comparator trim', range, re[t.COMPARATORTRIM])
98
+ debug('comparator trim', range)
98
99
 
99
100
  // `~ 1.2.3` => `~1.2.3`
100
101
  range = range.replace(re[t.TILDETRIM], tildeTrimReplace)
@@ -108,30 +109,37 @@ class Range {
108
109
  // At this point, the range is completely trimmed and
109
110
  // ready to be split into comparators.
110
111
 
111
- const compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
112
- const rangeList = range
112
+ let rangeList = range
113
113
  .split(' ')
114
114
  .map(comp => parseComparator(comp, this.options))
115
115
  .join(' ')
116
116
  .split(/\s+/)
117
117
  // >=0.0.0 is equivalent to *
118
118
  .map(comp => replaceGTE0(comp, this.options))
119
+
120
+ if (loose) {
119
121
  // in loose mode, throw out any that are not valid comparators
120
- .filter(this.options.loose ? comp => !!comp.match(compRe) : () => true)
121
- .map(comp => new Comparator(comp, this.options))
122
+ rangeList = rangeList.filter(comp => {
123
+ debug('loose invalid filter', comp, this.options)
124
+ return !!comp.match(re[t.COMPARATORLOOSE])
125
+ })
126
+ }
127
+ debug('range list', rangeList)
122
128
 
123
129
  // if any comparators are the null set, then replace with JUST null set
124
130
  // if more than one comparator, remove any * comparators
125
131
  // also, don't include the same comparator more than once
126
- const l = rangeList.length
127
132
  const rangeMap = new Map()
128
- for (const comp of rangeList) {
129
- if (isNullSet(comp))
133
+ const comparators = rangeList.map(comp => new Comparator(comp, this.options))
134
+ for (const comp of comparators) {
135
+ if (isNullSet(comp)) {
130
136
  return [comp]
137
+ }
131
138
  rangeMap.set(comp.value, comp)
132
139
  }
133
- if (rangeMap.size > 1 && rangeMap.has(''))
140
+ if (rangeMap.size > 1 && rangeMap.has('')) {
134
141
  rangeMap.delete('')
142
+ }
135
143
 
136
144
  const result = [...rangeMap.values()]
137
145
  cache.set(memoKey, result)
@@ -196,7 +204,7 @@ const {
196
204
  t,
197
205
  comparatorTrimReplace,
198
206
  tildeTrimReplace,
199
- caretTrimReplace
207
+ caretTrimReplace,
200
208
  } = require('../internal/re')
201
209
 
202
210
  const isNullSet = c => c.value === '<0.0.0-0'
@@ -245,8 +253,8 @@ const isX = id => !id || id.toLowerCase() === 'x' || id === '*'
245
253
  // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0
246
254
  // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0
247
255
  const replaceTildes = (comp, options) =>
248
- comp.trim().split(/\s+/).map((comp) => {
249
- return replaceTilde(comp, options)
256
+ comp.trim().split(/\s+/).map((c) => {
257
+ return replaceTilde(c, options)
250
258
  }).join(' ')
251
259
 
252
260
  const replaceTilde = (comp, options) => {
@@ -284,8 +292,8 @@ const replaceTilde = (comp, options) => {
284
292
  // ^1.2.3 --> >=1.2.3 <2.0.0-0
285
293
  // ^1.2.0 --> >=1.2.0 <2.0.0-0
286
294
  const replaceCarets = (comp, options) =>
287
- comp.trim().split(/\s+/).map((comp) => {
288
- return replaceCaret(comp, options)
295
+ comp.trim().split(/\s+/).map((c) => {
296
+ return replaceCaret(c, options)
289
297
  }).join(' ')
290
298
 
291
299
  const replaceCaret = (comp, options) => {
@@ -343,8 +351,8 @@ const replaceCaret = (comp, options) => {
343
351
 
344
352
  const replaceXRanges = (comp, options) => {
345
353
  debug('replaceXRanges', comp, options)
346
- return comp.split(/\s+/).map((comp) => {
347
- return replaceXRange(comp, options)
354
+ return comp.split(/\s+/).map((c) => {
355
+ return replaceXRange(c, options)
348
356
  }).join(' ')
349
357
  }
350
358
 
@@ -405,8 +413,9 @@ const replaceXRange = (comp, options) => {
405
413
  }
406
414
  }
407
415
 
408
- if (gtlt === '<')
416
+ if (gtlt === '<') {
409
417
  pr = '-0'
418
+ }
410
419
 
411
420
  ret = `${gtlt + M}.${m}.${p}${pr}`
412
421
  } else if (xm) {
@@ -8,17 +8,21 @@ const lte = require('./lte')
8
8
  const cmp = (a, op, b, loose) => {
9
9
  switch (op) {
10
10
  case '===':
11
- if (typeof a === 'object')
11
+ if (typeof a === 'object') {
12
12
  a = a.version
13
- if (typeof b === 'object')
13
+ }
14
+ if (typeof b === 'object') {
14
15
  b = b.version
16
+ }
15
17
  return a === b
16
18
 
17
19
  case '!==':
18
- if (typeof a === 'object')
20
+ if (typeof a === 'object') {
19
21
  a = a.version
20
- if (typeof b === 'object')
22
+ }
23
+ if (typeof b === 'object') {
21
24
  b = b.version
25
+ }
22
26
  return a !== b
23
27
 
24
28
  case '':
@@ -1,6 +1,6 @@
1
1
  const SemVer = require('../classes/semver')
2
2
  const parse = require('./parse')
3
- const {re, t} = require('../internal/re')
3
+ const { re, t } = require('../internal/re')
4
4
 
5
5
  const coerce = (version, options) => {
6
6
  if (version instanceof SemVer) {
@@ -43,8 +43,9 @@ const coerce = (version, options) => {
43
43
  re[t.COERCERTL].lastIndex = -1
44
44
  }
45
45
 
46
- if (match === null)
46
+ if (match === null) {
47
47
  return null
48
+ }
48
49
 
49
50
  return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options)
50
51
  }
@@ -1,4 +1,4 @@
1
- const {MAX_LENGTH} = require('../internal/constants')
1
+ const { MAX_LENGTH } = require('../internal/constants')
2
2
  const { re, t } = require('../internal/re')
3
3
  const SemVer = require('../classes/semver')
4
4
 
@@ -4,7 +4,7 @@ const SEMVER_SPEC_VERSION = '2.0.0'
4
4
 
5
5
  const MAX_LENGTH = 256
6
6
  const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
7
- /* istanbul ignore next */ 9007199254740991
7
+ /* istanbul ignore next */ 9007199254740991
8
8
 
9
9
  // Max safe segment length for coercion.
10
10
  const MAX_SAFE_COMPONENT_LENGTH = 16
@@ -13,5 +13,5 @@ module.exports = {
13
13
  SEMVER_SPEC_VERSION,
14
14
  MAX_LENGTH,
15
15
  MAX_SAFE_INTEGER,
16
- MAX_SAFE_COMPONENT_LENGTH
16
+ MAX_SAFE_COMPONENT_LENGTH,
17
17
  }
@@ -19,5 +19,5 @@ const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)
19
19
 
20
20
  module.exports = {
21
21
  compareIdentifiers,
22
- rcompareIdentifiers
22
+ rcompareIdentifiers,
23
23
  }
@@ -4,8 +4,8 @@ const opts = ['includePrerelease', 'loose', 'rtl']
4
4
  const parseOptions = options =>
5
5
  !options ? {}
6
6
  : typeof options !== 'object' ? { loose: true }
7
- : opts.filter(k => options[k]).reduce((options, k) => {
8
- options[k] = true
9
- return options
7
+ : opts.filter(k => options[k]).reduce((o, k) => {
8
+ o[k] = true
9
+ return o
10
10
  }, {})
11
11
  module.exports = parseOptions
@@ -10,7 +10,7 @@ let R = 0
10
10
 
11
11
  const createToken = (name, value, isGlobal) => {
12
12
  const index = R++
13
- debug(index, value)
13
+ debug(name, index, value)
14
14
  t[name] = index
15
15
  src[index] = value
16
16
  re[index] = new RegExp(value, isGlobal ? 'g' : undefined)
@@ -178,5 +178,5 @@ createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` +
178
178
  // Star ranges basically just allow anything at all.
179
179
  createToken('STAR', '(<|>)?=?\\s*\\*')
180
180
  // >=0.0.0 is like a star
181
- createToken('GTE0', '^\\s*>=\\s*0\.0\.0\\s*$')
182
- createToken('GTE0PRE', '^\\s*>=\\s*0\.0\.0-0\\s*$')
181
+ createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$')
182
+ createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$')
@@ -0,0 +1,15 @@
1
+ The ISC License
2
+
3
+ Copyright (c) 2010-2022 Isaac Z. Schlueter and Contributors
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15
+ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.