From 87bfa030bfb0d237b4cec0394e1969125f3256a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sampo=20Kivist=C3=B6?= Date: Fri, 24 Jan 2025 11:18:16 +0200 Subject: [PATCH] changed saucelabs to use SWC and babel and ts configs to ES2022 --- fixtures/browser/karma.babel.conf.js | 44 ++++---- fixtures/browser/karma.sauce.conf.js | 41 ++++---- fixtures/browser/karma.ts.conf.js | 10 +- fixtures/browser/package-lock.json | 145 ++++++++++++++------------- 4 files changed, 126 insertions(+), 114 deletions(-) diff --git a/fixtures/browser/karma.babel.conf.js b/fixtures/browser/karma.babel.conf.js index e0f246a1d..20d4f52ae 100644 --- a/fixtures/browser/karma.babel.conf.js +++ b/fixtures/browser/karma.babel.conf.js @@ -80,26 +80,30 @@ module.exports = function (config) { module: { rules: [ { - test: /\.(ts|tsx|js|jsx)$/, - exclude: /(node_modules)/, - use: { - loader: 'swc-loader', - options: { - "jsc": { - "parser": { - "syntax": "typescript", - "tsx": true, - }, - "experimental": { - "plugins": [ - ["swc-plugin-inferno", {}] - ], - }, - "target": "es2022", - "loose": true - } - } - }, + test: /\.(js|jsx|tsx|ts)$/, + loader: path.join(__dirname, 'node_modules/babel-loader'), + options: { + babelrc: false, + presets: [ + '@babel/typescript', + [ + '@babel/preset-env', + { + loose: true, + // es2022 + "targets": [ + "chrome >= 107", + "firefox >= 105", + "edge >= 107" + ] + } + ] + ], + plugins: [ + ['babel-plugin-inferno', { imports: true }], + ['@babel/plugin-proposal-class-properties', { loose: true }] + ] + } } ] }, diff --git a/fixtures/browser/karma.sauce.conf.js b/fixtures/browser/karma.sauce.conf.js index 0ab52f5c9..d3b443476 100644 --- a/fixtures/browser/karma.sauce.conf.js +++ b/fixtures/browser/karma.sauce.conf.js @@ -114,27 +114,26 @@ module.exports = function (config) { module: { rules: [ { - test: /\.(js|jsx|tsx|ts)$/, - loader: path.join(__dirname, 'node_modules/babel-loader'), - options: { - babelrc: false, - presets: [ - [ - '@babel/preset-env', - { - loose: true, - targets: { - firefox: '90' - } - } - ], - '@babel/typescript' - ], - plugins: [ - ['babel-plugin-inferno', { imports: true }], - ['@babel/plugin-proposal-class-properties', { loose: true }] - ] - } + test: /\.(ts|tsx|js|jsx)$/, + exclude: /(node_modules)/, + use: { + loader: 'swc-loader', + options: { + "jsc": { + "parser": { + "syntax": "typescript", + "tsx": true, + }, + "experimental": { + "plugins": [ + ["swc-plugin-inferno", {}] + ], + }, + "target": "es2022", + "loose": true + } + } + }, } ] }, diff --git a/fixtures/browser/karma.ts.conf.js b/fixtures/browser/karma.ts.conf.js index 5aed79a2c..f352fbcd0 100644 --- a/fixtures/browser/karma.ts.conf.js +++ b/fixtures/browser/karma.ts.conf.js @@ -106,10 +106,12 @@ module.exports = function (config) { '@babel/preset-env', { loose: true, - targets: { - ie: '11', - safari: '8' - } + // es2022 + "targets": [ + "chrome >= 107", + "firefox >= 105", + "edge >= 107" + ] } ], '@babel/typescript' diff --git a/fixtures/browser/package-lock.json b/fixtures/browser/package-lock.json index f998cd347..b2854d4b0 100644 --- a/fixtures/browser/package-lock.json +++ b/fixtures/browser/package-lock.json @@ -13,7 +13,7 @@ "@babel/preset-env": "7.26.0", "babel-loader": "^9.2.1", "build-time-reporter-webpack-plugin": "^1.4.3", - "havunen-karma-sauce-launcher2": "^6.0.1", + "havunen-karma-sauce-launcher2": "^6.0.2", "jasmine-core": "^5.5.0", "karma": "^6.4.4", "karma-chrome-launcher": "^3.2.0", @@ -1768,12 +1768,6 @@ "@types/responselike": "^1.0.0" } }, - "node_modules/@types/cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==", - "license": "MIT" - }, "node_modules/@types/cors": { "version": "2.8.17", "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.17.tgz", @@ -1831,9 +1825,9 @@ } }, "node_modules/@types/node": { - "version": "22.10.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.7.tgz", - "integrity": "sha512-V09KvXxFiutGp6B7XkpaDXlNadZxrzajcY50EuoLIpQ6WWYCSvf19lVIazzfIzQvhUN2HjX12spLojTnhuKlGg==", + "version": "22.10.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.10.tgz", + "integrity": "sha512-X47y/mPNzxviAGY5TcYPtYL8JsY3kAq2n8fMmKoRCxq/c4v4pyGNCzM2R6+M5/umG4ZfHuT+sgqDYqWc9rJ6ww==", "license": "MIT", "dependencies": { "undici-types": "~6.20.0" @@ -1861,9 +1855,9 @@ "license": "MIT" }, "node_modules/@types/ws": { - "version": "8.5.13", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.13.tgz", - "integrity": "sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==", + "version": "8.5.14", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.14.tgz", + "integrity": "sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw==", "license": "MIT", "dependencies": { "@types/node": "*" @@ -1880,14 +1874,14 @@ } }, "node_modules/@wdio/config": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/@wdio/config/-/config-9.5.0.tgz", - "integrity": "sha512-ty0laZy9J6pYpPd9BzNS4/P9RcRFCQfiacQuJFCkaM0NXjOtkWnyMnrqLP09nyUEQYhOGwANwShbsS+EaUkmSQ==", + "version": "9.6.4", + "resolved": "https://registry.npmjs.org/@wdio/config/-/config-9.6.4.tgz", + "integrity": "sha512-oTNXVVzaZ0qaM7oX8tyS3YBr4A3ij2py3Umew3ez0IS2vHpRs1LvLfVWoHRSqrhJIVnfjV3+zqcl9BWALNVD/g==", "license": "MIT", "dependencies": { "@wdio/logger": "9.4.4", - "@wdio/types": "9.5.0", - "@wdio/utils": "9.5.0", + "@wdio/types": "9.6.3", + "@wdio/utils": "9.6.4", "deepmerge-ts": "^7.0.3", "glob": "^10.2.2", "import-meta-resolve": "^4.0.0" @@ -1986,9 +1980,9 @@ } }, "node_modules/@wdio/repl/node_modules/@types/node": { - "version": "20.17.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.14.tgz", - "integrity": "sha512-w6qdYetNL5KRBiSClK/KWai+2IMEJuAj+EujKCumalFOwXtvOXaEan9AuwcRID2IcOIAWSIfR495hBtgKlx2zg==", + "version": "20.17.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.16.tgz", + "integrity": "sha512-vOTpLduLkZXePLxHiHsBLp98mHGnl8RptV4YAO3HfKO5UHjDvySGbxKtpYfy8Sx5+WKcgc45qNreJJRVM3L6mw==", "license": "MIT", "dependencies": { "undici-types": "~6.19.2" @@ -2001,9 +1995,9 @@ "license": "MIT" }, "node_modules/@wdio/types": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/@wdio/types/-/types-9.5.0.tgz", - "integrity": "sha512-sX1vH6VebVHvgdpySTOXzKNazHBu+yFr5bMvveJ2T4vKjJTJOAwO6nPftjKcgGDfhyYxM3xOCvboKICdQKFgEg==", + "version": "9.6.3", + "resolved": "https://registry.npmjs.org/@wdio/types/-/types-9.6.3.tgz", + "integrity": "sha512-K3Lu7K5g5bsUcQV6/95XaS3jMwcGUn2pDdryYibKZafklhHjVt3o/xnw6Vgd/JzoSneCKHdwj941n+yDpTJHAw==", "license": "MIT", "dependencies": { "@types/node": "^20.1.0" @@ -2013,9 +2007,9 @@ } }, "node_modules/@wdio/types/node_modules/@types/node": { - "version": "20.17.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.14.tgz", - "integrity": "sha512-w6qdYetNL5KRBiSClK/KWai+2IMEJuAj+EujKCumalFOwXtvOXaEan9AuwcRID2IcOIAWSIfR495hBtgKlx2zg==", + "version": "20.17.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.16.tgz", + "integrity": "sha512-vOTpLduLkZXePLxHiHsBLp98mHGnl8RptV4YAO3HfKO5UHjDvySGbxKtpYfy8Sx5+WKcgc45qNreJJRVM3L6mw==", "license": "MIT", "dependencies": { "undici-types": "~6.19.2" @@ -2028,14 +2022,14 @@ "license": "MIT" }, "node_modules/@wdio/utils": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/@wdio/utils/-/utils-9.5.0.tgz", - "integrity": "sha512-Lrom21pIdp60IiKznecJT6Za0GGeXxKikPyWHH5z9SY5TmuSoIhuG/bq40lfUjeSW7doiL1JEsFHbRbzt0bHYA==", + "version": "9.6.4", + "resolved": "https://registry.npmjs.org/@wdio/utils/-/utils-9.6.4.tgz", + "integrity": "sha512-FMI/F5ju0h0HKC4RRQKW/H9So2cgtK6dd0JCmVdBzQ+/LMluEzlZmQva14HYmNd2t2ZmejYRqAJPV3aAsMAMZA==", "license": "MIT", "dependencies": { "@puppeteer/browsers": "^2.2.0", "@wdio/logger": "9.4.4", - "@wdio/types": "9.5.0", + "@wdio/types": "9.6.3", "decamelize": "^6.0.0", "deepmerge-ts": "^7.0.3", "edgedriver": "^6.1.1", @@ -3469,12 +3463,12 @@ "license": "MIT" }, "node_modules/cookie": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", - "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz", + "integrity": "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==", "license": "MIT", "engines": { - "node": ">= 0.6" + "node": ">=18" } }, "node_modules/core-js-compat": { @@ -3750,9 +3744,9 @@ } }, "node_modules/deepmerge-ts": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-7.1.3.tgz", - "integrity": "sha512-qCSH6I0INPxd9Y1VtAiLpnYvz5O//6rCfJXKk0z66Up9/VOSr+1yS8XSKA5IWRxjocFGlzPyaZYe+jxq7OOLtQ==", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-7.1.4.tgz", + "integrity": "sha512-fxqo6nHGQ9zOVgI4KXqtWXJR/yCLtC7aXIVq+6jc8tHPFUxlFmuUcm2kC4vztQ+LJxQ3gER/XAWearGYQ8niGA==", "license": "BSD-3-Clause", "engines": { "node": ">=16.0.0" @@ -4038,9 +4032,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.84", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.84.tgz", - "integrity": "sha512-I+DQ8xgafao9Ha6y0qjHHvpZ9OfyA1qKlkHkjywxzniORU2awxyz7f/iVJcULmrF2yrM3nHQf+iDjJtbbexd/g==", + "version": "1.5.87", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.87.tgz", + "integrity": "sha512-mPFwmEWmRivw2F8x3w3l2m6htAUN97Gy0kwpO++2m9iT1Gt8RCFVUfv9U/sIbHJ6rY4P6/ooqFL/eL7ock+pPg==", "license": "ISC" }, "node_modules/emoji-regex": { @@ -4093,17 +4087,16 @@ } }, "node_modules/engine.io": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.6.2.tgz", - "integrity": "sha512-gmNvsYi9C8iErnZdVcJnvCpSKbWTt1E8+JZo8b+daLninywUWi5NQ5STSHZ9rFjFO7imNcvb8Pc5pe/wMR5xEw==", + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.6.3.tgz", + "integrity": "sha512-2hkLItQMBkoYSagneiisupWGvsQlWXqzhSMvsjaM8GYbnfUsX7tzYQq9QARnate5LRedVTX+MbkSZAANAr3NtQ==", "license": "MIT", "dependencies": { - "@types/cookie": "^0.4.1", "@types/cors": "^2.8.12", "@types/node": ">=10.0.0", "accepts": "~1.3.4", "base64id": "2.0.0", - "cookie": "~0.7.2", + "cookie": "~1.0.2", "cors": "~2.8.5", "debug": "~4.3.1", "engine.io-parser": "~5.2.1", @@ -5073,14 +5066,14 @@ } }, "node_modules/havunen-karma-sauce-launcher2": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/havunen-karma-sauce-launcher2/-/havunen-karma-sauce-launcher2-6.0.1.tgz", - "integrity": "sha512-K3jfGbLZk2jTW6tzInMUzyB/nvcDvb/rj3sg7M3rcnJ8+IKeOAn4HXf6HdC9kmTBm+MT5Pk7YVOB79uPS6liXw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/havunen-karma-sauce-launcher2/-/havunen-karma-sauce-launcher2-6.0.2.tgz", + "integrity": "sha512-P3wMiR7Q0TaP5A6UhKpx6rtzZ26HrJiT4+MYvKRztTxrwbRNmpSU6pX2MOooX0OoTrf0HGFo2sbUjUbV5augsg==", "license": "MIT", "dependencies": { "global-agent": "^3.0.0", "saucelabs": "^8.0.0", - "webdriverio": "^9.6.0" + "webdriverio": "^9.6.2" }, "engines": { "node": ">= 20.0.0" @@ -7860,6 +7853,20 @@ "node": ">= 0.6" } }, + "node_modules/typescript": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", + "license": "Apache-2.0", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, "node_modules/ua-parser-js": { "version": "0.7.40", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.40.tgz", @@ -8123,18 +8130,18 @@ } }, "node_modules/webdriver": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/webdriver/-/webdriver-9.6.0.tgz", - "integrity": "sha512-7rZfKL00ityTEOjKmQizkMQigcUrGlpwl7k2jJVpFAMlWqGHZt9dGw7M3pVH1rBN/NDBkv0i9wQgWoQgzyggkw==", + "version": "9.6.4", + "resolved": "https://registry.npmjs.org/webdriver/-/webdriver-9.6.4.tgz", + "integrity": "sha512-IbOq2lvkZ/wrAhrd1jD6PG9GO2ETb1IrR4cAlO7RWT9QqKa9W9B+FHtUc/4GCDuq0CynLrf4KFUysAquzuxGeQ==", "license": "MIT", "dependencies": { "@types/node": "^20.1.0", "@types/ws": "^8.5.3", - "@wdio/config": "9.5.0", + "@wdio/config": "9.6.4", "@wdio/logger": "9.4.4", "@wdio/protocols": "9.4.4", - "@wdio/types": "9.5.0", - "@wdio/utils": "9.5.0", + "@wdio/types": "9.6.3", + "@wdio/utils": "9.6.4", "deepmerge-ts": "^7.0.3", "undici": "^6.20.1", "ws": "^8.8.0" @@ -8144,9 +8151,9 @@ } }, "node_modules/webdriver/node_modules/@types/node": { - "version": "20.17.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.14.tgz", - "integrity": "sha512-w6qdYetNL5KRBiSClK/KWai+2IMEJuAj+EujKCumalFOwXtvOXaEan9AuwcRID2IcOIAWSIfR495hBtgKlx2zg==", + "version": "20.17.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.16.tgz", + "integrity": "sha512-vOTpLduLkZXePLxHiHsBLp98mHGnl8RptV4YAO3HfKO5UHjDvySGbxKtpYfy8Sx5+WKcgc45qNreJJRVM3L6mw==", "license": "MIT", "dependencies": { "undici-types": "~6.19.2" @@ -8159,19 +8166,19 @@ "license": "MIT" }, "node_modules/webdriverio": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/webdriverio/-/webdriverio-9.6.0.tgz", - "integrity": "sha512-nMTPIq1WldQ72nQF86hapMZy0sxpgx8mHJtf+zwYpbuaaD35LLriWcduD2uvwkMSZmBvCHnNCYUfvtFHNhKKrw==", + "version": "9.6.4", + "resolved": "https://registry.npmjs.org/webdriverio/-/webdriverio-9.6.4.tgz", + "integrity": "sha512-+AQRYHc5CahW1qWLvYCGl7Y4XB44SY8H52oa36nbpv0uBtYxKc9RnoHMyn/MHhq0Klj601j67RqANB1TUcOTeg==", "license": "MIT", "dependencies": { "@types/node": "^20.11.30", "@types/sinonjs__fake-timers": "^8.1.5", - "@wdio/config": "9.5.0", + "@wdio/config": "9.6.4", "@wdio/logger": "9.4.4", "@wdio/protocols": "9.4.4", "@wdio/repl": "9.4.4", - "@wdio/types": "9.5.0", - "@wdio/utils": "9.5.0", + "@wdio/types": "9.6.3", + "@wdio/utils": "9.6.4", "archiver": "^7.0.1", "aria-query": "^5.3.0", "cheerio": "^1.0.0-rc.12", @@ -8190,7 +8197,7 @@ "rgb2hex": "0.2.5", "serialize-error": "^11.0.3", "urlpattern-polyfill": "^10.0.0", - "webdriver": "9.6.0" + "webdriver": "9.6.4" }, "engines": { "node": ">=18.20.0" @@ -8205,9 +8212,9 @@ } }, "node_modules/webdriverio/node_modules/@types/node": { - "version": "20.17.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.14.tgz", - "integrity": "sha512-w6qdYetNL5KRBiSClK/KWai+2IMEJuAj+EujKCumalFOwXtvOXaEan9AuwcRID2IcOIAWSIfR495hBtgKlx2zg==", + "version": "20.17.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.16.tgz", + "integrity": "sha512-vOTpLduLkZXePLxHiHsBLp98mHGnl8RptV4YAO3HfKO5UHjDvySGbxKtpYfy8Sx5+WKcgc45qNreJJRVM3L6mw==", "license": "MIT", "dependencies": { "undici-types": "~6.19.2"