From 06ad2a53534ae7e6cc1b0679736cbab0fb4908d9 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Tue, 25 Apr 2023 22:41:49 -0400 Subject: [PATCH] chore(striker-ui-api): add core-js and regenerator-runtime enable promises and async/await --- striker-ui-api/package-lock.json | 33 +++++++++++++++++++++++--------- striker-ui-api/package.json | 4 +++- striker-ui-api/webpack.config.js | 5 ++++- 3 files changed, 31 insertions(+), 11 deletions(-) diff --git a/striker-ui-api/package-lock.json b/striker-ui-api/package-lock.json index 41d491f6..813eabcf 100644 --- a/striker-ui-api/package-lock.json +++ b/striker-ui-api/package-lock.json @@ -8,12 +8,14 @@ "name": "striker-ui-api", "version": "0.1.0", "dependencies": { + "core-js": "^3.30.1", "cors": "^2.8.5", "express": "^4.18.2", "express-session": "^1.17.3", "multer": "^1.4.4", "passport": "^0.6.0", - "passport-local": "^1.0.0" + "passport-local": "^1.0.0", + "regenerator-runtime": "^0.13.11" }, "devDependencies": { "@babel/core": "^7.17.8", @@ -3549,6 +3551,16 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, + "node_modules/core-js": { + "version": "3.30.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.30.1.tgz", + "integrity": "sha512-ZNS5nbiSwDTq4hFosEDqm65izl2CWmLz0hARJMyNQBgkUZMIF51cQiMvIQKA6hvuaeWxQDP3hEedM1JZIgTldQ==", + "hasInstallScript": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, "node_modules/core-js-compat": { "version": "3.21.1", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.21.1.tgz", @@ -5963,10 +5975,9 @@ } }, "node_modules/regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", - "dev": true + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, "node_modules/regenerator-transform": { "version": "0.14.5", @@ -9526,6 +9537,11 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, + "core-js": { + "version": "3.30.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.30.1.tgz", + "integrity": "sha512-ZNS5nbiSwDTq4hFosEDqm65izl2CWmLz0hARJMyNQBgkUZMIF51cQiMvIQKA6hvuaeWxQDP3hEedM1JZIgTldQ==" + }, "core-js-compat": { "version": "3.21.1", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.21.1.tgz", @@ -11306,10 +11322,9 @@ } }, "regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", - "dev": true + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, "regenerator-transform": { "version": "0.14.5", diff --git a/striker-ui-api/package.json b/striker-ui-api/package.json index d40da7ae..980561dd 100644 --- a/striker-ui-api/package.json +++ b/striker-ui-api/package.json @@ -11,12 +11,14 @@ "start": "npm run build && node out/index.js" }, "dependencies": { + "core-js": "^3.30.1", "cors": "^2.8.5", "express": "^4.18.2", "express-session": "^1.17.3", "multer": "^1.4.4", "passport": "^0.6.0", - "passport-local": "^1.0.0" + "passport-local": "^1.0.0", + "regenerator-runtime": "^0.13.11" }, "devDependencies": { "@babel/core": "^7.17.8", diff --git a/striker-ui-api/webpack.config.js b/striker-ui-api/webpack.config.js index 8f5261ab..f866c99e 100644 --- a/striker-ui-api/webpack.config.js +++ b/striker-ui-api/webpack.config.js @@ -11,7 +11,10 @@ module.exports = { use: { loader: 'babel-loader', options: { - presets: ['@babel/preset-env', '@babel/preset-typescript'], + presets: [ + ['@babel/preset-env', { corejs: 3, useBuiltIns: 'usage' }], + '@babel/preset-typescript', + ], }, }, },