muhammara 2.0.0 → 2.3.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 (111) hide show
  1. package/CHANGELOG.md +28 -1
  2. package/README.md +2 -2
  3. package/node_modules/@mapbox/node-pre-gyp/CHANGELOG.md +10 -0
  4. package/node_modules/@mapbox/node-pre-gyp/lib/util/abi_crosswalk.json +16 -0
  5. package/node_modules/@mapbox/node-pre-gyp/lib/util/versioning.js +1 -1
  6. package/node_modules/@mapbox/node-pre-gyp/package.json +10 -11
  7. package/node_modules/ansi-regex/index.d.ts +37 -0
  8. package/node_modules/ansi-regex/index.js +4 -4
  9. package/node_modules/ansi-regex/package.json +17 -15
  10. package/node_modules/ansi-regex/readme.md +35 -3
  11. package/node_modules/brace-expansion/package.json +2 -1
  12. package/node_modules/debug/LICENSE +10 -9
  13. package/node_modules/debug/README.md +27 -1
  14. package/node_modules/debug/package.json +15 -15
  15. package/node_modules/debug/src/common.js +2 -2
  16. package/node_modules/detect-libc/README.md +124 -42
  17. package/node_modules/detect-libc/index.d.ts +11 -0
  18. package/node_modules/detect-libc/lib/detect-libc.js +166 -80
  19. package/node_modules/detect-libc/lib/process.js +16 -0
  20. package/node_modules/detect-libc/package.json +20 -19
  21. package/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
  22. package/node_modules/emoji-regex/README.md +73 -0
  23. package/node_modules/emoji-regex/es2015/index.js +6 -0
  24. package/node_modules/emoji-regex/es2015/text.js +6 -0
  25. package/node_modules/emoji-regex/index.d.ts +23 -0
  26. package/node_modules/emoji-regex/index.js +6 -0
  27. package/node_modules/emoji-regex/package.json +77 -0
  28. package/node_modules/emoji-regex/text.js +6 -0
  29. package/node_modules/gauge/package.json +7 -7
  30. package/node_modules/https-proxy-agent/dist/agent.js +2 -5
  31. package/node_modules/https-proxy-agent/dist/agent.js.map +1 -1
  32. package/node_modules/https-proxy-agent/package.json +5 -5
  33. package/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
  34. package/node_modules/is-fullwidth-code-point/index.js +25 -21
  35. package/node_modules/is-fullwidth-code-point/license +4 -16
  36. package/node_modules/is-fullwidth-code-point/package.json +18 -24
  37. package/node_modules/is-fullwidth-code-point/readme.md +6 -6
  38. package/node_modules/minimatch/README.md +22 -1
  39. package/node_modules/minimatch/minimatch.js +93 -69
  40. package/node_modules/minimatch/package.json +11 -10
  41. package/node_modules/minipass/index.js +6 -1
  42. package/node_modules/minipass/package.json +5 -5
  43. package/node_modules/node-fetch/lib/index.es.js +29 -3
  44. package/node_modules/node-fetch/lib/index.js +29 -3
  45. package/node_modules/node-fetch/lib/index.mjs +29 -3
  46. package/node_modules/node-fetch/package.json +18 -10
  47. package/node_modules/semver/README.md +3 -1
  48. package/node_modules/semver/bin/semver.js +19 -9
  49. package/node_modules/semver/classes/comparator.js +3 -2
  50. package/node_modules/semver/classes/index.js +1 -1
  51. package/node_modules/semver/classes/range.js +31 -22
  52. package/node_modules/semver/classes/semver.js +1 -1
  53. package/node_modules/semver/functions/cmp.js +8 -4
  54. package/node_modules/semver/functions/coerce.js +3 -2
  55. package/node_modules/semver/functions/inc.js +4 -1
  56. package/node_modules/semver/functions/parse.js +1 -1
  57. package/node_modules/semver/internal/constants.js +2 -2
  58. package/node_modules/semver/internal/identifiers.js +1 -1
  59. package/node_modules/semver/internal/parse-options.js +3 -3
  60. package/node_modules/semver/internal/re.js +3 -3
  61. package/node_modules/semver/package.json +46 -13
  62. package/node_modules/semver/ranges/min-version.js +2 -1
  63. package/node_modules/semver/ranges/outside.js +1 -1
  64. package/node_modules/semver/ranges/simplify.js +15 -12
  65. package/node_modules/semver/ranges/subset.js +53 -31
  66. package/node_modules/signal-exit/index.js +34 -10
  67. package/node_modules/signal-exit/package.json +11 -9
  68. package/node_modules/string-width/index.d.ts +29 -0
  69. package/node_modules/string-width/index.js +16 -5
  70. package/node_modules/string-width/package.json +20 -20
  71. package/node_modules/string-width/readme.md +15 -7
  72. package/node_modules/strip-ansi/index.d.ts +17 -0
  73. package/node_modules/strip-ansi/index.js +1 -1
  74. package/node_modules/strip-ansi/package.json +19 -17
  75. package/node_modules/strip-ansi/readme.md +12 -5
  76. package/package.json +1 -1
  77. package/src/DocumentCopyingContextDriver.cpp +6 -6
  78. package/src/deps/PDFWriter/CMakeLists.txt +8 -0
  79. package/src/deps/PDFWriter/DecryptionHelper.cpp +10 -8
  80. package/src/deps/PDFWriter/Deletable.h +46 -0
  81. package/src/deps/PDFWriter/DocumentContext.h +3 -3
  82. package/src/deps/PDFWriter/IDeletable.h +6 -0
  83. package/src/deps/PDFWriter/InputLZWDecodeStream.cpp +208 -0
  84. package/src/deps/PDFWriter/InputLZWDecodeStream.h +77 -0
  85. package/src/deps/PDFWriter/InputStreamSkipperStream.cpp +1 -1
  86. package/src/deps/PDFWriter/JPEGImageHandler.h +2 -2
  87. package/src/deps/PDFWriter/ObjectsContext.cpp +5 -0
  88. package/src/deps/PDFWriter/ObjectsContext.h +1 -0
  89. package/src/deps/PDFWriter/PDFDocumentHandler.cpp +19 -3
  90. package/src/deps/PDFWriter/PDFObject.cpp +13 -11
  91. package/src/deps/PDFWriter/PDFObject.h +7 -5
  92. package/src/deps/PDFWriter/PDFObjectParser.cpp +8 -0
  93. package/src/deps/PDFWriter/PDFObjectParser.h +6 -0
  94. package/src/deps/PDFWriter/PDFParser.cpp +25 -13
  95. package/src/deps/PDFWriter/PDFParserTokenizer.cpp +25 -24
  96. package/src/deps/PDFWriter/PDFParserTokenizer.h +1 -0
  97. package/src/deps/PDFWriter/PDFWriter.h +2 -2
  98. package/src/deps/PDFWriter/binding.gyp +2 -0
  99. package/node_modules/detect-libc/.npmignore +0 -7
  100. package/node_modules/detect-libc/bin/detect-libc.js +0 -18
  101. package/node_modules/semver/CHANGELOG.md +0 -111
  102. package/src/deps/PDFWriter/InputPredictorPNGAverageStream.cpp +0 -120
  103. package/src/deps/PDFWriter/InputPredictorPNGAverageStream.h +0 -49
  104. package/src/deps/PDFWriter/InputPredictorPNGNoneStream.cpp +0 -109
  105. package/src/deps/PDFWriter/InputPredictorPNGNoneStream.h +0 -47
  106. package/src/deps/PDFWriter/InputPredictorPNGPaethStream.cpp +0 -136
  107. package/src/deps/PDFWriter/InputPredictorPNGPaethStream.h +0 -51
  108. package/src/deps/PDFWriter/InputPredictorPNGSubStream.cpp +0 -113
  109. package/src/deps/PDFWriter/InputPredictorPNGSubStream.h +0 -47
  110. package/src/deps/PDFWriter/InputPredictorPNGUpStream.cpp +0 -120
  111. package/src/deps/PDFWriter/InputPredictorPNGUpStream.h +0 -49
