muhammara 2.2.0 → 2.5.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 (69) hide show
  1. package/CHANGELOG.md +30 -1
  2. package/README.md +2 -2
  3. package/muhammara.d.ts +258 -241
  4. package/muhammara.js +1 -1
  5. package/node_modules/@mapbox/node-pre-gyp/CHANGELOG.md +4 -0
  6. package/node_modules/@mapbox/node-pre-gyp/lib/util/versioning.js +1 -1
  7. package/node_modules/@mapbox/node-pre-gyp/package.json +10 -10
  8. package/node_modules/concat-map/package.json +1 -1
  9. package/node_modules/console-control-strings/package.json +1 -1
  10. package/node_modules/debug/README.md +3 -0
  11. package/node_modules/debug/package.json +5 -5
  12. package/node_modules/debug/src/common.js +1 -1
  13. package/node_modules/delegates/package.json +1 -1
  14. package/node_modules/detect-libc/README.md +124 -42
  15. package/node_modules/detect-libc/index.d.ts +11 -0
  16. package/node_modules/detect-libc/lib/detect-libc.js +166 -80
  17. package/node_modules/detect-libc/lib/process.js +16 -0
  18. package/node_modules/detect-libc/package.json +20 -19
  19. package/node_modules/fs.realpath/package.json +1 -1
  20. package/node_modules/glob/common.js +2 -0
  21. package/node_modules/glob/glob.js +4 -1
  22. package/node_modules/glob/package.json +9 -6
  23. package/node_modules/glob/sync.js +6 -3
  24. package/node_modules/has-unicode/package.json +1 -1
  25. package/node_modules/https-proxy-agent/dist/agent.js +2 -5
  26. package/node_modules/https-proxy-agent/dist/agent.js.map +1 -1
  27. package/node_modules/https-proxy-agent/package.json +5 -5
  28. package/node_modules/inflight/package.json +1 -1
  29. package/node_modules/minimatch/package.json +5 -5
  30. package/node_modules/minipass/LICENSE +1 -1
  31. package/node_modules/minipass/README.md +122 -7
  32. package/node_modules/minipass/index.d.ts +149 -0
  33. package/node_modules/minipass/index.js +191 -102
  34. package/node_modules/minipass/package.json +23 -7
  35. package/node_modules/node-fetch/package.json +5 -5
  36. package/node_modules/object-assign/package.json +1 -1
  37. package/node_modules/once/package.json +1 -1
  38. package/node_modules/path-is-absolute/package.json +1 -1
  39. package/node_modules/semver/README.md +3 -1
  40. package/node_modules/semver/bin/semver.js +19 -9
  41. package/node_modules/semver/classes/comparator.js +3 -2
  42. package/node_modules/semver/classes/index.js +1 -1
  43. package/node_modules/semver/classes/range.js +31 -22
  44. package/node_modules/semver/classes/semver.js +1 -1
  45. package/node_modules/semver/functions/cmp.js +8 -4
  46. package/node_modules/semver/functions/coerce.js +3 -2
  47. package/node_modules/semver/functions/inc.js +4 -1
  48. package/node_modules/semver/functions/parse.js +1 -1
  49. package/node_modules/semver/internal/constants.js +2 -2
  50. package/node_modules/semver/internal/identifiers.js +1 -1
  51. package/node_modules/semver/internal/parse-options.js +3 -3
  52. package/node_modules/semver/internal/re.js +3 -3
  53. package/node_modules/semver/package.json +46 -13
  54. package/node_modules/semver/ranges/min-version.js +2 -1
  55. package/node_modules/semver/ranges/outside.js +1 -1
  56. package/node_modules/semver/ranges/simplify.js +15 -12
  57. package/node_modules/semver/ranges/subset.js +53 -31
  58. package/node_modules/set-blocking/package.json +1 -1
  59. package/node_modules/tr46/package.json +1 -1
  60. package/node_modules/util-deprecate/package.json +1 -1
  61. package/node_modules/webidl-conversions/package.json +1 -1
  62. package/node_modules/whatwg-url/package.json +1 -1
  63. package/node_modules/wrappy/package.json +1 -1
  64. package/package.json +2 -1
  65. package/src/DocumentCopyingContextDriver.cpp +15 -15
  66. package/src/ObjectsContextDriver.cpp +1 -1
  67. package/node_modules/detect-libc/.npmignore +0 -7
  68. package/node_modules/detect-libc/bin/detect-libc.js +0 -18
  69. package/node_modules/semver/CHANGELOG.md +0 -111
