@aws-cdk/cloud-assembly-schema 2.128.0 → 2.129.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.
package/.jsii CHANGED
@@ -9,14 +9,14 @@
9
9
  },
10
10
  "bundled": {
11
11
  "jsonschema": "^1.4.1",
12
- "semver": "^7.5.4"
12
+ "semver": "^7.6.0"
13
13
  },
14
14
  "description": "Cloud Assembly Schema",
15
15
  "docs": {
16
16
  "stability": "stable"
17
17
  },
18
18
  "homepage": "https://github.com/aws/aws-cdk",
19
- "jsiiVersion": "5.3.12 (build f9c1b68)",
19
+ "jsiiVersion": "5.3.18 (build 4f1b2de)",
20
20
  "keywords": [
21
21
  "aws",
22
22
  "cdk"
@@ -5945,6 +5945,6 @@
5945
5945
  "symbolId": "lib/cloud-assembly/context-queries:VpcContextQuery"
5946
5946
  }
5947
5947
  },
5948
- "version": "2.128.0",
5948
+ "version": "2.129.0",
5949
5949
  "fingerprint": "**********"
5950
5950
  }
Binary file
package/lib/manifest.js CHANGED
@@ -262,7 +262,7 @@ class Manifest {
262
262
  }
263
263
  exports.Manifest = Manifest;
264
264
  _a = JSII_RTTI_SYMBOL_1;
265
- Manifest[_a] = { fqn: "@aws-cdk/cloud-assembly-schema.Manifest", version: "2.128.0" };
265
+ Manifest[_a] = { fqn: "@aws-cdk/cloud-assembly-schema.Manifest", version: "2.129.0" };
266
266
  function mapValues(xs, fn) {
267
267
  if (!xs) {
268
268
  return undefined;
@@ -529,6 +529,10 @@ tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not
529
529
  `4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of
530
530
  any other overlapping SemVer tuple.
531
531
 
532
+ If the `options.includePrerelease` flag is set, then the `coerce` result will contain
533
+ prerelease and build parts of a version. For example, `1.2.3.4-rc.1+rev.2`
534
+ will preserve prerelease `rc.1` and build `rev.2` in the result.
535
+
532
536
  ### Clean
533
537
 
534
538
  * `clean(version)`: Clean a string to be a valid semver if possible
@@ -543,7 +547,7 @@ ex.
543
547
  * `s.clean(' = v 2.1.5-foo')`: `null`
544
548
  * `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'`
545
549
  * `s.clean('=v2.1.5')`: `'2.1.5'`
546
- * `s.clean(' =v2.1.5')`: `2.1.5`
550
+ * `s.clean(' =v2.1.5')`: `'2.1.5'`
547
551
  * `s.clean(' 2.1.5 ')`: `'2.1.5'`
548
552
  * `s.clean('~1.0.0')`: `null`
549
553
 
@@ -19,34 +19,42 @@ const coerce = (version, options) => {
19
19
 
20
20
  let match = null
21
21
  if (!options.rtl) {
22
- match = version.match(re[t.COERCE])
22
+ match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE])
23
23
  } else {
24
24
  // Find the right-most coercible string that does not share
25
25
  // a terminus with a more left-ward coercible string.
26
26
  // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'
27
+ // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'
27
28
  //
28
29
  // Walk through the string checking with a /g regexp
29
30
  // Manually set the index so as to pick up overlapping matches.
30
31
  // Stop when we get a match that ends at the string end, since no
31
32
  // coercible string can be more right-ward without the same terminus.
33
+ const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]
32
34
  let next
33
- while ((next = re[t.COERCERTL].exec(version)) &&
35
+ while ((next = coerceRtlRegex.exec(version)) &&
34
36
  (!match || match.index + match[0].length !== version.length)
35
37
  ) {
36
38
  if (!match ||
37
39
  next.index + next[0].length !== match.index + match[0].length) {
38
40
  match = next
39
41
  }
40
- re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length
42
+ coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length
41
43
  }
42
44
  // leave it in a clean state
43
- re[t.COERCERTL].lastIndex = -1
45
+ coerceRtlRegex.lastIndex = -1
44
46
  }
45
47
 
46
48
  if (match === null) {
47
49
  return null
48
50
  }
49
51
 
50
- return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options)
52
+ const major = match[2]
53
+ const minor = match[3] || '0'
54
+ const patch = match[4] || '0'
55
+ const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''
56
+ const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''
57
+
58
+ return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)
51
59
  }