@@ -1,26 +1,26 @@
1
1
  {
2
- "_from": "node-fetch@^2.6.5",
3
- "_id": "node-fetch@2.6.5",
2
+ "_from": "node-fetch@^2.6.7",
3
+ "_id": "node-fetch@2.6.7",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-mmlIVHJEu5rnIxgEgez6b9GgWXbkZj5YZ7fx+2r94a2E+Uirsp6HsPTPlomfdHtpt/B0cdKviwkoaM6pyvUOpQ==",
5
+ "_integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
6
6
  "_location": "/node-fetch",
7
7
  "_phantomChildren": {},
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
- "_resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.5.tgz",
22
- "_shasum": "42735537d7f080a7e5f78b6c549b7146be1742fd",
23
- "_spec": "node-fetch@^2.6.5",
21
+ "_resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
22
+ "_shasum": "24de9fba827e3b4ae44dc8b20256a379160052ad",
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"
@@ -80,6 +80,14 @@
80
80
  "main": "lib/index.js",
81
81
  "module": "lib/index.mjs",
82
82
  "name": "node-fetch",
83
+ "peerDependencies": {
84
+ "encoding": "^0.1.0"
85
+ },
86
+ "peerDependenciesMeta": {
87
+ "encoding": {
88
+ "optional": true
89
+ }
90
+ },
83
91
  "repository": {
84
92
  "type": "git",
85
93
  "url": "git+https://github.com/bitinn/node-fetch.git"
@@ -91,5 +99,5 @@
91
99
  "report": "cross-env BABEL_ENV=coverage nyc --reporter lcov --reporter text mocha -R spec test/test.js",
92
100
  "test": "cross-env BABEL_ENV=test mocha --require babel-register --throw-deprecation test/test.js"
93
101
  },
94
- "version": "2.6.5"
102
+ "version": "2.6.7"
95
103
  }
