@aws-cdk/cloud-assembly-schema 39.2.7 → 39.2.9

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.
package/.jsii CHANGED
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "bundled": {
11
11
  "jsonschema": "~1.4.1",
12
- "semver": "^7.6.3"
12
+ "semver": "^7.7.0"
13
13
  },
14
14
  "description": "Cloud Assembly Schema",
15
15
  "docs": {
@@ -5552,6 +5552,6 @@
5552
5552
  "symbolId": "lib/cloud-assembly/context-queries:VpcContextQuery"
5553
5553
  }
5554
5554
  },
5555
- "version": "39.2.7",
5556
- "fingerprint": "cOWc3C63ehZUjsS6GmHKzEuifAIxy5ziFKN0bHy7cKE="
5555
+ "version": "39.2.9",
5556
+ "fingerprint": "CEanSdGtsIDEljnuUMb1uqrYcEjOYFAQ4O5yFvE9dV4="
5557
5557
  }
package/lib/manifest.js CHANGED
@@ -249,7 +249,7 @@ class Manifest {
249
249
  }
250
250
  exports.Manifest = Manifest;
251
251
  _a = JSII_RTTI_SYMBOL_1;
252
- Manifest[_a] = { fqn: "@aws-cdk/cloud-assembly-schema.Manifest", version: "39.2.7" };
252
+ Manifest[_a] = { fqn: "@aws-cdk/cloud-assembly-schema.Manifest", version: "39.2.9" };
253
253
  function mapValues(xs, fn) {
254
254
  if (!xs) {
255
255
  return undefined;
@@ -100,7 +100,7 @@ Options:
100
100
  -i --increment [<level>]
101
101
  Increment a version by the specified level. Level can
102
102
  be one of: major, minor, patch, premajor, preminor,
103
- prepatch, or prerelease. Default level is 'patch'.
103
+ prepatch, prerelease, or release. Default level is 'patch'.
104
104
  Only one version may be specified.
105
105
 
106
106
  --preid <identifier>
@@ -141,6 +141,8 @@ A "version" is described by the `v2.0.0` specification found at
141
141
  <https://semver.org/>.
142
142
 
143
143
  A leading `"="` or `"v"` character is stripped off and ignored.
144
+ Support for stripping a leading "v" is kept for compatibility with `v1.0.0` of the SemVer
145
+ specification but should not be used anymore.
144
146
 
145
147
  ## Ranges
146
148
 
@@ -237,6 +239,13 @@ $ semver 1.2.4-beta.0 -i prerelease
237
239
  1.2.4-beta.1
238
240
  ```
239
241
 
242
+ To get out of the prerelease phase, use the `release` option:
243
+
244
+ ```bash
245
+ $ semver 1.2.4-beta.1 -i release
246
+ 1.2.4
247
+ ```
248
+
240
249
  #### Prerelease Identifier Base
241
250
 
242
251
  The method `.inc` takes an optional parameter 'identifierBase' string
@@ -415,10 +424,10 @@ Strict-mode Comparators and Ranges will be strict about the SemVer
415
424
  strings that they parse.
416
425
 
417
426
  * `valid(v)`: Return the parsed version, or null if it's not valid.
418
- * `inc(v, release, options, identifier, identifierBase)`:
427
+ * `inc(v, releaseType, options, identifier, identifierBase)`:
419
428
  Return the version incremented by the release
420
429
  type (`major`, `premajor`, `minor`, `preminor`, `patch`,
421
- `prepatch`, or `prerelease`), or null if it's not valid
430
+ `prepatch`, `prerelease`, or `release`), or null if it's not valid
422
431
  * `premajor` in one call will bump the version up to the next major
423
432
  version and down to a prerelease of that major version.
424
433
  `preminor`, and `prepatch` work the same way.
@@ -426,6 +435,7 @@ strings that they parse.
426
435
  same as `prepatch`. It increments the patch version and then makes a
427
436
  prerelease. If the input version is already a prerelease it simply
428
437
  increments it.
438
+ * `release` will remove any prerelease part of the version.
429
439
  * `identifier` can be used to prefix `premajor`, `preminor`,
430
440
  `prepatch`, or `prerelease` version increments. `identifierBase`
431
441
  is the base to be used for the `prerelease` identifier.
@@ -477,7 +487,7 @@ strings that they parse.
477
487
 
478
488
  ### Ranges
479
489
 
480
- * `validRange(range)`: Return the valid range or null if it's not valid
490
+ * `validRange(range)`: Return the valid range or null if it's not valid.
481
491
  * `satisfies(version, range)`: Return true if the version satisfies the
482
492
  range.
483
493
  * `maxSatisfying(versions, range)`: Return the highest version in the list
@@ -61,6 +61,7 @@ const main = () => {
61
61
  switch (argv[0]) {
62
62
  case 'major': case 'minor': case 'patch': case 'prerelease':
63
63
  case 'premajor': case 'preminor': case 'prepatch':
64
+ case 'release':
64
65
  inc = argv.shift()
65
66
  break
66
67
  default:
@@ -149,7 +150,7 @@ Options:
149
150
  -i --increment [<level>]
150
151
  Increment a version by the specified level. Level can
151
152
  be one of: major, minor, patch, premajor, preminor,
152
- prepatch, or prerelease. Default level is 'patch'.
153
+ prepatch, prerelease, or release. Default level is 'patch'.
153
154
  Only one version may be specified.
154
155
 
155
156
  --preid <identifier>
@@ -10,7 +10,7 @@ class SemVer {
10
10
 
11
11
  if (version instanceof SemVer) {
12
12
  if (version.loose === !!options.loose &&
13
- version.includePrerelease === !!options.includePrerelease) {
13
+ version.includePrerelease === !!options.includePrerelease) {
14
14
  return version
15
15
  } else {
16
16
  version = version.version
@@ -176,6 +176,19 @@ class SemVer {
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
178
  inc (release, identifier, identifierBase) {
179
+ if (release.startsWith('pre')) {
180
+ if (!identifier && identifierBase === false) {
181
+ throw new Error('invalid increment argument: identifier is empty')
182
+ }
183
+ // Avoid an invalid semver results
184
+ if (identifier) {
185
+ const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE])
186
+ if (!match || match[1] !== identifier) {
187
+ throw new Error(`invalid identifier: ${identifier}`)
188
+ }
189
+ }
190
+ }
191
+
179
192
  switch (release) {
180
193
  case 'premajor':
181
194
  this.prerelease.length = 0
@@ -206,6 +219,12 @@ class SemVer {
206
219
  }
207
220
  this.inc('pre', identifier, identifierBase)
208
221
  break
222
+ case 'release':
223
+ if (this.prerelease.length === 0) {
224
+ throw new Error(`version ${this.raw} is not a prerelease`)
225
+ }
226
+ this.prerelease.length = 0
227
+ break
209
228
 
210
229
  case 'major':
211
230
  // If this is a pre-major version, bump up to the same major version.
@@ -249,10 +268,6 @@ class SemVer {
249
268
  case 'pre': {
250
269
  const base = Number(identifierBase) ? 1 : 0
251
270
 
252
- if (!identifier && identifierBase === false) {
253
- throw new Error('invalid increment argument: identifier is empty')
254
- }
255
-
256
271
  if (this.prerelease.length === 0) {
257
272
  this.prerelease = [base]
258
273
  } else {
@@ -27,20 +27,13 @@ const diff = (version1, version2) => {
27
27
  return 'major'
28
28
  }
29
29
 
30
- // Otherwise it can be determined by checking the high version
31
-
32
- if (highVersion.patch) {
33
- // anything higher than a patch bump would result in the wrong version
30
+ // If the main part has no difference
31
+ if (lowVersion.compareMain(highVersion) === 0) {
32
+ if (lowVersion.minor && !lowVersion.patch) {
33
+ return 'minor'
34
+ }
34
35
  return 'patch'
35
36
  }
36
-
37
- if (highVersion.minor) {
38
- // anything higher than a minor bump would result in the wrong version
39
- return 'minor'
40
- }
41
-
42
- // bumping major/minor/patch all have same result
43
- return 'major'
44
37
  }
45
38
 
46
39
  // add the `pre` prefix if we are going to a prerelease version
@@ -1,20 +1,21 @@
1
1
  {
2
2
  "name": "semver",
3
- "version": "7.6.3",
3
+ "version": "7.7.0",
4
4
  "description": "The semantic version parser used by npm.",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "test": "tap",
8
8
  "snap": "tap",
9
- "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
9
+ "lint": "npm run eslint",
10
10
  "postlint": "template-oss-check",
11
- "lintfix": "npm run lint -- --fix",
11
+ "lintfix": "npm run eslint -- --fix",
12
12
  "posttest": "npm run lint",
13
- "template-oss-apply": "template-oss-apply --force"
13
+ "template-oss-apply": "template-oss-apply --force",
14
+ "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
14
15
  },
15
16
  "devDependencies": {
16
- "@npmcli/eslint-config": "^4.0.0",
17
- "@npmcli/template-oss": "4.22.0",
17
+ "@npmcli/eslint-config": "^5.0.0",
18
+ "@npmcli/template-oss": "4.23.4",
18
19
  "benchmark": "^2.1.4",
19
20
  "tap": "^16.0.0"
20
21
  },
@@ -51,7 +52,7 @@
51
52
  "author": "GitHub Inc.",
52
53
  "templateOSS": {
53
54
  "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
54
- "version": "4.22.0",
55
+ "version": "4.23.4",
55
56
  "engines": ">=10",
56
57
  "distPaths": [
57
58
  "classes/",
package/package.json CHANGED
@@ -67,7 +67,7 @@
67
67
  },
68
68
  "dependencies": {
69
69
  "jsonschema": "~1.4.1",
70
- "semver": "^7.6.3"
70
+ "semver": "^7.7.0"
71
71
  },
72
72
  "bundledDependencies": [
73
73
  "jsonschema",
@@ -80,7 +80,7 @@
80
80
  "main": "lib/index.js",
81
81
  "license": "Apache-2.0",
82
82
  "homepage": "https://github.com/cdklabs/cloud-assembly-schema",
83
- "version": "39.2.7",
83
+ "version": "39.2.9",
84
84
  "types": "lib/index.d.ts",
85
85
  "stability": "stable",
86
86
  "jsii": {