@@ -25545,6 +25545,93 @@ module.exports = {
2554525545}
2554625546
2554725547
25548+ /***/ }),
25549+
25550+ /***/ 9407:
25551+ /***/ ((module, __unused_webpack___webpack_exports__, __nccwpck_require__) => {
25552+
25553+ __nccwpck_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
25554+ /* harmony import */ var _main_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(1730);
25555+ // The entrypoint for the action
25556+
25557+ await (0,_main_js__WEBPACK_IMPORTED_MODULE_0__/* .run */ .e)();
25558+
25559+ __webpack_async_result__();
25560+ } catch(e) { __webpack_async_result__(e); } }, 1);
25561+
25562+ /***/ }),
25563+
25564+ /***/ 1730:
25565+ /***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => {
25566+
25567+ /* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
25568+ /* harmony export */ e: () => (/* binding */ run)
25569+ /* harmony export */ });
25570+ /* unused harmony export getVersions */
25571+ /* harmony import */ var _actions_core__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(7484);
25572+ /* harmony import */ var _actions_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nccwpck_require__.n(_actions_core__WEBPACK_IMPORTED_MODULE_0__);
25573+ /*
25574+ * Copyright (c) 2024, salesforce.com, inc.
25575+ * All rights reserved.
25576+ * Licensed under the BSD 3-Clause license.
25577+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
25578+ */
25579+
25580+ const getVersions = async () => {
25581+ // Get the node release schedule json
25582+ const response = await fetch("https://raw.githubusercontent.com/nodejs/Release/main/schedule.json");
25583+ const json = await response.json();
25584+ // This version of node was installed in the composite action before this script runs
25585+ // This defaults to 'lts/*' but allows for the user to override it with an env var
25586+ // Below we will replace the matching major version with this more specific version
25587+ // This will ensure that the unit tests run on the same version that will be shipped
25588+ const installedNode = process.versions.node;
25589+ // Support disabling certain versions via an environment variable
25590+ // They will be named like `NODE_DISABLE_VERSION_18` and will be set to `true`
25591+ const disabledVersions = Object.keys(process.env).filter((env) => env.startsWith('NODE_DISABLE_VERSION_')).map((env) => env.replace('NODE_DISABLE_VERSION_', ''));
25592+ const today = new Date();
25593+ // Build an array of versions that the current date is between the start and end dates
25594+ const versions = Object.keys(json)
25595+ .filter((version) => {
25596+ const startDate = new Date(json[version].start);
25597+ const endDate = new Date(json[version].end);
25598+ return today >= startDate && today <= endDate;
25599+ })
25600+ .map((version) => version.replace('v', ''))
25601+ // Remove versions that are disabled via env vars
25602+ .filter((version) => {
25603+ if (disabledVersions.includes(version)) {
25604+ (0,_actions_core__WEBPACK_IMPORTED_MODULE_0__.notice)(`Node version ${version} is disabled via env var`);
25605+ return false;
25606+ }
25607+ return true;
25608+ })
25609+ // Override the matching major version with the installed version
25610+ // for example if the installed version is 18.15.1, replace 18 with 18.15.1
25611+ .map((version) => {
25612+ if (version === installedNode.split('.')[0]) {
25613+ console.log(`Node version ${version} is overridden to ${installedNode}`);
25614+ return installedNode;
25615+ }
25616+ return version;
25617+ });
25618+ if (versions.length === 0) {
25619+ throw new Error('No versions found');
25620+ }
25621+ console.log('Found versions: ', versions);
25622+ return versions;
25623+ };
25624+ const run = async () => {
25625+ try {
25626+ const versions = await getVersions();
25627+ (0,_actions_core__WEBPACK_IMPORTED_MODULE_0__.setOutput)('nodeVersions', versions);
25628+ }
25629+ catch (error) {
25630+ (0,_actions_core__WEBPACK_IMPORTED_MODULE_0__.setFailed)(error.message);
25631+ }
25632+ };
25633+
25634+
2554825635/***/ }),
2554925636
2555025637/***/ 2613:
@@ -27368,101 +27455,6 @@ function parseParams (str) {
2736827455module.exports = parseParams
2736927456
2737027457
27371- /***/ }),
27372-
27373- /***/ 9722:
27374- /***/ ((__webpack_module__, __unused_webpack___webpack_exports__, __nccwpck_require__) => {
27375-
27376- __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
27377- /* harmony import */ var _main_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(8525);
27378- // The entrypoint for the action
27379-
27380-
27381- await (0,_main_js__WEBPACK_IMPORTED_MODULE_0__/* .run */ .e)()
27382-
27383- __webpack_async_result__();
27384- } catch(e) { __webpack_async_result__(e); } }, 1);
27385-
27386- /***/ }),
27387-
27388- /***/ 8525:
27389- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
27390-
27391- /* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
27392- /* harmony export */ e: () => (/* binding */ run)
27393- /* harmony export */ });
27394- /* unused harmony export getVersions */
27395- /* harmony import */ var _actions_core__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(7484);
27396- /*
27397- * Copyright (c) 2024, salesforce.com, inc.
27398- * All rights reserved.
27399- * Licensed under the BSD 3-Clause license.
27400- * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
27401- */
27402-
27403-
27404-
27405- const getVersions = async () => {
27406- // Get the node release schedule json
27407- const json = await (await fetch("https://raw.githubusercontent.com/nodejs/Release/main/schedule.json")).json();
27408-
27409- // This version of node was installed in the composite action before this script runs
27410- // This defaults to 'lts/*' but allows for the user to override it with an env var
27411- // Below we will replace the matching major version with this more specific version
27412- // This will ensure that the unit tests run on the same version that will be shipped
27413- const installedNode = process.versions.node;
27414-
27415- // Support disabling certain versions via an environment variable
27416- // They will be named like `NODE_DISABLE_VERSION_18` and will be set to `true`
27417- const disabledVersions = Object.keys(process.env).filter((env) => env.startsWith('NODE_DISABLE_VERSION_')).map((env) => env.replace('NODE_DISABLE_VERSION_', ''));
27418-
27419- const today = new Date();
27420-
27421- // Build an array of versions that the current date is between the start and end dates
27422- const versions = Object.keys(json)
27423- .filter((version) => {
27424- const startDate = new Date(json[version].start);
27425- const endDate = new Date(json[version].end);
27426- return today >= startDate && today <= endDate;
27427- })
27428- .map((version) => version.replace('v', ''))
27429- // Remove versions that are disabled via env vars
27430- .filter((version) => {
27431- if (disabledVersions.includes(version)) {
27432- _actions_core__WEBPACK_IMPORTED_MODULE_0__.notice(`Node version ${version} is disabled via env var`);
27433- return false;
27434- }
27435- return true;
27436- })
27437- // Override the matching major version with the installed version
27438- // for example if the installed version is 18.15.1, replace 18 with 18.15.1
27439- .map((version) => {
27440- if (version === installedNode.split('.')[0]) {
27441- console.log(`Node version ${version} is overridden to ${installedNode}`);
27442- return installedNode;
27443- }
27444- return version;
27445- })
27446-
27447- if (versions.length === 0) {
27448- throw new Error('No versions found');
27449- }
27450-
27451- console.log('Found versions: ', versions);
27452- return versions;
27453- };
27454-
27455- const run = async () => {
27456- try {
27457- const versions = await getVersions();
27458-
27459- _actions_core__WEBPACK_IMPORTED_MODULE_0__.setOutput('nodeVersions', versions)
27460- } catch (error) {
27461- _actions_core__WEBPACK_IMPORTED_MODULE_0__.setFailed(error.message);
27462- }
27463- };
27464-
27465-
2746627458/***/ })
2746727459
2746827460/******/ });
@@ -27567,6 +27559,18 @@ const run = async () => {
2756727559/******/ };
2756827560/******/ })();
2756927561/******/
27562+ /******/ /* webpack/runtime/compat get default export */
27563+ /******/ (() => {
27564+ /******/ // getDefaultExport function for compatibility with non-harmony modules
27565+ /******/ __nccwpck_require__.n = (module) => {
27566+ /******/ var getter = module && module.__esModule ?
27567+ /******/ () => (module['default']) :
27568+ /******/ () => (module);
27569+ /******/ __nccwpck_require__.d(getter, { a: getter });
27570+ /******/ return getter;
27571+ /******/ };
27572+ /******/ })();
27573+ /******/
2757027574/******/ /* webpack/runtime/define property getters */
2757127575/******/ (() => {
2757227576/******/ // define getter functions for harmony exports
@@ -27593,6 +27597,6 @@ const run = async () => {
2759327597/******/ // startup
2759427598/******/ // Load entry module and return exports
2759527599/******/ // This entry module used 'module' so it can't be inlined
27596- /******/ var __webpack_exports__ = __nccwpck_require__(9722 );
27600+ /******/ var __webpack_exports__ = __nccwpck_require__(9407 );
2759727601/******/ __webpack_exports__ = await __webpack_exports__;
2759827602/******/
0 commit comments