diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b8378e78e..c6de5d8ed 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ jobs: - name: Setup node env uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 20 - name: Install dependencies run: npm ci diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 08378e0d5..a0f9606e4 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - node: [16] + node: [20] steps: - name: Checkout diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b822c2abb..5ea7559a1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,7 +10,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 20 - name: Lint scss run: npm ci && npm run scss-lint @@ -23,7 +23,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 20 - name: Lint js run: touch ./webpack/.env && npm ci && npm run lint diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0a64bb760..4b6722ba4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,7 +6,7 @@ jobs: name: Run unit tests strategy: matrix: - js: [ '16' ] + js: [ '20' ] steps: - name: Setup Node uses: actions/setup-node@v3 diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index 57ed2ea80..f40cb52fd 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -10,7 +10,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 20 - name: Build and check types run: touch ./webpack/.env && npm ci && npm run build diff --git a/.stylelintrc b/.stylelintrc index 77adb7f4b..1bc2bf8ff 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -4,6 +4,7 @@ ], "customSyntax": "postcss-scss", "rules": { + "selector-id-pattern": null, "selector-max-id": null, "selector-max-class": null, "selector-max-type": null, @@ -11,7 +12,6 @@ "selector-no-qualifying-type": null, "selector-max-combinators": null, "selector-class-pattern": null, - "selector-descendant-combinator-no-non-space": null, "function-disallowed-list": null, "scss/dollar-variable-default": null, "property-disallowed-list": null diff --git a/package-lock.json b/package-lock.json index 9b324e553..ca8a7bd4f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -69,7 +69,7 @@ "stylelint": "^14.16.1", "stylelint-config-prestashop": "^1.0.7", "ts-jest": "^29.2.5", - "typescript": "^5.6.2", + "typescript": "~5.5.4", "webpack": "^5.95.0", "webpack-bundle-analyzer": "^4.10.2", "webpack-cli": "^5.1.4", @@ -24988,9 +24988,9 @@ "dev": true }, "node_modules/typescript": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", - "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", "dev": true, "license": "Apache-2.0", "bin": { @@ -43746,9 +43746,9 @@ "dev": true }, "typescript": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", - "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", "dev": true }, "uglify-js": { diff --git a/package.json b/package.json index 387994778..e0a1df572 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "stylelint": "^14.16.1", "stylelint-config-prestashop": "^1.0.7", "ts-jest": "^29.2.5", - "typescript": "^5.6.2", + "typescript": "~5.5.4", "webpack": "^5.95.0", "webpack-bundle-analyzer": "^4.10.2", "webpack-cli": "^5.1.4", diff --git a/src/js/components/usePasswordPolicy.ts b/src/js/components/usePasswordPolicy.ts index 194afd06d..64ca61024 100644 --- a/src/js/components/usePasswordPolicy.ts +++ b/src/js/components/usePasswordPolicy.ts @@ -165,6 +165,7 @@ const usePasswordPolicy = (selector: string): PasswordPolicyReturn => { try { return JSON.parse(content); } catch (error) { + console.error(error); return false; } })(hintElement.innerHTML); diff --git a/src/js/components/useQuantityInput.test.ts b/src/js/components/useQuantityInput.test.ts index c867f0867..8da0df626 100644 --- a/src/js/components/useQuantityInput.test.ts +++ b/src/js/components/useQuantityInput.test.ts @@ -217,7 +217,7 @@ const mockedResponse = (ok: boolean, hasError?: boolean, qty?: string): jest.Moc return mockedFetch; }; -const debounceTimeout = async () => new Promise((fn) => setTimeout(fn, Quantify.delay)); +const debounceTimeout = async () => new Promise((fn) => { setTimeout(fn, Quantify.delay); }); const getHTMLElement = (selector: string, parent?: Type): Type => { const parentElement = parent ?? document; diff --git a/src/js/responsive-toggler.test.ts b/src/js/responsive-toggler.test.ts index 181797ff8..0ce9f41d9 100644 --- a/src/js/responsive-toggler.test.ts +++ b/src/js/responsive-toggler.test.ts @@ -5,7 +5,6 @@ import initEmitter from './prestashop'; import { desktopElement, mobileElement, mobileElementId, contentValue, desktopElementId, } from './constants/mocks/swapElements-data'; -import ThemeType = Theme.ThemeType; beforeAll(() => { document.body.innerHTML = `