@jsii/runtime 1.79.0 → 1.81.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsii/runtime",
3
- "version": "1.79.0",
3
+ "version": "1.81.0",
4
4
  "description": "jsii runtime kernel process",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -34,17 +34,17 @@
34
34
  "package": "package-js"
35
35
  },
36
36
  "dependencies": {
37
- "@jsii/kernel": "^1.79.0",
38
- "@jsii/check-node": "1.79.0",
39
- "@jsii/spec": "^1.79.0"
37
+ "@jsii/kernel": "^1.81.0",
38
+ "@jsii/check-node": "1.81.0",
39
+ "@jsii/spec": "^1.81.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@scope/jsii-calc-base": "^1.79.0",
43
- "@scope/jsii-calc-lib": "^1.79.0",
44
- "jsii-build-tools": "^1.79.0",
42
+ "@scope/jsii-calc-base": "^1.81.0",
43
+ "@scope/jsii-calc-lib": "^1.81.0",
44
+ "jsii-build-tools": "^1.81.0",
45
45
  "jsii-calc": "^3.20.120",
46
46
  "source-map-loader": "^4.0.1",
47
- "webpack": "^5.76.2",
47
+ "webpack": "^5.79.0",
48
48
  "webpack-cli": "^5.0.1"
49
49
  }
50
50
  }
@@ -1511,12 +1511,6 @@ var __webpack_modules__ = {
1511
1511
  if (!(comp instanceof Comparator)) {
1512
1512
  throw new TypeError("a Comparator is required");
1513
1513
  }
1514
- if (!options || typeof options !== "object") {
1515
- options = {
1516
- loose: !!options,
1517
- includePrerelease: false
1518
- };
1519
- }
1520
1514
  if (this.operator === "") {
1521
1515
  if (this.value === "") {
1522
1516
  return true;
@@ -1528,13 +1522,29 @@ var __webpack_modules__ = {
1528
1522
  }
1529
1523
  return new Range(this.value, options).test(comp.semver);
1530
1524
  }
1531
- const sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">");
1532
- const sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<");
1533
- const sameSemVer = this.semver.version === comp.semver.version;
1534
- const differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<=");
1535
- const oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && (this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<");
1536
- const oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && (this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">");
1537
- return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
1525
+ options = parseOptions(options);
1526
+ if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
1527
+ return false;
1528
+ }
1529
+ if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
1530
+ return false;
1531
+ }
1532
+ if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
1533
+ return true;
1534
+ }
1535
+ if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
1536
+ return true;
1537
+ }
1538
+ if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
1539
+ return true;
1540
+ }
1541
+ if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
1542
+ return true;
1543
+ }
1544
+ if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
1545
+ return true;
1546
+ }
1547
+ return false;
1538
1548
  }
1539
1549
  }
1540
1550
  module.exports = Comparator;
@@ -1595,8 +1605,8 @@ var __webpack_modules__ = {
1595
1605
  }
