@aws-cdk/cloud-assembly-schema
Advanced tools
Comparing version 2.128.0 to 2.129.0
@@ -265,3 +265,3 @@ "use strict"; | ||
_a = JSII_RTTI_SYMBOL_1; | ||
Manifest[_a] = { fqn: "@aws-cdk/cloud-assembly-schema.Manifest", version: "2.128.0" }; | ||
Manifest[_a] = { fqn: "@aws-cdk/cloud-assembly-schema.Manifest", version: "2.129.0" }; | ||
function mapValues(xs, fn) { | ||
@@ -268,0 +268,0 @@ if (!xs) { |
@@ -22,3 +22,3 @@ const SemVer = require('../classes/semver') | ||
if (!options.rtl) { | ||
match = version.match(re[t.COERCE]) | ||
match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]) | ||
} else { | ||
@@ -28,2 +28,3 @@ // Find the right-most coercible string that does not share | ||
// Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' | ||
// With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4' | ||
// | ||
@@ -34,4 +35,5 @@ // Walk through the string checking with a /g regexp | ||
// coercible string can be more right-ward without the same terminus. | ||
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL] | ||
let next | ||
while ((next = re[t.COERCERTL].exec(version)) && | ||
while ((next = coerceRtlRegex.exec(version)) && | ||
(!match || match.index + match[0].length !== version.length) | ||
@@ -43,6 +45,6 @@ ) { | ||
} | ||
re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length | ||
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length | ||
} | ||
// leave it in a clean state | ||
re[t.COERCERTL].lastIndex = -1 | ||
coerceRtlRegex.lastIndex = -1 | ||
} | ||
@@ -54,4 +56,10 @@ | ||
return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options) | ||
const major = match[2] | ||
const minor = match[3] || '0' | ||
const patch = match[4] || '0' | ||
const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : '' | ||
const build = options.includePrerelease && match[6] ? `+${match[6]}` : '' | ||
return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options) | ||
} | ||
module.exports = coerce |
@@ -157,8 +157,13 @@ const { | ||
// Extract anything that could conceivably be a part of a valid semver | ||
createToken('COERCE', `${'(^|[^\\d])' + | ||
createToken('COERCEPLAIN', `${'(^|[^\\d])' + | ||
'(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + | ||
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + | ||
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + | ||
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`) | ||
createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`) | ||
createToken('COERCEFULL', src[t.COERCEPLAIN] + | ||
`(?:${src[t.PRERELEASE]})?` + | ||
`(?:${src[t.BUILD]})?` + | ||
`(?:$|[^\\d])`) | ||
createToken('COERCERTL', src[t.COERCE], true) | ||
createToken('COERCERTLFULL', src[t.COERCEFULL], true) | ||
@@ -165,0 +170,0 @@ // Tilde ranges. |
{ | ||
"name": "semver", | ||
"version": "7.5.4", | ||
"version": "7.6.0", | ||
"description": "The semantic version parser used by npm.", | ||
@@ -9,3 +9,3 @@ "main": "index.js", | ||
"snap": "tap", | ||
"lint": "eslint \"**/*.js\"", | ||
"lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", | ||
"postlint": "template-oss-check", | ||
@@ -18,3 +18,3 @@ "lintfix": "npm run lint -- --fix", | ||
"@npmcli/eslint-config": "^4.0.0", | ||
"@npmcli/template-oss": "4.17.0", | ||
"@npmcli/template-oss": "4.21.3", | ||
"tap": "^16.0.0" | ||
@@ -58,13 +58,4 @@ }, | ||
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", | ||
"version": "4.17.0", | ||
"version": "4.21.3", | ||
"engines": ">=10", | ||
"ciVersions": [ | ||
"10.0.0", | ||
"10.x", | ||
"12.x", | ||
"14.x", | ||
"16.x", | ||
"18.x" | ||
], | ||
"npmSpec": "8", | ||
"distPaths": [ | ||
@@ -71,0 +62,0 @@ "classes/", |
@@ -532,2 +532,6 @@ semver(1) -- The semantic versioner for npm | ||
If the `options.includePrerelease` flag is set, then the `coerce` result will contain | ||
prerelease and build parts of a version. For example, `1.2.3.4-rc.1+rev.2` | ||
will preserve prerelease `rc.1` and build `rev.2` in the result. | ||
### Clean | ||
@@ -547,3 +551,3 @@ | ||
* `s.clean('=v2.1.5')`: `'2.1.5'` | ||
* `s.clean(' =v2.1.5')`: `2.1.5` | ||
* `s.clean(' =v2.1.5')`: `'2.1.5'` | ||
* `s.clean(' 2.1.5 ')`: `'2.1.5'` | ||
@@ -550,0 +554,0 @@ * `s.clean('~1.0.0')`: `null` |
{ | ||
"name": "@aws-cdk/cloud-assembly-schema", | ||
"version": "2.128.0", | ||
"version": "2.129.0", | ||
"description": "Cloud Assembly Schema", | ||
@@ -83,8 +83,8 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@aws-cdk/cdk-build-tools": "2.128.0-alpha.0", | ||
"@aws-cdk/pkglint": "2.128.0-alpha.0", | ||
"@aws-cdk/cdk-build-tools": "2.129.0-alpha.0", | ||
"@aws-cdk/pkglint": "2.129.0-alpha.0", | ||
"@types/jest": "^29.5.12", | ||
"@types/mock-fs": "^4.13.4", | ||
"@types/semver": "^7.5.6", | ||
"aws-cdk-lib": "2.128.0", | ||
"@types/semver": "^7.5.7", | ||
"aws-cdk-lib": "2.129.0", | ||
"jest": "^29.7.0", | ||
@@ -114,3 +114,3 @@ "mock-fs": "^4.14.0", | ||
"jsonschema": "^1.4.1", | ||
"semver": "^7.5.4" | ||
"semver": "^7.6.0" | ||
}, | ||
@@ -117,0 +117,0 @@ "awscdkio": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
758259
9353
Updatedsemver@^7.6.0