projen 0.71.8 → 0.71.10

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 (160) hide show
  1. package/.jsii +5 -6
  2. package/lib/awscdk/auto-discover.js +5 -5
  3. package/lib/awscdk/awscdk-app-java.js +1 -1
  4. package/lib/awscdk/awscdk-app-py.js +1 -1
  5. package/lib/awscdk/awscdk-app-ts.js +1 -1
  6. package/lib/awscdk/awscdk-construct.js +2 -2
  7. package/lib/awscdk/awscdk-deps-java.js +1 -1
  8. package/lib/awscdk/awscdk-deps-js.js +1 -1
  9. package/lib/awscdk/awscdk-deps-py.js +1 -1
  10. package/lib/awscdk/awscdk-deps.js +1 -1
  11. package/lib/awscdk/cdk-config.js +1 -1
  12. package/lib/awscdk/cdk-tasks.js +1 -1
  13. package/lib/awscdk/integration-test.js +1 -1
  14. package/lib/awscdk/lambda-extension.js +1 -1
  15. package/lib/awscdk/lambda-function.js +2 -2
  16. package/lib/build/build-workflow.js +1 -1
  17. package/lib/cdk/auto-discover-base.js +2 -2
  18. package/lib/cdk/construct-lib.js +1 -1
  19. package/lib/cdk/integration-test-base.js +1 -1
  20. package/lib/cdk/jsii-docgen.js +1 -1
  21. package/lib/cdk/jsii-project.js +1 -1
  22. package/lib/cdk8s/auto-discover.js +2 -2
  23. package/lib/cdk8s/cdk8s-app-py.js +1 -1
  24. package/lib/cdk8s/cdk8s-app-ts.js +1 -1
  25. package/lib/cdk8s/cdk8s-construct.js +1 -1
  26. package/lib/cdk8s/cdk8s-deps-py.js +1 -1
  27. package/lib/cdk8s/cdk8s-deps.js +1 -1
  28. package/lib/cdk8s/integration-test.js +1 -1
  29. package/lib/cdktf/cdktf-construct.js +1 -1
  30. package/lib/circleci/circleci.js +1 -1
  31. package/lib/component.js +1 -1
  32. package/lib/dependencies.js +1 -1
  33. package/lib/dev-env.js +1 -1
  34. package/lib/docker-compose/docker-compose-service.js +1 -1
  35. package/lib/docker-compose/docker-compose.js +1 -1
  36. package/lib/file.js +1 -1
  37. package/lib/gitattributes.js +1 -1
  38. package/lib/github/actions-provider.js +1 -1
  39. package/lib/github/auto-approve.js +1 -1
  40. package/lib/github/auto-merge.js +1 -1
  41. package/lib/github/dependabot.js +1 -1
  42. package/lib/github/github-credentials.js +1 -1
  43. package/lib/github/github-project.js +1 -1
  44. package/lib/github/github.js +1 -1
  45. package/lib/github/mergify.js +1 -1
  46. package/lib/github/pr-template.js +1 -1
  47. package/lib/github/pull-request-lint.js +1 -1
  48. package/lib/github/stale.js +1 -1
  49. package/lib/github/task-workflow.js +1 -1
  50. package/lib/github/workflow-actions.js +1 -1
  51. package/lib/github/workflow-jobs.js +1 -1
  52. package/lib/github/workflows.js +1 -1
  53. package/lib/gitlab/configuration.js +1 -1
  54. package/lib/gitlab/gitlab-configuration.js +1 -1
  55. package/lib/gitlab/nested-configuration.js +1 -1
  56. package/lib/gitpod.js +1 -1
  57. package/lib/ignore-file.js +1 -1
  58. package/lib/ini.js +1 -1
  59. package/lib/java/java-project.js +1 -1
  60. package/lib/java/junit.js +1 -1
  61. package/lib/java/maven-compile.js +1 -1
  62. package/lib/java/maven-packaging.js +1 -1
  63. package/lib/java/maven-sample.js +1 -1
  64. package/lib/java/pom.js +1 -1
  65. package/lib/java/projenrc.js +1 -1
  66. package/lib/javascript/bundler.js +1 -1
  67. package/lib/javascript/eslint.js +1 -1
  68. package/lib/javascript/jest.js +4 -4
  69. package/lib/javascript/node-package.js +1 -1
  70. package/lib/javascript/node-project.js +1 -1
  71. package/lib/javascript/npm-config.js +1 -1
  72. package/lib/javascript/prettier.js +1 -1
  73. package/lib/javascript/projenrc.js +1 -1
  74. package/lib/javascript/typescript-config.js +1 -1
  75. package/lib/javascript/upgrade-dependencies.js +2 -2
  76. package/lib/json-patch.js +1 -1
  77. package/lib/json.js +1 -1
  78. package/lib/license.js +1 -1
  79. package/lib/logger.js +1 -1
  80. package/lib/makefile.js +1 -1
  81. package/lib/object-file.js +1 -1
  82. package/lib/project-build.js +1 -1
  83. package/lib/project.js +1 -1
  84. package/lib/projects.js +1 -1
  85. package/lib/projenrc-json.js +2 -2
  86. package/lib/projenrc.js +1 -1
  87. package/lib/python/pip.js +1 -1
  88. package/lib/python/poetry.js +2 -2
  89. package/lib/python/projenrc.js +1 -1
  90. package/lib/python/pytest-sample.js +1 -1
  91. package/lib/python/pytest.js +1 -1
  92. package/lib/python/python-project.js +1 -1
  93. package/lib/python/python-sample.js +1 -1
  94. package/lib/python/requirements-file.js +1 -1
  95. package/lib/python/setuppy.js +1 -1
  96. package/lib/python/setuptools.js +1 -1
  97. package/lib/python/venv.js +1 -1
  98. package/lib/readme.js +1 -1
  99. package/lib/release/publisher.js +1 -1
  100. package/lib/release/release-trigger.js +1 -1
  101. package/lib/release/release.js +1 -1
  102. package/lib/renovatebot.js +1 -1
  103. package/lib/sample-file.js +2 -2
  104. package/lib/semver.js +1 -1
  105. package/lib/source-code.js +1 -1
  106. package/lib/task-runtime.js +1 -1
  107. package/lib/task.js +1 -1
  108. package/lib/tasks.js +1 -1
  109. package/lib/testing.js +1 -1
  110. package/lib/textfile.js +1 -1
  111. package/lib/toml.js +1 -1
  112. package/lib/typescript/projenrc-ts.js +1 -1
  113. package/lib/typescript/projenrc.js +1 -1
  114. package/lib/typescript/typescript-typedoc.js +1 -1
  115. package/lib/typescript/typescript.js +3 -3
  116. package/lib/version.js +1 -1
  117. package/lib/vscode/devcontainer.js +1 -1
  118. package/lib/vscode/extensions.js +1 -1
  119. package/lib/vscode/launch-config.js +1 -1
  120. package/lib/vscode/settings.js +1 -1
  121. package/lib/vscode/vscode.js +1 -1
  122. package/lib/web/next.js +3 -3
  123. package/lib/web/postcss.js +1 -1
  124. package/lib/web/react.js +4 -4
  125. package/lib/web/tailwind.js +1 -1
  126. package/lib/xmlfile.js +1 -1
  127. package/lib/yaml.js +1 -1
  128. package/node_modules/is-core-module/CHANGELOG.md +9 -0
  129. package/node_modules/is-core-module/core.json +4 -1
  130. package/node_modules/is-core-module/package.json +5 -4
  131. package/node_modules/resolve/lib/core.js +3 -1
  132. package/node_modules/resolve/lib/core.json +4 -1
  133. package/node_modules/resolve/package.json +2 -2
  134. package/node_modules/semver/README.md +56 -0
  135. package/node_modules/semver/bin/semver.js +8 -2
  136. package/node_modules/semver/classes/comparator.js +37 -33
  137. package/node_modules/semver/classes/range.js +6 -2
  138. package/node_modules/semver/classes/semver.js +10 -9
  139. package/node_modules/semver/functions/diff.js +24 -8
  140. package/node_modules/semver/functions/inc.js +3 -2
  141. package/node_modules/semver/functions/parse.js +0 -10
  142. package/node_modules/semver/index.js +1 -0
  143. package/node_modules/semver/internal/constants.js +15 -2
  144. package/node_modules/semver/internal/parse-options.js +14 -10
  145. package/node_modules/semver/package.json +7 -6
  146. package/node_modules/semver/ranges/intersects.js +1 -1
  147. package/node_modules/semver/ranges/subset.js +6 -3
  148. package/package.json +5 -7
  149. package/node_modules/zlib/.gitignore +0 -2
  150. package/node_modules/zlib/LICENSE +0 -24
  151. package/node_modules/zlib/Makefile +0 -15
  152. package/node_modules/zlib/README.md +0 -54
  153. package/node_modules/zlib/configure +0 -2
  154. package/node_modules/zlib/index.js +0 -1
  155. package/node_modules/zlib/lib/zlib.js +0 -1
  156. package/node_modules/zlib/package.json +0 -18
  157. package/node_modules/zlib/src/node-zlib.cc +0 -95
  158. package/node_modules/zlib/test/deflate.test.js +0 -23
  159. package/node_modules/zlib/test/inflate.test.js +0 -33
  160. package/node_modules/zlib/wscript +0 -38