52
60
  module.exports = coerce
@@ -154,12 +154,17 @@ createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`)
154
154
 
155
155
  // Coercion.
156
156
  // Extract anything that could conceivably be a part of a valid semver
157
- createToken('COERCE', `${'(^|[^\\d])' +
157
+ createToken('COERCEPLAIN', `${'(^|[^\\d])' +
158
158
  '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
159
159
  `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
160
- `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
160
+ `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)
161
+ createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`)
162
+ createToken('COERCEFULL', src[t.COERCEPLAIN] +
163
+ `(?:${src[t.PRERELEASE]})?` +
164
+ `(?:${src[t.BUILD]})?` +
161
165
  `(?:$|[^\\d])`)
162
166
  createToken('COERCERTL', src[t.COERCE], true)
167
+ createToken('COERCERTLFULL', src[t.COERCEFULL], true)
163
168
 
164
169
  // Tilde ranges.
165
170
  // Meaning is "reasonably at or greater than"
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "semver",
3
- "version": "7.5.4",
3
+ "version": "7.6.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\"",
9
+ "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
10
10
  "postlint": "template-oss-check",
11
11
  "lintfix": "npm run lint -- --fix",
12
12
  "posttest": "npm run lint",
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "devDependencies": {
16
16
  "@npmcli/eslint-config": "^4.0.0",
17
- "@npmcli/template-oss": "4.17.0",
17
+ "@npmcli/template-oss": "4.21.3",
18
18
  "tap": "^16.0.0"
19
19
  },
20
20
  "license": "ISC",
@@ -53,17 +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.17.0",
56
+ "version": "4.21.3",
57
57
  "engines": ">=10",
58
- "ciVersions": [
59
- "10.0.0",
60
- "10.x",
61
- "12.x",
62
- "14.x",
63
- "16.x",
64
- "18.x"
65
- ],
66
- "npmSpec": "8",
67
58
  "distPaths": [
68
59
  "classes/",
69
60
  "functions/",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-cdk/cloud-assembly-schema",
3
- "version": "2.128.0",
3
+ "version": "2.129.0",
4
4
  "description": "Cloud Assembly Schema",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -80,12 +80,12 @@
80
80
  },
81
81
  "license": "Apache-2.0",
82
82
  "devDependencies": {
83
- "@aws-cdk/cdk-build-tools": "2.128.0-alpha.0",
84
- "@aws-cdk/pkglint": "2.128.0-alpha.0",
83
+ "@aws-cdk/cdk-build-tools": "2.129.0-alpha.0",
84
+ "@aws-cdk/pkglint": "2.129.0-alpha.0",
85
85
  "@types/jest": "^29.5.12",
86
86
  "@types/mock-fs": "^4.13.4",
87
- "@types/semver": "^7.5.6",
88
- "aws-cdk-lib": "2.128.0",
87
+ "@types/semver": "^7.5.7",
88
+ "aws-cdk-lib": "2.129.0",
89
89
  "jest": "^29.7.0",
90
90
  "mock-fs": "^4.14.0",
91
91
  "typescript-json-schema": "^0.62.0"
@@ -110,7 +110,7 @@
110
110
  "stability": "stable",
111
111
  "dependencies": {
112
112
  "jsonschema": "^1.4.1",
113
- "semver": "^7.5.4"
113
+ "semver": "^7.6.0"
114
114
  },
115
115
  "awscdkio": {
116
116
  "announce": false