@jsii/runtime 1.70.0 → 1.72.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.70.0",
3
+ "version": "1.72.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.70.0",
38
- "@jsii/check-node": "1.70.0",
39
- "@jsii/spec": "^1.70.0"
37
+ "@jsii/kernel": "^1.72.0",
38
+ "@jsii/check-node": "1.72.0",
39
+ "@jsii/spec": "^1.72.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@scope/jsii-calc-base": "^1.70.0",
43
- "@scope/jsii-calc-lib": "^1.70.0",
44
- "jsii-build-tools": "^1.70.0",
42
+ "@scope/jsii-calc-base": "^1.72.0",
43
+ "@scope/jsii-calc-lib": "^1.72.0",
44
+ "jsii-build-tools": "^1.72.0",
45
45
  "jsii-calc": "^3.20.120",
46
46
  "source-map-loader": "^4.0.1",
47
- "webpack": "^5.74.0",
48
- "webpack-cli": "^4.10.0"
47
+ "webpack": "^5.75.0",
48
+ "webpack-cli": "^5.0.0"
49
49
  }
50
50
  }
@@ -3754,8 +3754,7 @@ var __webpack_modules__ = {
3754
3754
  }), new NodeRelease(18, {
3755
3755
  endOfLife: new Date("2025-04-30")
3756
3756
  }), new NodeRelease(19, {
3757
- endOfLife: new Date("2023-06-01"),
3758
- untested: true
3757
+ endOfLife: new Date("2023-06-01")
3759
3758
  }), new NodeRelease(20, {
3760
3759
  endOfLife: new Date("2026-04-30"),
3761
3760
  untested: true
@@ -3771,24 +3770,32 @@ var __webpack_modules__ = {
3771
3770
  const console_1 = __webpack_require__(6206);
3772
3771
  const process_1 = __webpack_require__(7282);
3773
3772
  const constants_1 = __webpack_require__(6829);
3774
- function checkNode() {
3773
+ function checkNode(envPrefix = "JSII") {
3775
3774
  const {nodeRelease, knownBroken} = constants_1.NodeRelease.forThisRuntime();
3775
+ const defaultCallToAction = "Should you encounter odd runtime issues, please try using one of the supported release before filing a bug report.";
3776
3776
  if (nodeRelease === null || nodeRelease === void 0 ? void 0 : nodeRelease.endOfLife) {
3777
3777
  const qualifier = nodeRelease.endOfLifeDate ? ` on ${nodeRelease.endOfLifeDate.toISOString().slice(0, 10)}` : "";
3778
3778
  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.`);
3779
3779
  } else if (knownBroken) {
3780
- veryVisibleMessage(chalk_1.bgRed.white.bold, `Node ${process_1.version} is unsupported and has known compatibility issues with this software.`);
3780
+ const silenceVariable = `${envPrefix}_SILENCE_WARNING_KNOWN_BROKEN_NODE_VERSION`;
3781
+ 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);
3781
3782
  } else if (!nodeRelease || nodeRelease.untested) {
3782
- veryVisibleMessage(chalk_1.bgYellow.black, `This software has not been tested with node ${process_1.version}.`);
3783
+ const silenceVariable = `${envPrefix}_SILENCE_WARNING_UNTESTED_NODE_VERSION`;
3784
+ if (!process.env[silenceVariable]) {
3785
+ veryVisibleMessage(chalk_1.bgYellow.black, `This software has not been tested with node ${process_1.version}.`, defaultCallToAction, silenceVariable);
3786
+ }
3783
3787
  } else if (nodeRelease === null || nodeRelease === void 0 ? void 0 : nodeRelease.deprecated) {
3784
- const deadline = nodeRelease.endOfLifeDate.toISOString().slice(0, 10);
3785
- veryVisibleMessage(chalk_1.bgYellowBright.black, `Node ${nodeRelease.majorVersion} is approaching end-of-life and will no longer be supported in new releases after ${deadline}.`, `Please upgrade to a supported node version as soon as possible.`);
3788
+ const silenceVariable = `${envPrefix}_SILENCE_WARNING_DEPRECATED_NODE_VERSION`;
3789
+ if (!process.env[silenceVariable]) {
3790
+ const deadline = nodeRelease.endOfLifeDate.toISOString().slice(0, 10);
3791
+ veryVisibleMessage(chalk_1.bgYellowBright.black, `Node ${nodeRelease.majorVersion} is approaching end-of-life and will no longer be supported in new releases after ${deadline}.`, `Please upgrade to a supported node version as soon as possible.`, silenceVariable);
3792
+ }
3786
3793
  }
3787
- function veryVisibleMessage(chalk, message, callToAction = "You may to encounter runtime issues, and should switch to a supported release.") {
3794
+ function veryVisibleMessage(chalk, message, callToAction, silenceVariable) {
3788
3795
  const lines = [ message, callToAction, "", `This software is currently running on node ${process_1.version}.`, "As of the current release of this software, supported node releases are:", ...constants_1.NodeRelease.ALL_RELEASES.filter((release => release.supported)).sort(((l, r) => {
3789
3796
  var _a, _b, _c, _d;
3790
3797
  return ((_b = (_a = r.endOfLifeDate) === null || _a === void 0 ? void 0 : _a.getTime()) !== null && _b !== void 0 ? _b : 0) - ((_d = (_c = l.endOfLifeDate) === null || _c === void 0 ? void 0 : _c.getTime()) !== null && _d !== void 0 ? _d : 0);
3791
- })).map((release => `- ${release.toString()}${release.deprecated ? " [DEPRECATED]" : ""}`)) ];
3798
+ })).map((release => `- ${release.toString()}${release.deprecated ? " [DEPRECATED]" : ""}`)), ...silenceVariable ? [ "", `This warning can be silenced by setting the ${silenceVariable} environment variable.` ] : [] ];
3792
3799
  const len = Math.max(...lines.map((l => l.length)));
3793
3800
  const border = chalk("!".repeat(len + 8));
3794
3801
  const spacer = chalk(`!! ${" ".repeat(len)} !!`);