@@ -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')
@@ -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) {
@@ -265,7 +265,7 @@ class SemVer {
265
265
  if (identifier) {
266
266
  // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
267
267
  // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
268
- if (this.prerelease[0] === identifier) {
268
+ if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
269
269
  if (isNaN(this.prerelease[1])) {
270
270
  this.prerelease = [identifier, 0]
271
271
  }
@@ -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
  }
@@ -7,7 +7,10 @@ const inc = (version, release, options, identifier) => {
7
7
  }
8
8
 
9
9
  try {
10
- return new SemVer(version, options).inc(release, identifier).version
10
+ return new SemVer(
11
+ version instanceof SemVer ? version.version : version,
12
+ options
13
+ ).inc(release, identifier).version
11
14
  } catch (er) {
12
15
  return null
13
16
  }
@@ -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*$')
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "semver@^7.3.5",
3
- "_id": "semver@7.3.5",
3
+ "_id": "semver@7.3.7",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
5
+ "_integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
6
6
  "_location": "/semver",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -18,10 +18,13 @@
18
18
  "_requiredBy": [
19
19
  "/@mapbox/node-pre-gyp"
20
20
  ],
21
- "_resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
22
- "_shasum": "0b621c879348d8998e4b0e4be94b3f12e6018ef7",
21
+ "_resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
22
+ "_shasum": "12c5b649afdbf9049707796e22a4028814ce523f",
23
23
  "_spec": "semver@^7.3.5",
24
24
  "_where": "/home/runner/work/MuhammaraJS/MuhammaraJS/node_modules/@mapbox/node-pre-gyp",
25
+ "author": {
26
+ "name": "GitHub Inc."
27
+ },
25
28
  "bin": {
26
29
  "semver": "bin/semver.js"
27
30
  },
@@ -35,20 +38,22 @@
35
38
  "deprecated": false,
36
39
  "description": "The semantic version parser used by npm.",
37
40
  "devDependencies": {
38
- "tap": "^14.10.7"
41
+ "@npmcli/eslint-config": "^3.0.1",
42
+ "@npmcli/template-oss": "3.3.2",
43
+ "tap": "^16.0.0"
39
44
  },
40
45
  "engines": {
41
46
  "node": ">=10"
42
47
  },
43
48
  "files": [
44
- "bin/**/*.js",
45
- "range.bnf",
46
- "classes/**/*.js",
47
- "functions/**/*.js",
48
- "internal/**/*.js",
49
- "ranges/**/*.js",
49
+ "bin/",
50
+ "classes/",
51
+ "functions/",
52
+ "internal/",
53
+ "ranges/",
50
54
  "index.js",
51
- "preload.js"
55
+ "preload.js",
56
+ "range.bnf"
52
57
  ],
53
58
  "homepage": "https://github.com/npm/node-semver#readme",
54
59
  "license": "ISC",
@@ -59,15 +64,43 @@
59
64
  "url": "git+https://github.com/npm/node-semver.git"
60
65
  },
61
66
  "scripts": {
67
+ "lint": "eslint \"**/*.js\"",
68
+ "lintfix": "npm run lint -- --fix",
69
+ "postlint": "template-oss-check",
62
70
  "postpublish": "git push origin --follow-tags",
71
+ "posttest": "npm run lint",
63
72
  "postversion": "npm publish",
73
+ "prepublishOnly": "git push origin --follow-tags",
64
74
  "preversion": "npm test",
65
75
  "snap": "tap",
76
+ "template-oss-apply": "template-oss-apply --force",
66
77
  "test": "tap"
67
78
  },
68
79
  "tap": {
69
80
  "check-coverage": true,
70
81
  "coverage-map": "map.js"
71
82
  },
72
- "version": "7.3.5"
83
+ "templateOSS": {
84
+ "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
85
+ "version": "3.3.2",
86
+ "engines": ">=10",
87
+ "ciVersions": [
88
+ "10.0.0",
89
+ "10.x",
90
+ "12.x",
91
+ "14.x",
92
+ "16.x"
93
+ ],
94
+ "distPaths": [
95
+ "bin/",
96
+ "classes/",
97
+ "functions/",
98
+ "internal/",
99
+ "ranges/",
100
+ "index.js",
101
+ "preload.js",
102
+ "range.bnf"
103
+ ]
104
+ },
105
+ "version": "7.3.7"
73
106
  }
@@ -47,8 +47,9 @@ const minVersion = (range, loose) => {
47
47
  throw new Error(`Unexpected operation: ${comparator.operator}`)
48
48
  }
49
49
  })