1596
1606
  parseRange(range) {
1597
1607
  range = range.trim();
1598
- const memoOpts = Object.keys(this.options).join(",");
1599
- const memoKey = `parseRange:${memoOpts}:${range}`;
1608
+ const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
1609
+ const memoKey = memoOpts + ":" + range;
1600
1610
  const cached = cache.get(memoKey);
1601
1611
  if (cached) {
1602
1612
  return cached;
@@ -1668,6 +1678,7 @@ var __webpack_modules__ = {
1668
1678
  const debug = __webpack_require__(5432);
1669
1679
  const SemVer = __webpack_require__(3013);
1670
1680
  const {re, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace} = __webpack_require__(9541);
1681
+ const {FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE} = __webpack_require__(9041);
1671
1682
  const isNullSet = c => c.value === "<0.0.0-0";
1672
1683
  const isAny = c => c.value === "";
1673
1684
  const isSatisfiable = (comparators, options) => {
@@ -1894,7 +1905,7 @@ var __webpack_modules__ = {
1894
1905
  version = version.version;
1895
1906
  }
1896
1907
  } else if (typeof version !== "string") {
1897
- throw new TypeError(`Invalid Version: ${version}`);
1908
+ throw new TypeError(`Invalid Version: ${__webpack_require__(3837).inspect(version)}`);
1898
1909
  }
1899
1910
  if (version.length > MAX_LENGTH) {
1900
1911
  throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
@@ -2016,34 +2027,34 @@ var __webpack_modules__ = {
2016
2027
  }
2017
2028
  } while (++i);
2018
2029
  }
2019
- inc(release, identifier) {
2030
+ inc(release, identifier, identifierBase) {
2020
2031
  switch (release) {
2021
2032
  case "premajor":
2022
2033
  this.prerelease.length = 0;
2023
2034
  this.patch = 0;
2024
2035
  this.minor = 0;
2025
2036
  this.major++;
2026
- this.inc("pre", identifier);
2037
+ this.inc("pre", identifier, identifierBase);
2027
2038
  break;
2028
2039
 
2029
2040
  case "preminor":
2030
2041
  this.prerelease.length = 0;
2031
2042
  this.patch = 0;
2032
2043
  this.minor++;
2033
- this.inc("pre", identifier);
2044
+ this.inc("pre", identifier, identifierBase);
2034
2045
  break;
2035
2046
 
2036
2047
  case "prepatch":
2037
2048
  this.prerelease.length = 0;
2038
- this.inc("patch", identifier);
2039
- this.inc("pre", identifier);
2049
+ this.inc("patch", identifier, identifierBase);
2050
+ this.inc("pre", identifier, identifierBase);
2040
2051
  break;
2041
2052
 
2042
2053
  case "prerelease":
2043
2054
  if (this.prerelease.length === 0) {
2044
- this.inc("patch", identifier);
2055
+ this.inc("patch", identifier, identifierBase);
2045
2056
  }
2046
- this.inc("pre", identifier);
2057
+ this.inc("pre", identifier, identifierBase);
2047
2058
  break;
2048
2059
 
2049
2060
  case "major":
@@ -2071,30 +2082,43 @@ var __webpack_modules__ = {
2071
2082
  break;
2072
2083
 
2073
2084
  case "pre":
2074
- if (this.prerelease.length === 0) {
2075
- this.prerelease = [ 0 ];
2076
- } else {
2077
- let i = this.prerelease.length;
2078
- while (--i >= 0) {
2079
- if (typeof this.prerelease[i] === "number") {
2080
- this.prerelease[i]++;
2081
- i = -2;
2082
- }
2085
+ {
2086
+ const base = Number(identifierBase) ? 1 : 0;
2087
+ if (!identifier && identifierBase === false) {
2088
+ throw new Error("invalid increment argument: identifier is empty");
2083
2089
  }
2084
- if (i === -1) {
2085
- this.prerelease.push(0);
2090
+ if (this.prerelease.length === 0) {
2091
+ this.prerelease = [ base ];
2092
+ } else {
2093
+ let i = this.prerelease.length;
2094
+ while (--i >= 0) {
2095
+ if (typeof this.prerelease[i] === "number") {
2096
+ this.prerelease[i]++;
2097
+ i = -2;
2098
+ }
2099
+ }
2100
+ if (i === -1) {
2101
+ if (identifier === this.prerelease.join(".") && identifierBase === false) {
2102
+ throw new Error("invalid increment argument: identifier already exists");
2103
+ }
2104
+ this.prerelease.push(base);
2105
+ }
2086
2106
  }
2087
- }
2088
- if (identifier) {
2089
- if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
2090
- if (isNaN(this.prerelease[1])) {
2091
- this.prerelease = [ identifier, 0 ];
2107
+ if (identifier) {
2108
+ let prerelease = [ identifier, base ];
2109
+ if (identifierBase === false) {
2110
+ prerelease = [ identifier ];
2111
+ }
2112
+ if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
2113
+ if (isNaN(this.prerelease[1])) {
2114
+ this.prerelease = prerelease;
2115
+ }
2116
+ } else {
2117
+ this.prerelease = prerelease;
2092
2118
  }
2093
- } else {
2094
- this.prerelease = [ identifier, 0 ];
2095
2119
  }
2120
+ break;
2096
2121
  }
2097
- break;
2098
2122
 
2099
2123
  default:
2100
2124
  throw new Error(`invalid increment argument: ${release}`);
@@ -2223,25 +2247,37 @@ var __webpack_modules__ = {
2223
2247
  },
2224
2248
  5209: (module, __unused_webpack_exports, __webpack_require__) => {
2225
2249
  const parse = __webpack_require__(7507);
2226
- const eq = __webpack_require__(8443);
2227
2250
  const diff = (version1, version2) => {
2228
- if (eq(version1, version2)) {
2251
+ const v1 = parse(version1, null, true);
2252
+ const v2 = parse(version2, null, true);
2253
+ const comparison = v1.compare(v2);
2254
+ if (comparison === 0) {
2229
2255
  return null;
2230
- } else {
2231
- const v1 = parse(version1);
2232
- const v2 = parse(version2);
2233
- const hasPre = v1.prerelease.length || v2.prerelease.length;
2234
- const prefix = hasPre ? "pre" : "";
2235
- const defaultResult = hasPre ? "prerelease" : "";
2236
- for (const key in v1) {
2237
- if (key === "major" || key === "minor" || key === "patch") {
2238
- if (v1[key] !== v2[key]) {
2239
- return prefix + key;
2240
- }
2241
- }
2242
- }
2243
- return defaultResult;
2244
2256
  }
2257
+ const v1Higher = comparison > 0;
2258
+ const highVersion = v1Higher ? v1 : v2;
2259
+ const lowVersion = v1Higher ? v2 : v1;
2260
+ const highHasPre = !!highVersion.prerelease.length;
2261
+ const prefix = highHasPre ? "pre" : "";
2262
+ if (v1.major !== v2.major) {
2263
+ return prefix + "major";
2264
+ }
2265
+ if (v1.minor !== v2.minor) {
2266
+ return prefix + "minor";
2267
+ }
2268
+ if (v1.patch !== v2.patch) {
2269
+ return prefix + "patch";
2270
+ }
2271
+ if (highHasPre) {
2272
+ return "prerelease";
2273
+ }
2274
+ if (lowVersion.patch) {
2275
+ return "patch";
2276
+ }
2277
+ if (lowVersion.minor) {
2278
+ return "minor";
2279
+ }
2280
+ return "major";
2245
2281
  };
2246
2282
  module.exports = diff;
2247
2283
  },
@@ -2262,13 +2298,14 @@ var __webpack_modules__ = {
2262
2298
  },
2263
2299
  5210: (module, __unused_webpack_exports, __webpack_require__) => {
2264
2300
  const SemVer = __webpack_require__(3013);
2265
- const inc = (version, release, options, identifier) => {
2301
+ const inc = (version, release, options, identifier, identifierBase) => {
2266
2302
  if (typeof options === "string") {
2303
+ identifierBase = identifier;
2267
2304
  identifier = options;
2268
2305
  options = undefined;
2269
2306
  }
2270
2307
  try {
2271
- return new SemVer(version instanceof SemVer ? version.version : version, options).inc(release, identifier).version;
2308
+ return new SemVer(version instanceof SemVer ? version.version : version, options).inc(release, identifier, identifierBase).version;
2272
2309
  } catch (er) {
2273
2310
  return null;
2274
2311
  }
@@ -2301,29 +2338,18 @@ var __webpack_modules__ = {
2301
2338
  module.exports = neq;
2302
2339
  },
2303
2340
  7507: (module, __unused_webpack_exports, __webpack_require__) => {
2304
- const {MAX_LENGTH} = __webpack_require__(9041);
2305
- const {re, t} = __webpack_require__(9541);
2306
2341
  const SemVer = __webpack_require__(3013);
2307
- const parseOptions = __webpack_require__(3867);
2308
- const parse = (version, options) => {
2309
- options = parseOptions(options);
2342
+ const parse = (version, options, throwErrors = false) => {
2310
2343
  if (version instanceof SemVer) {
2311
2344
  return version;
2312
2345
  }
2313
- if (typeof version !== "string") {
2314
- return null;
2315
- }
2316
- if (version.length > MAX_LENGTH) {
2317
- return null;
2318
- }
2319
- const r = options.loose ? re[t.LOOSE] : re[t.FULL];
2320
- if (!r.test(version)) {
2321
- return null;
2322
- }
2323
2346
  try {
2324
2347
  return new SemVer(version, options);
2325
2348
  } catch (er) {
2326
- return null;
2349
+ if (!throwErrors) {
2350
+ return null;
2351
+ }
2352
+ throw er;
2327
2353
  }
2328
2354
  };
2329
2355
  module.exports = parse;
@@ -2461,6 +2487,7 @@ var __webpack_modules__ = {
2461
2487
  src: internalRe.src,
2462
2488
  tokens: internalRe.t,
2463
2489
  SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
2490
+ RELEASE_TYPES: constants.RELEASE_TYPES,
2464
2491
  compareIdentifiers: identifiers.compareIdentifiers,
2465
2492
  rcompareIdentifiers: identifiers.rcompareIdentifiers
2466
2493
  };
@@ -2470,11 +2497,15 @@ var __webpack_modules__ = {
2470
2497
  const MAX_LENGTH = 256;
2471
2498
  const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
2472
2499
  const MAX_SAFE_COMPONENT_LENGTH = 16;
2500
+ const RELEASE_TYPES = [ "major", "premajor", "minor", "preminor", "patch", "prepatch", "prerelease" ];
2473
2501
  module.exports = {
2474
- SEMVER_SPEC_VERSION,
2475
2502
  MAX_LENGTH,
2503
+ MAX_SAFE_COMPONENT_LENGTH,
2476
2504
  MAX_SAFE_INTEGER,
2477
- MAX_SAFE_COMPONENT_LENGTH
2505
+ RELEASE_TYPES,
2506
+ SEMVER_SPEC_VERSION,
2507
+ FLAG_INCLUDE_PRERELEASE: 1,
2508
+ FLAG_LOOSE: 2
2478
2509
  };
2479
2510
  },
2480
2511
  5432: module => {
@@ -2499,13 +2530,19 @@ var __webpack_modules__ = {
2499
2530
  };
2500
2531
  },
2501
2532
  3867: module => {
2502
- const opts = [ "includePrerelease", "loose", "rtl" ];
2503
- const parseOptions = options => !options ? {} : typeof options !== "object" ? {
2533
+ const looseOption = Object.freeze({
2504
2534
  loose: true
2505
- } : opts.filter((k => options[k])).reduce(((o, k) => {
2506
- o[k] = true;
2507
- return o;
2508
- }), {});
2535
+ });
2536
+ const emptyOpts = Object.freeze({});
2537
+ const parseOptions = options => {
2538
+ if (!options) {
2539
+ return emptyOpts;
2540
+ }
2541
+ if (typeof options !== "object") {
2542
+ return looseOption;
2543
+ }
2544
+ return options;
2545
+ };
2509
2546
  module.exports = parseOptions;
2510
2547
  },
2511
2548
  9541: (module, exports, __webpack_require__) => {
@@ -2823,7 +2860,7 @@ var __webpack_modules__ = {
2823
2860
  const intersects = (r1, r2, options) => {
2824
2861
  r1 = new Range(r1, options);
2825
2862
  r2 = new Range(r2, options);
2826
- return r1.intersects(r2);
2863
+ return r1.intersects(r2, options);
2827
2864
  };
2828
2865
  module.exports = intersects;
2829
2866
  },
@@ -3073,6 +3110,8 @@ var __webpack_modules__ = {
3073
3110
  }
3074
3111
  return true;
3075
3112
  };
3113
+ const minimumVersionWithPreRelease = [ new Comparator(">=0.0.0-0") ];
3114
+ const minimumVersion = [ new Comparator(">=0.0.0") ];
3076
3115
  const simpleSubset = (sub, dom, options) => {
3077
3116
  if (sub === dom) {
3078
3117
  return true;
@@ -3081,16 +3120,16 @@ var __webpack_modules__ = {
3081
3120
  if (dom.length === 1 && dom[0].semver === ANY) {
3082
3121
  return true;
3083
3122
  } else if (options.includePrerelease) {
3084
- sub = [ new Comparator(">=0.0.0-0") ];
3123
+ sub = minimumVersionWithPreRelease;
3085
3124
  } else {
3086
- sub = [ new Comparator(">=0.0.0") ];
3125
+ sub = minimumVersion;
3087
3126
  }
3088
3127
  }
3089
3128
  if (dom.length === 1 && dom[0].semver === ANY) {
3090
3129
  if (options.includePrerelease) {
3091
3130
  return true;
3092
3131
  } else {
3093
- dom = [ new Comparator(">=0.0.0") ];
3132
+ dom = minimumVersion;
3094
3133
  }
3095
3134
  }
3096
3135
  const eqSet = new Set;
@@ -3781,8 +3820,10 @@ var __webpack_modules__ = {
3781
3820
  const {nodeRelease, knownBroken} = constants_1.NodeRelease.forThisRuntime();
3782
3821
  const defaultCallToAction = "Should you encounter odd runtime issues, please try using one of the supported release before filing a bug report.";
3783
3822
  if (nodeRelease === null || nodeRelease === void 0 ? void 0 : nodeRelease.endOfLife) {
3823
+ const silenceVariable = `${envPrefix}_SILENCE_WARNING_END_OF_LIFE_NODE_VERSION`;
3824
+ const acknowledgeNodeEol = "Node14 is now end of life (EOL) as of April 30, 2023. Support of EOL runtimes are only guaranteed for 30 days after EOL. By silencing this warning you acknowledge that you are using an EOL version of Node and will upgrade to a supported version as soon as possible.";
3784
3825
  const qualifier = nodeRelease.endOfLifeDate ? ` on ${nodeRelease.endOfLifeDate.toISOString().slice(0, 10)}` : "";
3785
- veryVisibleMessage(chalk_1.bgRed.white.bold, `Node ${nodeRelease.majorVersion} has reached end-of-life${qualifier} and is not supported.`, `Please upgrade to a supported node version as soon as possible.`);
3826
+ if (!(process.env[silenceVariable] === acknowledgeNodeEol)) veryVisibleMessage(chalk_1.bgRed.white.bold, `Node ${nodeRelease.majorVersion} has reached end-of-life${qualifier} and is not supported.`, `Please upgrade to a supported node version as soon as possible.`);
3786
3827
  } else if (knownBroken) {
3787
3828
  const silenceVariable = `${envPrefix}_SILENCE_WARNING_KNOWN_BROKEN_NODE_VERSION`;
3788
3829
  if (!process.env[silenceVariable]) veryVisibleMessage(chalk_1.bgRed.white.bold, `Node ${process_1.version} is unsupported and has known compatibility issues with this software.`, defaultCallToAction, silenceVariable);
@@ -3846,6 +3887,10 @@ var __webpack_modules__ = {
3846
3887
  6224: module => {
3847
3888
  "use strict";
3848
3889
  module.exports = require("tty");
3890
+ },
3891
+ 3837: module => {
3892
+ "use strict";
3893
+ module.exports = require("util");
3849
3894
  }
3850
3895
  };
3851
3896
 
@@ -17312,7 +17312,7 @@ var __webpack_modules__ = {
17312
17312
  },
17313
17313
  4147: module => {
17314
17314
  "use strict";
17315
- module.exports = JSON.parse('{"name":"@jsii/runtime","version":"1.79.0","description":"jsii runtime kernel process","license":"Apache-2.0","author":{"name":"Amazon Web Services","url":"https://aws.amazon.com"},"homepage":"https://github.com/aws/jsii","bugs":{"url":"https://github.com/aws/jsii/issues"},"repository":{"type":"git","url":"https://github.com/aws/jsii.git","directory":"packages/@jsii/runtime"},"engines":{"node":">= 14.6.0"},"main":"lib/index.js","types":"lib/index.d.ts","bin":{"jsii-runtime":"bin/jsii-runtime"},"scripts":{"build":"tsc --build && chmod +x bin/jsii-runtime && npx webpack-cli && npm run lint","watch":"tsc --build -w","lint":"eslint . --ext .js,.ts --ignore-path=.gitignore --ignore-pattern=webpack.config.js","lint:fix":"yarn lint --fix","test":"jest","test:update":"jest -u","package":"package-js"},"dependencies":{"@jsii/kernel":"^1.79.0","@jsii/check-node":"1.79.0","@jsii/spec":"^1.79.0"},"devDependencies":{"@scope/jsii-calc-base":"^1.79.0","@scope/jsii-calc-lib":"^1.79.0","jsii-build-tools":"^1.79.0","jsii-calc":"^3.20.120","source-map-loader":"^4.0.1","webpack":"^5.76.2","webpack-cli":"^5.0.1"}}');
17315
+ module.exports = JSON.parse('{"name":"@jsii/runtime","version":"1.81.0","description":"jsii runtime kernel process","license":"Apache-2.0","author":{"name":"Amazon Web Services","url":"https://aws.amazon.com"},"homepage":"https://github.com/aws/jsii","bugs":{"url":"https://github.com/aws/jsii/issues"},"repository":{"type":"git","url":"https://github.com/aws/jsii.git","directory":"packages/@jsii/runtime"},"engines":{"node":">= 14.6.0"},"main":"lib/index.js","types":"lib/index.d.ts","bin":{"jsii-runtime":"bin/jsii-runtime"},"scripts":{"build":"tsc --build && chmod +x bin/jsii-runtime && npx webpack-cli && npm run lint","watch":"tsc --build -w","lint":"eslint . --ext .js,.ts --ignore-path=.gitignore --ignore-pattern=webpack.config.js","lint:fix":"yarn lint --fix","test":"jest","test:update":"jest -u","package":"package-js"},"dependencies":{"@jsii/kernel":"^1.81.0","@jsii/check-node":"1.81.0","@jsii/spec":"^1.81.0"},"devDependencies":{"@scope/jsii-calc-base":"^1.81.0","@scope/jsii-calc-lib":"^1.81.0","jsii-build-tools":"^1.81.0","jsii-calc":"^3.20.120","source-map-loader":"^4.0.1","webpack":"^5.79.0","webpack-cli":"^5.0.1"}}');
17316
17316
  },
17317
17317
  5277: module => {
17318
17318
  "use strict";