@@ -5,7 +5,6 @@ const proc = typeof process === 'object' && process ? process : {
5
5
  }
6
6
  const EE = require('events')
7
7
  const Stream = require('stream')
8
- const Yallist = require('yallist')
9
8
  const SD = require('string_decoder').StringDecoder
10
9
 
11
10
  const EOF = Symbol('EOF')
@@ -27,6 +26,12 @@ const BUFFERPUSH = Symbol('bufferPush')
27
26
  const BUFFERSHIFT = Symbol('bufferShift')
28
27
  const OBJECTMODE = Symbol('objectMode')
29
28
  const DESTROYED = Symbol('destroyed')
29
+ const EMITDATA = Symbol('emitData')
30
+ const EMITEND = Symbol('emitEnd')
31
+ const EMITEND2 = Symbol('emitEnd2')
32
+ const ASYNC = Symbol('async')
33
+
34
+ const defer = fn => Promise.resolve().then(fn)
30
35
 
31
36
  // TODO remove when Node v8 support drops
32
37
  const doIter = global._MP_NO_ITERATOR_SYMBOLS_ !== '1'
@@ -51,14 +56,46 @@ const isArrayBuffer = b => b instanceof ArrayBuffer ||
51
56
 
52
57
  const isArrayBufferView = b => !Buffer.isBuffer(b) && ArrayBuffer.isView(b)
53
58
 