@@ -23,7 +23,10 @@ let rtl = false
23
23
 
24
24
  let identifier
25
25
 
26
+ let identifierBase
27
+
26
28
  const semver = require('../')
29
+ const parseOptions = require('../internal/parse-options')
27
30
 
28
31
  let reverse = false
29
32
 
@@ -71,6 +74,9 @@ const main = () => {
71
74
  case '-r': case '--range':
72
75
  range.push(argv.shift())
73
76
  break
77
+ case '-n':
78
+ identifierBase = argv.shift()
79
+ break
74
80
  case '-c': case '--coerce':
75
81
  coerce = true
76
82
  break
@@ -88,7 +94,7 @@ const main = () => {
88
94
  }
89
95
  }
90
96
 
91
- options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl }
97
+ options = parseOptions({ loose, includePrerelease, rtl })
92
98
 
93
99
  versions = versions.map((v) => {
94
100
  return coerce ? (semver.coerce(v, options) || { version: v }).version : v
@@ -127,7 +133,7 @@ const success = () => {
127
133
  }).map((v) => {
128
134
  return semver.clean(v, options)
129
135
  }).map((v) => {
130
- return inc ? semver.inc(v, inc, options, identifier) : v
136
+ return inc ? semver.inc(v, inc, options, identifier, identifierBase) : v
131
137
  }).forEach((v, i, _) => {
132
138
  console.log(v)
133
139
  })
@@ -78,13 +78,6 @@ class Comparator {
78
78
  throw new TypeError('a Comparator is required')
79
79
  }
80
80
 
81
- if (!options || typeof options !== 'object') {
82
- options = {
83
- loose: !!options,
84
- includePrerelease: false,
85
- }
86
- }
87
-
88
81
  if (this.operator === '') {
89
82
  if (this.value === '') {
90
83
  return true
@@ -97,32 +90,43 @@ class Comparator {
97
90
  return new Range(this.value, options).test(comp.semver)
98
91
  }
99
92
 
100
- const sameDirectionIncreasing =
101
- (this.operator === '>=' || this.operator === '>') &&
102
- (comp.operator === '>=' || comp.operator === '>')
103
- const sameDirectionDecreasing =
104
- (this.operator === '<=' || this.operator === '<') &&
105
- (comp.operator === '<=' || comp.operator === '<')
106
- const sameSemVer = this.semver.version === comp.semver.version
107
- const differentDirectionsInclusive =
108
- (this.operator === '>=' || this.operator === '<=') &&
109
- (comp.operator === '>=' || comp.operator === '<=')
110
- const oppositeDirectionsLessThan =
111
- cmp(this.semver, '<', comp.semver, options) &&
112
- (this.operator === '>=' || this.operator === '>') &&
113
- (comp.operator === '<=' || comp.operator === '<')
114
- const oppositeDirectionsGreaterThan =
115
- cmp(this.semver, '>', comp.semver, options) &&
116
- (this.operator === '<=' || this.operator === '<') &&
117
- (comp.operator === '>=' || comp.operator === '>')
118
-
119
- return (
120
- sameDirectionIncreasing ||
121
- sameDirectionDecreasing ||
122
- (sameSemVer && differentDirectionsInclusive) ||
123
- oppositeDirectionsLessThan ||
124
- oppositeDirectionsGreaterThan
125
- )
93
+ options = parseOptions(options)
94
+
95
+ // Special cases where nothing can possibly be lower
96
+ if (options.includePrerelease &&
97
+ (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {
98
+ return false
99
+ }
100
+ if (!options.includePrerelease &&
101
+ (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {
102
+ return false
103
+ }
104
+
105
+ // Same direction increasing (> or >=)
106
+ if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {
107
+ return true
108
+ }
109
+ // Same direction decreasing (< or <=)
110
+ if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {
111
+ return true
112
+ }
113
+ // same SemVer and both sides are inclusive (<= or >=)
114
+ if (
115
+ (this.semver.version === comp.semver.version) &&
116
+ this.operator.includes('=') && comp.operator.includes('=')) {
117
+ return true
118
+ }
119
+ // opposite directions less than
120
+ if (cmp(this.semver, '<', comp.semver, options) &&
121
+ this.operator.startsWith('>') && comp.operator.startsWith('<')) {
122
+ return true
123
+ }
124
+ // opposite directions greater than
125
+ if (cmp(this.semver, '>', comp.semver, options) &&
126
+ this.operator.startsWith('<') && comp.operator.startsWith('>')) {
127
+ return true
128
+ }
129
+ return false
126
130
  }
127
131
  }
128
132
 
@@ -81,8 +81,10 @@ class Range {
81
81
 
82
82
  // memoize range parsing for performance.
83
83
  // this is a very hot path, and fully deterministic.
84
- const memoOpts = Object.keys(this.options).join(',')
85
- const memoKey = `parseRange:${memoOpts}:${range}`
84
+ const memoOpts =
85
+ (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |
86
+ (this.options.loose && FLAG_LOOSE)
87
+ const memoKey = memoOpts + ':' + range
86
88
  const cached = cache.get(memoKey)
87
89
  if (cached) {
88
90
  return cached
@@ -190,6 +192,7 @@ class Range {
190
192
  return false
191
193
  }
192
194
  }
195
+
193
196
  module.exports = Range
194
197
 
195
198
  const LRU = require('lru-cache')
@@ -206,6 +209,7 @@ const {
206
209
  tildeTrimReplace,
207
210
  caretTrimReplace,
208
211
  } = require('../internal/re')
212
+ const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')
209
213
 
210
214
  const isNullSet = c => c.value === '<0.0.0-0'
211
215
  const isAny = c => c.value === ''
@@ -175,36 +175,36 @@ class SemVer {
175
175
 
176
176
  // preminor will bump the version up to the next minor release, and immediately
177
177
  // down to pre-release. premajor and prepatch work the same way.
178
- inc (release, identifier) {
178
+ inc (release, identifier, identifierBase) {
179
179
  switch (release) {
180
180
  case 'premajor':
181
181
  this.prerelease.length = 0
182
182
  this.patch = 0
183
183
  this.minor = 0
184
184
  this.major++
185
- this.inc('pre', identifier)
185
+ this.inc('pre', identifier, identifierBase)
186
186
  break
187
187
  case 'preminor':
188
188
  this.prerelease.length = 0
189
189
  this.patch = 0
190
190
  this.minor++
191
- this.inc('pre', identifier)
191
+ this.inc('pre', identifier, identifierBase)
192
192
  break
193
193
  case 'prepatch':
194
194
  // If this is already a prerelease, it will bump to the next version
195
195
  // drop any prereleases that might already exist, since they are not
196
196
  // relevant at this point.
197
197
  this.prerelease.length = 0
198
- this.inc('patch', identifier)
199
- this.inc('pre', identifier)
198
+ this.inc('patch', identifier, identifierBase)
199
+ this.inc('pre', identifier, identifierBase)
200
200
  break
201
201
  // If the input is a non-prerelease version, this acts the same as
202
202
  // prepatch.
203
203
  case 'prerelease':
204
204
  if (this.prerelease.length === 0) {
205
- this.inc('patch', identifier)
205
+ this.inc('patch', identifier, identifierBase)
206
206
  }
207
- this.inc('pre', identifier)
207
+ this.inc('pre', identifier, identifierBase)
208
208
  break
209
209
 
210
210
  case 'major':
@@ -263,14 +263,15 @@ class SemVer {
263
263
  }
264
264
  }
265
265
  if (identifier) {
266
+ const base = Number(identifierBase) ? 1 : 0
266
267
  // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
267
268
  // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
268
269
  if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
269
270
  if (isNaN(this.prerelease[1])) {
270
- this.prerelease = [identifier, 0]
271
+ this.prerelease = [identifier, base]
271
272
  }
272
273
  } else {
273
- this.prerelease = [identifier, 0]
274
+ this.prerelease = [identifier, base]
274
275
  }
275
276
  }
276
277
  break
@@ -2,19 +2,35 @@ const parse = require('./parse')
2
2
  const eq = require('./eq')
3
3
 
4
4
  const diff = (version1, version2) => {
5
- if (eq(version1, version2)) {
5
+ const v1 = parse(version1)
6
+ const v2 = parse(version2)
7
+ if (eq(v1, v2)) {
6
8
  return null
7
9
  } else {
8
- const v1 = parse(version1)
9
- const v2 = parse(version2)
10
10
  const hasPre = v1.prerelease.length || v2.prerelease.length
11
11
  const prefix = hasPre ? 'pre' : ''
12
12
  const defaultResult = hasPre ? 'prerelease' : ''
13
- for (const key in v1) {
14
- if (key === 'major' || key === 'minor' || key === 'patch') {
15
- if (v1[key] !== v2[key]) {
16
- return prefix + key
17
- }
13
+
14
+ if (v1.major !== v2.major) {
15
+ return prefix + 'major'
16
+ }
17
+ if (v1.minor !== v2.minor) {
18
+ return prefix + 'minor'
19
+ }
20
+
21
+ if (v1.patch !== v2.patch) {
22
+ return prefix + 'patch'
23
+ }
24
+
25
+ if (!v1.prerelease.length || !v2.prerelease.length) {
26
+ if (v1.patch) {
27
+ return 'patch'
28
+ }
29
+ if (v1.minor) {
30
+ return 'minor'
31
+ }
32
+ if (v1.major) {
33
+ return 'major'
18
34
  }
19
35
  }
20
36
  return defaultResult // may be undefined
@@ -1,7 +1,8 @@
1
1
  const SemVer = require('../classes/semver')
2
2
 
3
- const inc = (version, release, options, identifier) => {
3
+ const inc = (version, release, options, identifier, identifierBase) => {
4
4
  if (typeof (options) === 'string') {
5
+ identifierBase = identifier
5
6
  identifier = options
6
7
  options = undefined
7
8
  }
@@ -10,7 +11,7 @@ const inc = (version, release, options, identifier) => {
10
11
  return new SemVer(
11
12
  version instanceof SemVer ? version.version : version,
12
13
  options
13
- ).inc(release, identifier).version
14
+ ).inc(release, identifier, identifierBase).version
14
15
  } catch (er) {
15
16
  return null
16
17
  }
@@ -1,11 +1,6 @@
1
1
  const { MAX_LENGTH } = require('../internal/constants')
2
- const { re, t } = require('../internal/re')
3
2
  const SemVer = require('../classes/semver')
4
-
5
- const parseOptions = require('../internal/parse-options')
6
3
  const parse = (version, options) => {
7
- options = parseOptions(options)
8
-
9
4
  if (version instanceof SemVer) {
10
5
  return version
11
6
  }
@@ -18,11 +13,6 @@ const parse = (version, options) => {
18
13
  return null
19
14
  }
20
15
 
21
- const r = options.loose ? re[t.LOOSE] : re[t.FULL]
22
- if (!r.test(version)) {
23
- return null
24
- }
25
-
26
16
  try {
27
17
  return new SemVer(version, options)
28
18
  } catch (er) {
@@ -83,6 +83,7 @@ module.exports = {
83
83
  src: internalRe.src,
84
84
  tokens: internalRe.t,
85
85
  SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
86
+ RELEASE_TYPES: constants.RELEASE_TYPES,
86
87
  compareIdentifiers: identifiers.compareIdentifiers,
87
88
  rcompareIdentifiers: identifiers.rcompareIdentifiers,
88
89
  }
@@ -9,9 +9,22 @@ const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
9
9
  // Max safe segment length for coercion.
10
10
  const MAX_SAFE_COMPONENT_LENGTH = 16
11
11
 
12
+ const RELEASE_TYPES = [
13
+ 'major',
14
+ 'premajor',
15
+ 'minor',
16
+ 'preminor',
17
+ 'patch',
18
+ 'prepatch',
19
+ 'prerelease',
20
+ ]
21
+
12
22
  module.exports = {
13
- SEMVER_SPEC_VERSION,
14
23
  MAX_LENGTH,
15
- MAX_SAFE_INTEGER,
16
24
  MAX_SAFE_COMPONENT_LENGTH,
25
+ MAX_SAFE_INTEGER,
26
+ RELEASE_TYPES,
27
+ SEMVER_SPEC_VERSION,
28
+ FLAG_INCLUDE_PRERELEASE: 0b001,
29
+ FLAG_LOOSE: 0b010,
17
30
  }
@@ -1,11 +1,15 @@
1
- // parse out just the options we care about so we always get a consistent
2
- // obj with keys in a consistent order.
3
- const opts = ['includePrerelease', 'loose', 'rtl']
4
- const parseOptions = options =>
5
- !options ? {}
6
- : typeof options !== 'object' ? { loose: true }
7
- : opts.filter(k => options[k]).reduce((o, k) => {
8
- o[k] = true
9
- return o
10
- }, {})
1
+ // parse out just the options we care about
2
+ const looseOption = Object.freeze({ loose: true })
3
+ const emptyOpts = Object.freeze({ })
4
+ const parseOptions = options => {
5
+ if (!options) {
6
+ return emptyOpts
7
+ }
8
+
9
+ if (typeof options !== 'object') {
10
+ return looseOption
11
+ }
12
+
13
+ return options
14
+ }
11
15
  module.exports = parseOptions
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "semver",
3
- "version": "7.3.8",
3
+ "version": "7.4.0",
4
4
  "description": "The semantic version parser used by npm.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -13,8 +13,8 @@
13
13
  "template-oss-apply": "template-oss-apply --force"
14
14
  },
15
15
  "devDependencies": {
16
- "@npmcli/eslint-config": "^3.0.1",
17
- "@npmcli/template-oss": "4.4.4",
16
+ "@npmcli/eslint-config": "^4.0.0",
17
+ "@npmcli/template-oss": "4.13.0",
18
18
  "tap": "^16.0.0"
19
19
  },
20
20
  "license": "ISC",
@@ -53,9 +53,8 @@
53
53
  "author": "GitHub Inc.",
54
54
  "templateOSS": {
55
55
  "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
56
- "version": "4.4.4",
56
+ "version": "4.13.0",
57
57
  "engines": ">=10",
58
- "content": "./scripts",
59
58
  "ciVersions": [
60
59
  "10.0.0",
61
60
  "10.x",
@@ -64,6 +63,7 @@
64
63
  "16.x",
65
64
  "18.x"
66
65
  ],
66
+ "npmSpec": "8",
67
67
  "distPaths": [
68
68
  "classes/",
69
69
  "functions/",
@@ -81,6 +81,7 @@
81
81
  "/index.js",
82
82
  "/preload.js",
83
83
  "/range.bnf"
84
- ]
84
+ ],
85
+ "publish": "true"
85
86
  }
86
87
  }
@@ -2,6 +2,6 @@ const Range = require('../classes/range')
2
2
  const intersects = (r1, r2, options) => {
3
3
  r1 = new Range(r1, options)
4
4
  r2 = new Range(r2, options)
5
- return r1.intersects(r2)
5
+ return r1.intersects(r2, options)
6
6
  }
7
7
  module.exports = intersects
@@ -68,6 +68,9 @@ const subset = (sub, dom, options = {}) => {
68
68
  return true
69
69
  }
70
70
 
71
+ const minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]
72
+ const minimumVersion = [new Comparator('>=0.0.0')]
73
+
71
74
  const simpleSubset = (sub, dom, options) => {
72
75
  if (sub === dom) {
73
76
  return true
@@ -77,9 +80,9 @@ const simpleSubset = (sub, dom, options) => {
77
80
  if (dom.length === 1 && dom[0].semver === ANY) {
78
81
  return true
79
82
  } else if (options.includePrerelease) {
80
- sub = [new Comparator('>=0.0.0-0')]
83
+ sub = minimumVersionWithPreRelease
81
84
  } else {
82
- sub = [new Comparator('>=0.0.0')]
85
+ sub = minimumVersion
83
86
  }
84
87
  }
85
88
 
@@ -87,7 +90,7 @@ const simpleSubset = (sub, dom, options) => {
87
90
  if (options.includePrerelease) {
88
91
  return true
89
92
  } else {
90
- dom = [new Comparator('>=0.0.0')]
93
+ dom = minimumVersion
91
94
  }
92
95
  }
93
96
 
package/package.json CHANGED
@@ -57,7 +57,7 @@
57
57
  "@typescript-eslint/eslint-plugin": "^5",
58
58
  "@typescript-eslint/parser": "^5",
59
59
  "all-contributors-cli": "^6.24.0",
60
- "esbuild": "^0.17.15",
60
+ "esbuild": "^0.17.16",
61
61
  "eslint": "^8",
62
62
  "eslint-config-prettier": "^8.8.0",
63
63
  "eslint-import-resolver-node": "^0.3.7",
@@ -86,12 +86,11 @@
86
86
  "fast-json-patch": "^3.1.1",
87
87
  "glob": "^8",
88
88
  "ini": "^2.0.0",
89
- "semver": "^7.3.8",
89
+ "semver": "^7.4.0",
90
90
  "shx": "^0.3.4",
91
91
  "xmlbuilder2": "^2.4.1",
92
92
  "yaml": "2.0.0",
93
- "yargs": "^16.2.0",
94
- "zlib": "^1.0.5"
93
+ "yargs": "^16.2.0"
95
94
  },
96
95
  "bundledDependencies": [
97
96
  "@iarna/toml",
@@ -106,8 +105,7 @@
106
105
  "shx",
107
106
  "xmlbuilder2",
108
107
  "yaml",
109
- "yargs",
110
- "zlib"
108
+ "yargs"
111
109
  ],
112
110
  "keywords": [
113
111
  "cdk",
@@ -130,7 +128,7 @@
130
128
  ]
131
129
  }
132
130
  },
133
- "version": "0.71.8",
131
+ "version": "0.71.10",
134
132
  "jest": {
135
133
  "maxWorkers": "50%",
136
134
  "testMatch": [
@@ -1,2 +0,0 @@
1
- build
2
- .lock-wscript
@@ -1,24 +0,0 @@
1
- Copyright (c) 2011, Konstantin Käfer <kkaefer@gmail.com>
2
- All rights reserved.
3
-
4
- Redistribution and use in source and binary forms, with or without modification,
5
- are permitted provided that the following conditions are met:
6
- * Redistributions of source code must retain the above copyright notice,
7
- this list of conditions and the following disclaimer.
8
- * Redistributions in binary form must reproduce the above copyright notice,
9
- this list of conditions and the following disclaimer in the documentation
10
- and/or other materials provided with the distribution.
11
- * Neither the name of node-zlib nor the names of its contributors
12
- may be used to endorse or promote products derived from this software
13
- without specific prior written permission.
14
-
15
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
- DISCLAIMED. IN NO EVENT SHALL Konstantin Käfer BE LIABLE FOR ANY DIRECT,
19
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
20
- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
22
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
23
- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
24
- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -1,15 +0,0 @@
1
- build:
2
- node-waf build
3
-
4
- clean:
5
- node-waf clean
6
-
7
- ifndef only
8
- test: build
9
- @expresso -I lib test/*.test.js
10
- else
11
- test: build
12
- @expresso -I lib test/${only}.test.js
13
- endif
14
-
15
- .PHONY: build clean test
@@ -1,54 +0,0 @@
1
- # NAME
2
-
3
- node-zlib - Simple, synchronous deflate/inflate for node.js buffers.
4
-
5
-
6
-
7
- # USAGE
8
-
9
- Install with `npm install zlib`.
10
-
11
- var Buffer = require('buffer').Buffer;
12
- var zlib = require('zlib');
13
-
14
- var input = new Buffer('lorem ipsum dolor sit amet');
15
- var compressed = zlib.deflate(input);
16
- var output = zlib.inflate(compressed);
17
-
18
- Note that `node-zlib` is only intended for small (< 128 KB) data that you already have buffered. It is not meant for input/output streams.
19
-
20
- # BUILDING
21
-
22
- Make sure you have `zlib` installed. Mac OS X ships with it by default.
23
-
24
- To obtain and build the bindings:
25
-
26
- git clone git://github.com/kkaefer/node-zlib.git
27
- cd node-zlib
28
- ./configure
29
- make
30
-
31
- You can also use [`npm`](https://github.com/isaacs/npm) to download and install them:
32
-
33
- npm install zlib
34
-
35
-
36
-
37
- # TESTS
38
-
39
- [expresso](https://github.com/visionmedia/expresso) is required to run unit tests.
40
-
41
- npm install expresso
42
- make test
43
-
44
-
45
-
46
- # CONTRIBUTORS
47
-
48
- * [Konstantin Käfer](https://github.com/kkaefer)
49
-
50
-
51
-
52
- # LICENSE
53
-
54
- `node-zlib` is [BSD licensed](https://github.com/kkaefer/node-zlib/raw/master/LICENSE).
@@ -1,2 +0,0 @@
1
- #!/bin/sh
2
- node-waf configure
@@ -1 +0,0 @@
1
- module.exports = require('./lib/zlib');
@@ -1 +0,0 @@
1
- module.exports = require('./zlib_bindings');
@@ -1,18 +0,0 @@
1
- {
2
- "name": "zlib",
3
- "description": "Simple, synchronous deflate/inflate for buffers",
4
- "version": "1.0.5",
5
- "homepage": "https://github.com/kkaefer/node-zlib",
6
- "author": "Konstantin Käfer <kkaefer@gmail.com>",
7
- "repository": {
8
- "type": "git",
9
- "url": "git://github.com/kkaefer/node-zlib.git"
10
- },
11
- "engines": {
12
- "node": ">=0.2.0"
13
- },
14
- "licenses": [
15
- { "type": "BSD" }
16
- ],
17
- "main": "./lib/zlib"
18
- }