From b130e250c6cbdb1492bca570873256dcabf5b6fe Mon Sep 17 00:00:00 2001 From: poonam yadav Date: Fri, 27 Oct 2023 14:43:01 +0530 Subject: [PATCH] ELEMENTS-1685: update initial packages for the node 18 upgrade --- .github/workflows/lint.yaml | 2 +- .github/workflows/main.yaml | 2 +- .github/workflows/preview.yaml | 2 +- .github/workflows/promote.yaml | 2 +- .github/workflows/storybook.yaml | 4 +++- .github/workflows/test.yaml | 2 +- karma.conf.js | 7 ++++--- package.json | 30 ++++++++++++++++-------------- storybook/package.json | 4 ++-- 9 files changed, 30 insertions(+), 25 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 36fbbddb1d..a1a801276a 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -29,7 +29,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: 14 + node-version: 18 registry-url: 'https://packages.nuxeo.com/repository/npm-public/' scope: '@nuxeo' diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 93677aac14..f1ad56f390 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -41,7 +41,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: 14 + node-version: 18 registry-url: 'https://packages.nuxeo.com/repository/npm-public/' scope: '@nuxeo' diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 06e1d919e0..de5dc22d7a 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v3 with: - node-version: 14 + node-version: 18 registry-url: 'https://packages.nuxeo.com/repository/npm-public/' scope: '@nuxeo' diff --git a/.github/workflows/promote.yaml b/.github/workflows/promote.yaml index 41c8ed0d62..90b9cf32cf 100644 --- a/.github/workflows/promote.yaml +++ b/.github/workflows/promote.yaml @@ -25,7 +25,7 @@ jobs: steps: - uses: actions/setup-node@v3 with: - node-version: 14 + node-version: 18 registry-url: 'https://packages.nuxeo.com/repository/npm-public/' scope: '@nuxeo' diff --git a/.github/workflows/storybook.yaml b/.github/workflows/storybook.yaml index 7e7b360134..c3d8964f3f 100644 --- a/.github/workflows/storybook.yaml +++ b/.github/workflows/storybook.yaml @@ -29,7 +29,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: 14 + node-version: 18 registry-url: 'https://packages.nuxeo.com/repository/npm-public/' scope: '@nuxeo' @@ -45,6 +45,8 @@ jobs: - name: Build storybook working-directory: storybook + env: + NODE_OPTIONS: --openssl-legacy-provider run: | npx build-storybook -o dist -s ./public diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 1cf3d0daee..0dbc53c81c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -32,7 +32,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: 14 + node-version: 18 registry-url: 'https://packages.nuxeo.com/repository/npm-public/' scope: '@nuxeo' diff --git a/karma.conf.js b/karma.conf.js index 73e815588c..68a5589229 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -22,6 +22,7 @@ if (process.env.SAUCE_USERNAME && process.env.SAUCE_ACCESS_KEY) { browserName: 'chrome', platform: 'Windows 10', version: 'latest', + seleniumVersion: '3.141.59', }, sl_latest_firefox: { base: 'SauceLabs', @@ -60,7 +61,7 @@ module.exports = (config) => { basePath: '', singleRun: true, browsers: config.browsers && config.browsers.length > 0 ? config.browsers : Object.keys(customLaunchers), - browserDisconnectTimeout: 10 * 1000, + browserDisconnectTimeout: 10 * 10 * 1000, browserDisconnectTolerance: 1, browserNoActivityTimeout: 5 * 60 * 1000, captureTimeout: 120000, @@ -103,7 +104,7 @@ module.exports = (config) => { browserConsoleLogOptions: { level: 'error', }, - logLevel: config.LOG_WARN, + logLevel: config.LOG_DEBUG, /** Some errors come in JSON format with a message property. */ formatError(error) { try { @@ -131,7 +132,7 @@ module.exports = (config) => { mocha: { reporter: 'html', ui: 'tdd', - timeout: 3000, + timeout: 30000, }, chai: { includeStack: true, diff --git a/package.json b/package.json index 5130194b6d..2a0382c914 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "author": "Nuxeo", "license": "Apache-2.0", "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0" }, "scripts": { "postinstall": "check-engine --ignore", @@ -38,35 +38,36 @@ }, "devDependencies": { "@open-wc/eslint-config": "^0.3.0", - "@open-wc/karma-esm": "^2.12.6", + "@open-wc/karma-esm": "^4.0.0", "@open-wc/prettier-config": "^0.1.0", "@polymer/iron-component-page": "^4.0.0", "@webcomponents/webcomponentsjs": "^2.0.0", "babel-eslint": "^10.0.1", - "chai": "^4.2.0", + "chai": "^4.3.7", "check-engine": "^1.10.0", - "coveralls": "^3.0.2", + "coveralls": "^3.1.1", "eslint": "^5.15.1", "eslint-plugin-html": "^5.0.3", "husky": "^4.2.3", "istanbul-instrumenter-loader": "^3.0.1", - "karma": "^4.0.1", - "karma-chrome-launcher": "^3.1.0", - "karma-coverage-istanbul-reporter": "^2.0.5", - "karma-firefox-launcher": "^1.3.0", - "karma-mocha": "^1.3.0", + "karma": "^6.4.1", + "karma-chrome-launcher": "^3.1.1", + "karma-coverage-istanbul-reporter": "^3.0.3", + "karma-firefox-launcher": "^2.1.2", + "karma-mocha": "^2.0.1", "karma-mocha-reporter": "^2.2.5", - "karma-sauce-launcher": "^4.3.4", + "karma-sauce-launcher": "^4.3.6", "karma-sinon-chai": "^2.0.2", "karma-source-map-support": "^1.4.0", - "karma-sourcemap-loader": "^0.3.7", + "source-map-support": "^0.5.21", + "karma-sourcemap-loader": "^0.3.8", "karma-static": "^1.0.1", - "lerna": "^3.13.1", + "lerna": "^3.13.0", "lint-staged": "^10.1.1", - "mocha": "^7.1.1", + "mocha": "^10.2.0", "npm-run-all": "^4.1.5", "polymer-cli": "^1.8.0", - "semver": "^7.3.2", + "semver": "^7.3.8", "sinon": "^9.0.1", "sinon-chai": "^3.3.0" }, @@ -84,6 +85,7 @@ "dependencies": { "@nuxeo/moment": "^2.24.0-nx.0", "@nuxeo/paper-typeahead": "^0.6.0-nx.0", + "@nuxeo/testing-helpers": "^3.0.17", "@polymer/iron-autogrow-textarea": "^3.0.1", "@polymer/iron-collapse": "^3.0.0", "@polymer/iron-flex-layout": "^3.0.0", diff --git a/storybook/package.json b/storybook/package.json index d11fc4f6eb..11ed0217df 100644 --- a/storybook/package.json +++ b/storybook/package.json @@ -34,8 +34,8 @@ "uuid": "^3.3.2" }, "scripts": { - "start": "start-storybook -s ./public -p 6006", - "build": "build-storybook -s ./public", + "start": "start-storybook -s ./public -p 6006", + "build": "build-storybook -s ./public", "deploy": "storybook-to-ghpages" }, "devDependencies": {