50
- if (setMin && (!minver || gt(minver, setMin)))
50
+ if (setMin && (!minver || gt(minver, setMin))) {
51
51
  minver = setMin
52
+ }
52
53
  }
53
54
 
54
55
  if (minver && range.test(minver)) {
@@ -1,6 +1,6 @@
1
1
  const SemVer = require('../classes/semver')
2
2
  const Comparator = require('../classes/comparator')
3
- const {ANY} = Comparator
3
+ const { ANY } = Comparator
4
4
  const Range = require('../classes/range')
5
5
  const satisfies = require('../functions/satisfies')
6
6
  const gt = require('../functions/gt')
@@ -5,38 +5,41 @@ const satisfies = require('../functions/satisfies.js')
5
5
  const compare = require('../functions/compare.js')
6
6
  module.exports = (versions, range, options) => {
7
7
  const set = []
8
- let min = null
8
+ let first = null
9
9
  let prev = null
10
10
  const v = versions.sort((a, b) => compare(a, b, options))
11
11
  for (const version of v) {
12
12
  const included = satisfies(version, range, options)
13
13
  if (included) {
14
14
  prev = version
15
- if (!min)
16
- min = version
15
+ if (!first) {
16
+ first = version
17
+ }
17
18
  } else {
18
19
  if (prev) {
19
- set.push([min, prev])
20
+ set.push([first, prev])
20
21
  }
21
22
  prev = null
22
- min = null
23
+ first = null
23
24
  }
24
25
  }
25
- if (min)
26
- set.push([min, null])
26
+ if (first) {
27
+ set.push([first, null])
28
+ }
27
29
 
28
30
  const ranges = []
29
31
  for (const [min, max] of set) {
30
- if (min === max)
32
+ if (min === max) {
31
33
  ranges.push(min)
32
- else if (!max && min === v[0])
34
+ } else if (!max && min === v[0]) {
33
35
  ranges.push('*')
34
- else if (!max)
36
+ } else if (!max) {
35
37
  ranges.push(`>=${min}`)
36
- else if (min === v[0])
38
+ } else if (min === v[0]) {
37
39
  ranges.push(`<=${max}`)
38
- else
40
+ } else {
39
41
  ranges.push(`${min} - ${max}`)
42
+ }
40
43
  }
41
44
  const simplified = ranges.join(' || ')
42
45
  const original = typeof range.raw === 'string' ? range.raw : String(range)