From 79211d23ad96972bf9379a13d833315b4dd0fb1f Mon Sep 17 00:00:00 2001 From: Steve Haslam Date: Tue, 30 Jan 2024 10:56:41 +0000 Subject: [PATCH] Update NCC and harmonise tsconfig --- dist/index.js | 77 ++++++++++++++++++++++++--------------------------- package.json | 3 +- tsconfig.json | 5 +++- yarn.lock | 13 ++++++--- 4 files changed, 51 insertions(+), 47 deletions(-) diff --git a/dist/index.js b/dist/index.js index 3dc3f0c..a894f63 100644 --- a/dist/index.js +++ b/dist/index.js @@ -8302,7 +8302,7 @@ module.exports = v4; /***/ 6144: /***/ ((module, __unused_webpack___webpack_exports__, __nccwpck_require__) => { -__nccwpck_require__.a(module, async (__webpack_handle_async_dependencies__) => { +__nccwpck_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try { /* harmony import */ var node_process__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(7742); /* harmony import */ var node_process__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nccwpck_require__.n(node_process__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var node_fs__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(7561); @@ -8336,7 +8336,7 @@ function fetchAppVersion() { const configured = (0,_actions_core__WEBPACK_IMPORTED_MODULE_2__.getInput)("appVersion"); if (configured !== "") return configured; - const generated = `${node_process__WEBPACK_IMPORTED_MODULE_0___default().env.GITHUB_REPOSITORY.replace("/", "_")}-${(node_process__WEBPACK_IMPORTED_MODULE_0___default().env.GITHUB_RUN_NUMBER)}-${(node_process__WEBPACK_IMPORTED_MODULE_0___default().env.GITHUB_RUN_ATTEMPT)}-${(node_process__WEBPACK_IMPORTED_MODULE_0___default().env.GITHUB_SHA)}`; + const generated = `${node_process__WEBPACK_IMPORTED_MODULE_0___default().env.GITHUB_REPOSITORY?.replace("/", "_")}-${(node_process__WEBPACK_IMPORTED_MODULE_0___default().env.GITHUB_RUN_NUMBER)}-${(node_process__WEBPACK_IMPORTED_MODULE_0___default().env.GITHUB_RUN_ATTEMPT)}-${(node_process__WEBPACK_IMPORTED_MODULE_0___default().env.GITHUB_SHA)}`; (0,_actions_core__WEBPACK_IMPORTED_MODULE_2__.info)(`Generated app version "${generated}"`); (0,_actions_core__WEBPACK_IMPORTED_MODULE_2__.setOutput)("appVersion", generated); return generated; @@ -8443,8 +8443,8 @@ if (cdflowCommand !== "") { }); } -__webpack_handle_async_dependencies__(); -}, 1); +__webpack_async_result__(); +} catch(e) { __webpack_async_result__(e); } }, 1); /***/ }), @@ -8602,75 +8602,70 @@ module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("util"); /************************************************************************/ /******/ /* webpack/runtime/async module */ /******/ (() => { -/******/ var webpackThen = typeof Symbol === "function" ? Symbol("webpack then") : "__webpack_then__"; +/******/ var webpackQueues = typeof Symbol === "function" ? Symbol("webpack queues") : "__webpack_queues__"; /******/ var webpackExports = typeof Symbol === "function" ? Symbol("webpack exports") : "__webpack_exports__"; -/******/ var completeQueue = (queue) => { -/******/ if(queue) { +/******/ var webpackError = typeof Symbol === "function" ? Symbol("webpack error") : "__webpack_error__"; +/******/ var resolveQueue = (queue) => { +/******/ if(queue && !queue.d) { +/******/ queue.d = 1; /******/ queue.forEach((fn) => (fn.r--)); /******/ queue.forEach((fn) => (fn.r-- ? fn.r++ : fn())); /******/ } /******/ } -/******/ var completeFunction = (fn) => (!--fn.r && fn()); -/******/ var queueFunction = (queue, fn) => (queue ? queue.push(fn) : completeFunction(fn)); /******/ var wrapDeps = (deps) => (deps.map((dep) => { /******/ if(dep !== null && typeof dep === "object") { -/******/ if(dep[webpackThen]) return dep; +/******/ if(dep[webpackQueues]) return dep; /******/ if(dep.then) { /******/ var queue = []; +/******/ queue.d = 0; /******/ dep.then((r) => { /******/ obj[webpackExports] = r; -/******/ completeQueue(queue); -/******/ queue = 0; +/******/ resolveQueue(queue); +/******/ }, (e) => { +/******/ obj[webpackError] = e; +/******/ resolveQueue(queue); /******/ }); /******/ var obj = {}; -/******/ obj[webpackThen] = (fn, reject) => (queueFunction(queue, fn), dep['catch'](reject)); +/******/ obj[webpackQueues] = (fn) => (fn(queue)); /******/ return obj; /******/ } /******/ } /******/ var ret = {}; -/******/ ret[webpackThen] = (fn) => (completeFunction(fn)); -/******/ ret[webpackExports] = dep; -/******/ return ret; +/******/ ret[webpackQueues] = x => {}; +/******/ ret[webpackExports] = dep; +/******/ return ret; /******/ })); /******/ __nccwpck_require__.a = (module, body, hasAwait) => { -/******/ var queue = hasAwait && []; +/******/ var queue; +/******/ hasAwait && ((queue = []).d = 1); +/******/ var depQueues = new Set(); /******/ var exports = module.exports; /******/ var currentDeps; /******/ var outerResolve; /******/ var reject; -/******/ var isEvaluating = true; -/******/ var nested = false; -/******/ var whenAll = (deps, onResolve, onReject) => { -/******/ if (nested) return; -/******/ nested = true; -/******/ onResolve.r += deps.length; -/******/ deps.map((dep, i) => (dep[webpackThen](onResolve, onReject))); -/******/ nested = false; -/******/ }; /******/ var promise = new Promise((resolve, rej) => { /******/ reject = rej; -/******/ outerResolve = () => (resolve(exports), completeQueue(queue), queue = 0); +/******/ outerResolve = resolve; /******/ }); /******/ promise[webpackExports] = exports; -/******/ promise[webpackThen] = (fn, rejectFn) => { -/******/ if (isEvaluating) { return completeFunction(fn); } -/******/ if (currentDeps) whenAll(currentDeps, fn, rejectFn); -/******/ queueFunction(queue, fn); -/******/ promise['catch'](rejectFn); -/******/ }; +/******/ promise[webpackQueues] = (fn) => (queue && fn(queue), depQueues.forEach(fn), promise["catch"](x => {})); /******/ module.exports = promise; /******/ body((deps) => { -/******/ if(!deps) return outerResolve(); /******/ currentDeps = wrapDeps(deps); -/******/ var fn, result; -/******/ var promise = new Promise((resolve, reject) => { -/******/ fn = () => (resolve(result = currentDeps.map((d) => (d[webpackExports])))); +/******/ var fn; +/******/ var getResult = () => (currentDeps.map((d) => { +/******/ if(d[webpackError]) throw d[webpackError]; +/******/ return d[webpackExports]; +/******/ })) +/******/ var promise = new Promise((resolve) => { +/******/ fn = () => (resolve(getResult)); /******/ fn.r = 0; -/******/ whenAll(currentDeps, fn, reject); +/******/ var fnQueue = (q) => (q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn)))); +/******/ currentDeps.map((dep) => (dep[webpackQueues](fnQueue))); /******/ }); -/******/ return fn.r ? promise : result; -/******/ }).then(outerResolve, reject); -/******/ isEvaluating = false; +/******/ return fn.r ? promise : getResult(); +/******/ }, (err) => ((err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue))); +/******/ queue && (queue.d = 0); /******/ }; /******/ })(); /******/ diff --git a/package.json b/package.json index d5c751f..ba26e93 100644 --- a/package.json +++ b/package.json @@ -11,9 +11,10 @@ "tslib": "^2.6.2" }, "devDependencies": { + "@tsconfig/esm": "^1.0.5", "@tsconfig/node20": "^20.1.2", "@types/node": "^20.11.10", - "@vercel/ncc": "^0.34.0", + "@vercel/ncc": "^0.38.1", "typescript": "^5.3.3" }, "type": "module", diff --git a/tsconfig.json b/tsconfig.json index 11a4b20..a574b4c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,8 @@ { - "extends": "@tsconfig/node20/tsconfig.json", + "extends": [ + "@tsconfig/esm/tsconfig.json", + "@tsconfig/node20/tsconfig.json" + ], "compilerOptions": { "importHelpers": true, "incremental": true, diff --git a/yarn.lock b/yarn.lock index 1aff140..4bc7bb9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -53,6 +53,11 @@ semver "^6.1.0" uuid "^3.3.2" +"@tsconfig/esm@^1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@tsconfig/esm/-/esm-1.0.5.tgz#e38e62ddc078225768512e56f1c563a66db41382" + integrity sha512-JzoZ0h299JRLPfV5VBsMq1TuMy+OmU9bdV/7NcjfRojL0eIcA1k5ESrtjWrDwJRJnk9B0QmgR0rq04LERbdfWw== + "@tsconfig/node20@^20.1.2": version "20.1.2" resolved "https://registry.yarnpkg.com/@tsconfig/node20/-/node20-20.1.2.tgz#b93128c411d38e9507035255195bc8a6718541e3" @@ -65,10 +70,10 @@ dependencies: undici-types "~5.26.4" -"@vercel/ncc@^0.34.0": - version "0.34.0" - resolved "https://registry.yarnpkg.com/@vercel/ncc/-/ncc-0.34.0.tgz#d0139528320e46670d949c82967044a8f66db054" - integrity sha512-G9h5ZLBJ/V57Ou9vz5hI8pda/YQX5HQszCs3AmIus3XzsmRn/0Ptic5otD3xVST8QLKk7AMk7AqpsyQGN7MZ9A== +"@vercel/ncc@^0.38.1": + version "0.38.1" + resolved "https://registry.yarnpkg.com/@vercel/ncc/-/ncc-0.38.1.tgz#13f08738111e1d9e8a22fd6141f3590e54d9a60e" + integrity sha512-IBBb+iI2NLu4VQn3Vwldyi2QwaXt5+hTyh58ggAMoCGE6DJmPvwL3KPBWcJl1m9LYPChBLE980Jw+CS4Wokqxw== semver@^6.1.0: version "6.3.0"