59
+ class Pipe {
60
+ constructor (src, dest, opts) {
61
+ this.src = src
62
+ this.dest = dest
63
+ this.opts = opts
64
+ this.ondrain = () => src[RESUME]()
65
+ dest.on('drain', this.ondrain)
66
+ }
67
+ unpipe () {
68
+ this.dest.removeListener('drain', this.ondrain)
69
+ }
70
+ // istanbul ignore next - only here for the prototype
71
+ proxyErrors () {}
72
+ end () {
73
+ this.unpipe()
74
+ if (this.opts.end)
75
+ this.dest.end()
76
+ }
77
+ }
78
+
79
+ class PipeProxyErrors extends Pipe {
80
+ unpipe () {
81
+ this.src.removeListener('error', this.proxyErrors)
82
+ super.unpipe()
83
+ }
84
+ constructor (src, dest, opts) {
85
+ super(src, dest, opts)
86
+ this.proxyErrors = er => dest.emit('error', er)
87
+ src.on('error', this.proxyErrors)
88
+ }
89
+ }
90
+
54
91
  module.exports = class Minipass extends Stream {
55
92
  constructor (options) {
56
93
  super()
57
94
  this[FLOWING] = false
58
95
  // whether we're explicitly paused
59
96
  this[PAUSED] = false
60
- this.pipes = new Yallist()
61
- this.buffer = new Yallist()
97
+ this.pipes = []
98
+ this.buffer = []
62
99
  this[OBJECTMODE] = options && options.objectMode || false
63
100
  if (this[OBJECTMODE])
64
101
  this[ENCODING] = null
@@ -66,6 +103,7 @@ module.exports = class Minipass extends Stream {
66
103
  this[ENCODING] = options && options.encoding || null
67
104
  if (this[ENCODING] === 'buffer')
68
105
  this[ENCODING] = null
106
+ this[ASYNC] = options && !!options.async || false
69
107
  this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null
70
108
  this[EOF] = false
71
109
  this[EMITTED_END] = false
@@ -105,6 +143,9 @@ module.exports = class Minipass extends Stream {
105
143
  get objectMode () { return this[OBJECTMODE] }
106
144
  set objectMode (om) { this[OBJECTMODE] = this[OBJECTMODE] || !!om }
107
145
 
146
+ get ['async'] () { return this[ASYNC] }
147
+ set ['async'] (a) { this[ASYNC] = this[ASYNC] || !!a }
148
+
108
149
  write (chunk, encoding, cb) {
109
150
  if (this[EOF])
110
151
  throw new Error('write after end')
@@ -123,6 +164,8 @@ module.exports = class Minipass extends Stream {
123
164
  if (!encoding)
124
165
  encoding = 'utf8'
125
166
 
167
+ const fn = this[ASYNC] ? defer : f => f()
168
+
126
169
  // convert array buffers and typed array views into buffers
127
170
  // at some point in the future, we may want to do the opposite!
128
171
  // leave strings and buffers as-is
@@ -137,19 +180,40 @@ module.exports = class Minipass extends Stream {
137
180
  this.objectMode = true
138
181
  }
139
182
 
140
- // this ensures at this point that the chunk is a buffer or string
183
+ // handle object mode up front, since it's simpler
184
+ // this yields better performance, fewer checks later.
185
+ if (this[OBJECTMODE]) {
186
+ /* istanbul ignore if - maybe impossible? */
187
+ if (this.flowing && this[BUFFERLENGTH] !== 0)
188
+ this[FLUSH](true)
189
+
190
+ if (this.flowing)
191
+ this.emit('data', chunk)
192
+ else
193
+ this[BUFFERPUSH](chunk)
194
+
195
+ if (this[BUFFERLENGTH] !== 0)
196
+ this.emit('readable')
197
+
198
+ if (cb)
199
+ fn(cb)
200
+
201
+ return this.flowing
202
+ }
203
+
204
+ // at this point the chunk is a buffer or string
141
205
  // don't buffer it up or send it to the decoder
142
- if (!this.objectMode && !chunk.length) {
206
+ if (!chunk.length) {
143
207
  if (this[BUFFERLENGTH] !== 0)
144
208
  this.emit('readable')
145
209
  if (cb)
146
- cb()
210
+ fn(cb)
147
211
  return this.flowing
148
212
  }
149
213
 
150
214
  // fast-path writing strings of same encoding to a stream with
151
215
  // an empty buffer, skipping the buffer/decoder dance
152
- if (typeof chunk === 'string' && !this[OBJECTMODE] &&
216
+ if (typeof chunk === 'string' &&
153
217
  // unless it is a string already ready for us to use
154
218
  !(encoding === this[ENCODING] && !this[DECODER].lastNeed)) {
155
219
  chunk = Buffer.from(chunk, encoding)
@@ -158,27 +222,20 @@ module.exports = class Minipass extends Stream {
158
222
  if (Buffer.isBuffer(chunk) && this[ENCODING])
159
223
  chunk = this[DECODER].write(chunk)
160
224
 
161
- if (this.flowing) {
162
- // if we somehow have something in the buffer, but we think we're
163
- // flowing, then we need to flush all that out first, or we get
164
- // chunks coming in out of order. Can't emit 'drain' here though,
165
- // because we're mid-write, so that'd be bad.
166
- if (this[BUFFERLENGTH] !== 0)
167
- this[FLUSH](true)
225
+ // Note: flushing CAN potentially switch us into not-flowing mode
226
+ if (this.flowing && this[BUFFERLENGTH] !== 0)
227
+ this[FLUSH](true)
168
228
 
169
- // if we are still flowing after flushing the buffer we can emit the
170
- // chunk otherwise we have to buffer it.
171
- this.flowing
172
- ? this.emit('data', chunk)
173
- : this[BUFFERPUSH](chunk)
174
- } else
229
+ if (this.flowing)
230
+ this.emit('data', chunk)
231
+ else
175
232
  this[BUFFERPUSH](chunk)
176
233
 
177
234
  if (this[BUFFERLENGTH] !== 0)
178
235
  this.emit('readable')
179
236
 
180
237
  if (cb)
181
- cb()
238
+ fn(cb)
182
239
 
183
240
  return this.flowing
184
241
  }
@@ -187,35 +244,31 @@ module.exports = class Minipass extends Stream {
187
244
  if (this[DESTROYED])
188
245
  return null
189
246
 
190
- try {
191
- if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH])
192
- return null
247
+ if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH]) {
248
+ this[MAYBE_EMIT_END]()
249
+ return null
250
+ }
193
251
 
194
- if (this[OBJECTMODE])
195
- n = null
196
-
197
- if (this.buffer.length > 1 && !this[OBJECTMODE]) {
198
- if (this.encoding)
199
- this.buffer = new Yallist([
200
- Array.from(this.buffer).join('')
201
- ])
202
- else
203
- this.buffer = new Yallist([
204
- Buffer.concat(Array.from(this.buffer), this[BUFFERLENGTH])
205
- ])
206
- }
252
+ if (this[OBJECTMODE])
253
+ n = null
207
254
 
208
- return this[READ](n || null, this.buffer.head.value)
209
- } finally {
210
- this[MAYBE_EMIT_END]()
255
+ if (this.buffer.length > 1 && !this[OBJECTMODE]) {
256
+ if (this.encoding)
257
+ this.buffer = [this.buffer.join('')]
258
+ else
259
+ this.buffer = [Buffer.concat(this.buffer, this[BUFFERLENGTH])]
211
260
  }
261
+
262
+ const ret = this[READ](n || null, this.buffer[0])
263
+ this[MAYBE_EMIT_END]()
264
+ return ret
212
265
  }
213
266
 
214
267
  [READ] (n, chunk) {
215
268
  if (n === chunk.length || n === null)
216
269
  this[BUFFERSHIFT]()
217
270
  else {
218
- this.buffer.head.value = chunk.slice(n)
271
+ this.buffer[0] = chunk.slice(n)
219
272
  chunk = chunk.slice(0, n)
220
273
  this[BUFFERLENGTH] -= n
221
274
  }
@@ -291,7 +344,7 @@ module.exports = class Minipass extends Stream {
291
344
  this[BUFFERLENGTH] += 1
292
345
  else
293
346
  this[BUFFERLENGTH] += chunk.length
294
- return this.buffer.push(chunk)
347
+ this.buffer.push(chunk)
295
348
  }
296
349
 
297
350
  [BUFFERSHIFT] () {
@@ -299,7 +352,7 @@ module.exports = class Minipass extends Stream {
299
352
  if (this[OBJECTMODE])
300
353
  this[BUFFERLENGTH] -= 1
301
354
  else
302
- this[BUFFERLENGTH] -= this.buffer.head.value.length
355
+ this[BUFFERLENGTH] -= this.buffer[0].length
303
356
  }
304
357
  return this.buffer.shift()
305
358
  }
@@ -325,35 +378,52 @@ module.exports = class Minipass extends Stream {
325
378
  opts.end = false
326
379
  else
327
380
  opts.end = opts.end !== false
381
+ opts.proxyErrors = !!opts.proxyErrors
328
382
 
329
- const p = { dest: dest, opts: opts, ondrain: _ => this[RESUME]() }
330
- this.pipes.push(p)
331
-
332
- dest.on('drain', p.ondrain)
333
- this[RESUME]()
334
383
  // piping an ended stream ends immediately
335
- if (ended && p.opts.end)
336
- p.dest.end()
384
+ if (ended) {
385
+ if (opts.end)
386
+ dest.end()
387
+ } else {
388
+ this.pipes.push(!opts.proxyErrors ? new Pipe(this, dest, opts)
389
+ : new PipeProxyErrors(this, dest, opts))
390
+ if (this[ASYNC])
391
+ defer(() => this[RESUME]())
392
+ else
393
+ this[RESUME]()
394
+ }
395
+
337
396
  return dest
338
397
  }
339
398
 
399
+ unpipe (dest) {
400
+ const p = this.pipes.find(p => p.dest === dest)
401
+ if (p) {
402
+ this.pipes.splice(this.pipes.indexOf(p), 1)
403
+ p.unpipe()
404
+ }
405
+ }
406
+
340
407
  addListener (ev, fn) {
341
408
  return this.on(ev, fn)
342
409
  }
343
410
 
344
411
  on (ev, fn) {
345
- try {
346
- return super.on(ev, fn)
347
- } finally {
348
- if (ev === 'data' && !this.pipes.length && !this.flowing)
349
- this[RESUME]()
350
- else if (isEndish(ev) && this[EMITTED_END]) {
351
- super.emit(ev)
352
- this.removeAllListeners(ev)
353
- } else if (ev === 'error' && this[EMITTED_ERROR]) {
412
+ const ret = super.on(ev, fn)
413
+ if (ev === 'data' && !this.pipes.length && !this.flowing)
414
+ this[RESUME]()
415
+ else if (ev === 'readable' && this[BUFFERLENGTH] !== 0)
416
+ super.emit('readable')
417
+ else if (isEndish(ev) && this[EMITTED_END]) {
418
+ super.emit(ev)
419
+ this.removeAllListeners(ev)
420
+ } else if (ev === 'error' && this[EMITTED_ERROR]) {
421
+ if (this[ASYNC])
422
+ defer(() => fn.call(this, this[EMITTED_ERROR]))
423
+ else
354
424
  fn.call(this, this[EMITTED_ERROR])
355
- }
356
425
  }
426
+ return ret
357
427
  }
358
428
 
359
429
  get emittedEnd () {
@@ -376,65 +446,84 @@ module.exports = class Minipass extends Stream {
376
446
  }
377
447
  }
378
448
 
379
- emit (ev, data) {
449
+ emit (ev, data, ...extra) {
380
450
  // error and close are only events allowed after calling destroy()
381
451
  if (ev !== 'error' && ev !== 'close' && ev !== DESTROYED && this[DESTROYED])
382
452
  return
383
453
  else if (ev === 'data') {
384
- if (!data)
385
- return
386
-
387
- if (this.pipes.length)
388
- this.pipes.forEach(p =>
389
- p.dest.write(data) === false && this.pause())
454
+ return !data ? false
455
+ : this[ASYNC] ? defer(() => this[EMITDATA](data))
456
+ : this[EMITDATA](data)
390
457
  } else if (ev === 'end') {
391
- // only actual end gets this treatment
392
- if (this[EMITTED_END] === true)
393
- return
394
-
395
- this[EMITTED_END] = true
396
- this.readable = false
397
-
398
- if (this[DECODER]) {
399
- data = this[DECODER].end()
400
- if (data) {
401
- this.pipes.forEach(p => p.dest.write(data))
402
- super.emit('data', data)
403
- }
404
- }
405
-
406
- this.pipes.forEach(p => {
407
- p.dest.removeListener('drain', p.ondrain)
408
- if (p.opts.end)
409
- p.dest.end()
410
- })
458
+ return this[EMITEND]()
411
459
  } else if (ev === 'close') {
412
460
  this[CLOSED] = true
413
461
  // don't emit close before 'end' and 'finish'
414
462
  if (!this[EMITTED_END] && !this[DESTROYED])
415
463
  return
464
+ const ret = super.emit('close')
465
+ this.removeAllListeners('close')
466
+ return ret
416
467
  } else if (ev === 'error') {
417
468
  this[EMITTED_ERROR] = data
469
+ const ret = super.emit('error', data)
470
+ this[MAYBE_EMIT_END]()
471
+ return ret
472
+ } else if (ev === 'resume') {
473
+ const ret = super.emit('resume')
474
+ this[MAYBE_EMIT_END]()
475
+ return ret
476
+ } else if (ev === 'finish' || ev === 'prefinish') {
477
+ const ret = super.emit(ev)
478
+ this.removeAllListeners(ev)
479
+ return ret
418
480
  }
419
481
 
420
- // TODO: replace with a spread operator when Node v4 support drops
421
- const args = new Array(arguments.length)
422
- args[0] = ev
423
- args[1] = data
424
- if (arguments.length > 2) {
425
- for (let i = 2; i < arguments.length; i++) {
426
- args[i] = arguments[i]
482
+ // Some other unknown event
483
+ const ret = super.emit(ev, data, ...extra)
484
+ this[MAYBE_EMIT_END]()
485
+ return ret
486
+ }
487
+
488
+ [EMITDATA] (data) {
489
+ for (const p of this.pipes) {
490
+ if (p.dest.write(data) === false)
491
+ this.pause()
492
+ }
493
+ const ret = super.emit('data', data)
494
+ this[MAYBE_EMIT_END]()
495
+ return ret
496
+ }
497
+
498
+ [EMITEND] () {
499
+ if (this[EMITTED_END])
500
+ return
501
+
502
+ this[EMITTED_END] = true
503
+ this.readable = false
504
+ if (this[ASYNC])
505
+ defer(() => this[EMITEND2]())
506
+ else
507
+ this[EMITEND2]()
508
+ }
509
+
510
+ [EMITEND2] () {
511
+ if (this[DECODER]) {
512
+ const data = this[DECODER].end()
513
+ if (data) {
514
+ for (const p of this.pipes) {
515
+ p.dest.write(data)
516
+ }
517
+ super.emit('data', data)
427
518
  }
428
519
  }
429
520
 
430
- try {
431
- return super.emit.apply(this, args)
432
- } finally {
433
- if (!isEndish(ev))
434
- this[MAYBE_EMIT_END]()
435
- else
436
- this.removeAllListeners(ev)
521
+ for (const p of this.pipes) {
522
+ p.end()
437
523
  }
524
+ const ret = super.emit('end')
525
+ this.removeAllListeners('end')
526
+ return ret
438
527
  }
439
528
 
440
529
  // const all = await stream.collect()
@@ -536,7 +625,7 @@ module.exports = class Minipass extends Stream {
536
625
  this[DESTROYED] = true
537
626
 
538
627
  // throw away all buffered data, it's never coming out
539
- this.buffer = new Yallist()
628
+ this.buffer.length = 0
540
629
  this[BUFFERLENGTH] = 0
541
630
 
542
631
  if (typeof this.close === 'function' && !this[CLOSED])
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "minipass@^3.0.0",
3
- "_id": "minipass@3.1.6",
3
+ "_id": "minipass@3.3.3",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==",
5
+ "_integrity": "sha512-N0BOsdFAlNRfmwMhjAsLVWOk7Ljmeb39iqFlsV1At+jqRhSUP9yeof8FyJu4imaJiSUp8vQebWD/guZwGQC8iA==",
6
6
  "_location": "/minipass",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -20,8 +20,8 @@
20
20
  "/minizlib",
21
21
  "/tar"
22
22
  ],
23
- "_resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz",
24
- "_shasum": "3b8150aa688a711a1521af5e8779c1d3bb4f45ee",
23
+ "_resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.3.tgz",
24
+ "_shasum": "fd1f0e6c06449c10dadda72618b59c00f3d6378d",
25
25
  "_spec": "minipass@^3.0.0",
26
26
  "_where": "/home/runner/work/MuhammaraJS/MuhammaraJS/node_modules/tar",
27
27
  "author": {
@@ -39,14 +39,19 @@
39
39
  "deprecated": false,
40
40
  "description": "minimal implementation of a PassThrough stream",
41
41
  "devDependencies": {
42
+ "@types/node": "^17.0.41",
42
43
  "end-of-stream": "^1.4.0",
43
- "tap": "^15.0.9",
44
- "through2": "^2.0.3"
44
+ "prettier": "^2.6.2",
45
+ "tap": "^16.2.0",
46
+ "through2": "^2.0.3",
47
+ "ts-node": "^10.8.1",
48
+ "typescript": "^4.7.3"
45
49
  },
46
50
  "engines": {
47
51
  "node": ">=8"
48
52
  },
49
53
  "files": [
54
+ "index.d.ts",
50
55
  "index.js"
51
56
  ],
52
57
  "homepage": "https://github.com/isaacs/minipass#readme",
@@ -57,6 +62,17 @@
57
62
  "license": "ISC",
58
63
  "main": "index.js",
59
64
  "name": "minipass",
65
+ "prettier": {
66
+ "semi": false,
67
+ "printWidth": 80,
68
+ "tabWidth": 2,
69
+ "useTabs": false,
70
+ "singleQuote": true,
71
+ "jsxSingleQuote": false,
72
+ "bracketSameLine": true,
73
+ "arrowParens": "avoid",
74
+ "endOfLine": "lf"
75
+ },
60
76
  "repository": {
61
77
  "type": "git",
62
78
  "url": "git+https://github.com/isaacs/minipass.git"
@@ -70,5 +86,5 @@
70
86
  "tap": {
71
87
  "check-coverage": true
72
88
  },
73
- "version": "3.1.6"
89
+ "version": "3.3.3"
74
90
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "_from": "node-fetch@^2.6.5",
2
+ "_from": "node-fetch@^2.6.7",
3
3
  "_id": "node-fetch@2.6.7",
4
4
  "_inBundle": false,
5
5
  "_integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
@@ -8,19 +8,19 @@
8
8
  "_requested": {
9
9
  "type": "range",
10
10
  "registry": true,
11
- "raw": "node-fetch@^2.6.5",
11
+ "raw": "node-fetch@^2.6.7",
12
12
  "name": "node-fetch",
13
13
  "escapedName": "node-fetch",
14
- "rawSpec": "^2.6.5",
14
+ "rawSpec": "^2.6.7",
15
15
  "saveSpec": null,
16
- "fetchSpec": "^2.6.5"
16
+ "fetchSpec": "^2.6.7"
17
17
  },
18
18
  "_requiredBy": [
19
19
  "/@mapbox/node-pre-gyp"
20
20
  ],
21
21
  "_resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
22
22
  "_shasum": "24de9fba827e3b4ae44dc8b20256a379160052ad",
23
- "_spec": "node-fetch@^2.6.5",
23
+ "_spec": "node-fetch@^2.6.7",
24
24
  "_where": "/home/runner/work/MuhammaraJS/MuhammaraJS/node_modules/@mapbox/node-pre-gyp",
25
25
  "author": {
26
26
  "name": "David Frank"
@@ -2,7 +2,7 @@
2
2
  "_from": "object-assign@^4.1.1",
3
3
  "_id": "object-assign@4.1.1",
4
4
  "_inBundle": false,
5
- "_integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
5
+ "_integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
6
6
  "_location": "/object-assign",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -2,7 +2,7 @@
2
2
  "_from": "once@^1.3.0",
3
3
  "_id": "once@1.4.0",
4
4
  "_inBundle": false,
5
- "_integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
5
+ "_integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
6
6
  "_location": "/once",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -2,7 +2,7 @@
2
2
  "_from": "path-is-absolute@^1.0.0",
3
3
  "_id": "path-is-absolute@1.0.1",
4
4
  "_inBundle": false,
5
- "_integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
5
+ "_integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
6
6
  "_location": "/path-is-absolute",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -264,7 +264,9 @@ provided tuple parts.
264
264
  Any of `X`, `x`, or `*` may be used to "stand in" for one of the
265
265
  numeric values in the `[major, minor, patch]` tuple.
266
266
 
267
- * `*` := `>=0.0.0` (Any version satisfies)
267
+ * `*` := `>=0.0.0` (Any non-prerelease version satisfies, unless
268
+ `includePrerelease` is specified, in which case any version at all
269
+ satisfies)
268
270
  * `1.x` := `>=1.0.0 <2.0.0-0` (Matching major version)
269
271
  * `1.2.x` := `>=1.2.0 <1.3.0-0` (Matching major and minor versions)
270
272
 
@@ -27,16 +27,19 @@ 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('=')
37
39
  if (indexOfEqualSign !== -1) {
40
+ const value = a.slice(indexOfEqualSign + 1)
38
41
  a = a.slice(0, indexOfEqualSign)
39
- argv.unshift(a.slice(indexOfEqualSign + 1))
42
+ argv.unshift(value)
40
43
  }
41
44
  switch (a) {
42
45
  case '-rv': case '-rev': case '--rev': case '--reverse':
@@ -85,26 +88,31 @@ const main = () => {
85
88
  }
86
89
  }
87
90
 
88
- const options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl }
91
+ options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl }
89
92
 
90
93
  versions = versions.map((v) => {
91
94
  return coerce ? (semver.coerce(v, options) || { version: v }).version : v
92
95
  }).filter((v) => {
93
96
  return semver.valid(v)
94
97
  })
95
- if (!versions.length) return fail()
96
- if (inc && (versions.length !== 1 || range.length)) { return failInc() }
98
+ if (!versions.length) {
99
+ return fail()
100
+ }
101
+ if (inc && (versions.length !== 1 || range.length)) {
102
+ return failInc()
103
+ }
97
104
 
98
105
  for (let i = 0, l = range.length; i < l; i++) {
99
106
  versions = versions.filter((v) => {
100
107
  return semver.satisfies(v, range[i], options)
101
108
  })
102
- if (!versions.length) return fail()
109
+ if (!versions.length) {
110
+ return fail()
111
+ }
103
112
  }
104
113
  return success(versions)
105
114
  }
106
115
 
107
-
108
116
  const failInc = () => {
109
117
  console.error('--inc can only be used on a single version with no range')
110
118
  fail()
@@ -120,7 +128,9 @@ const success = () => {
120
128
  return semver.clean(v, options)
121
129
  }).map((v) => {
122
130
  return inc ? semver.inc(v, inc, options, identifier) : v
123
- }).forEach((v, i, _) => { console.log(v) })
131
+ }).forEach((v, i, _) => {
132
+ console.log(v)
133
+ })
124
134
  }
125
135
 
126
136
  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')