diff --git a/package-lock.json b/package-lock.json index c37fc2652d..7027284045 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,22 +11,47 @@ ], "devDependencies": { "@nx/js": "20.3.3", + "@open-wc/testing": "3.2.2", "@preact/signals-react-transform": "0.5.1", "@remcovaes/web-test-runner-vite-plugin": "1.2.2", + "@testing-library/dom": "10.4.0", + "@testing-library/react": "16.2.0", + "@testing-library/user-event": "14.6.1", + "@types/atmosphere.js": "2.1.6", + "@types/chai": "5.0.1", + "@types/chai-as-promised": "8.0.1", + "@types/chai-dom": "1.11.3", + "@types/chai-like": "1.1.3", + "@types/deep-equal-in-any-order": "1.0.4", + "@types/js-cookie": "3.0.6", "@types/karma": "6.3.9", + "@types/mocha": "10.0.10", "@types/node": "22.10.10", + "@types/react": "19.0.8", + "@types/react-dom": "19", + "@types/sinon": "17.0.3", + "@types/sinon-chai": "4.0.0", + "@types/validator": "13.12.2", "@vaadin/react-components": "24.7.0-alpha7", "@vitejs/plugin-react": "4.3.4", "@web/test-runner": "0.19.0", + "c8": "10.1.3", + "chai": "5.1.2", + "chai-as-promised": "8.0.1", + "chai-dom": "1.12.1", + "chai-like": "1.1.3", "compare-versions": "6.1.1", "concurrently": "9.1.2", + "copyfiles": "2.4.1", "cssnano": "7.0.6", + "deep-equal-in-any-order": "2.0.6", "esbuild": "0.24.2", "eslint": "8.57.0", "eslint-config-vaadin": "1.0.0-alpha.28", "eslint-plugin-mocha": "10.5.0", "eslint-plugin-prettier": "5.2.3", "eslint-plugin-tsdoc": "0.4.0", + "fetch-mock": "^12.2.0", "glob": "11.0.1", "karma": "6.4.4", "karma-chrome-launcher": "3.2.0", @@ -40,12 +65,18 @@ "meow": "13.2.0", "micromatch": "4.0.8", "mocha": "11.1.0", + "monocart-coverage-reports": "2.11.5", "nx": "20.3.3", + "pino": "9.6.0", "postcss": "8.5.1", "prettier": "3.4.2", "react": "19.0.0", "react-dom": "19.0.0", + "react-router": "7.1.1", + "rollup": "4.32.0", "simple-git-hooks": "2.11.1", + "sinon": "19.0.2", + "sinon-chai": "4.0.0", "sync-request": "6.1.0", "tsx": "4.19.2", "type-fest": "4.33.0", @@ -19404,25 +19435,6 @@ "@vaadin/hilla-react-signals": "24.7.0-alpha8", "typescript": "5.7.3" }, - "devDependencies": { - "@types/chai": "5.0.1", - "@types/chai-as-promised": "8.0.1", - "@types/chai-like": "1.1.3", - "@types/deep-equal-in-any-order": "1.0.4", - "@types/mocha": "10.0.10", - "@types/sinon": "17.0.3", - "@types/sinon-chai": "4.0.0", - "c8": "10.1.3", - "chai": "5.1.2", - "chai-as-promised": "8.0.1", - "chai-like": "1.1.3", - "deep-equal-in-any-order": "2.0.6", - "mocha": "11.1.0", - "rollup": "4.32.0", - "sinon": "19.0.2", - "sinon-chai": "4.0.0", - "type-fest": "4.33.0" - }, "peerDependencies": { "react": "18 || 19", "react-dom": "18 || 19", @@ -19438,24 +19450,6 @@ "atmosphere.js": "3.1.3", "js-cookie": "3.0.5" }, - "devDependencies": { - "@open-wc/testing": "3.2.2", - "@types/atmosphere.js": "2.1.6", - "@types/chai": "5.0.1", - "@types/chai-as-promised": "8.0.1", - "@types/js-cookie": "3.0.6", - "@types/mocha": "10.0.10", - "@types/sinon": "17.0.3", - "@types/sinon-chai": "4.0.0", - "@types/validator": "13.12.2", - "chai": "5.1.2", - "chai-as-promised": "8.0.1", - "chai-dom": "1.12.1", - "fetch-mock": "^12.2.0", - "sinon": "19.0.2", - "sinon-chai": "4.0.0", - "typescript": "5.7.3" - }, "peerDependencies": { "lit": "^3.0.0" } @@ -19473,26 +19467,6 @@ "bin": { "tsgen": "bin/index.js" }, - "devDependencies": { - "@types/chai": "5.0.1", - "@types/chai-as-promised": "8.0.1", - "@types/mocha": "10.0.10", - "@types/node": "22.10.10", - "@types/sinon": "17.0.3", - "@types/sinon-chai": "4.0.0", - "@vaadin/hilla-generator-core": "24.7.0-alpha8", - "c8": "10.1.3", - "chai": "5.1.2", - "chai-as-promised": "8.0.1", - "concurrently": "9.1.2", - "copyfiles": "2.4.1", - "mocha": "11.1.0", - "monocart-coverage-reports": "2.11.5", - "pino": "9.6.0", - "sinon": "19.0.2", - "sinon-chai": "4.0.0", - "type-fest": "4.33.0" - }, "engines": { "node": ">= 16.13" } @@ -19508,22 +19482,6 @@ "openapi-types": "12.1.3", "typescript": "5.7.3" }, - "devDependencies": { - "@types/chai": "5.0.1", - "@types/mocha": "10.0.10", - "@types/node": "22.10.10", - "@types/sinon": "17.0.3", - "@types/sinon-chai": "4.0.0", - "c8": "10.1.3", - "chai": "5.1.2", - "concurrently": "9.1.2", - "copyfiles": "2.4.1", - "mocha": "11.1.0", - "monocart-coverage-reports": "2.11.5", - "sinon": "19.0.2", - "sinon-chai": "4.0.0", - "type-fest": "4.33.0" - }, "engines": { "node": ">= 16.13" } @@ -19540,25 +19498,6 @@ "openapi-types": "12.1.3", "typescript": "5.7.3" }, - "devDependencies": { - "@types/chai": "5.0.1", - "@types/mocha": "10.0.10", - "@types/node": "22.10.10", - "@types/sinon": "17.0.3", - "@types/sinon-chai": "4.0.0", - "@vaadin/hilla-generator-core": "24.7.0-alpha8", - "@vaadin/hilla-generator-plugin-client": "24.7.0-alpha8", - "c8": "10.1.3", - "chai": "5.1.2", - "concurrently": "9.1.2", - "copyfiles": "2.4.1", - "mocha": "11.1.0", - "monocart-coverage-reports": "2.11.5", - "pino": "9.6.0", - "sinon": "19.0.2", - "sinon-chai": "4.0.0", - "type-fest": "4.33.0" - }, "engines": { "node": ">= 16.13" } @@ -19573,25 +19512,6 @@ "@vaadin/hilla-generator-utils": "24.7.0-alpha8", "typescript": "5.7.3" }, - "devDependencies": { - "@types/chai": "5.0.1", - "@types/mocha": "10.0.10", - "@types/node": "22.10.10", - "@types/sinon": "17.0.3", - "@types/sinon-chai": "4.0.0", - "@vaadin/hilla-generator-core": "24.7.0-alpha8", - "@vaadin/hilla-generator-plugin-backbone": "24.7.0-alpha8", - "c8": "10.1.3", - "chai": "5.1.2", - "concurrently": "9.1.2", - "copyfiles": "2.4.1", - "mocha": "11.1.0", - "monocart-coverage-reports": "2.11.5", - "pino": "9.6.0", - "sinon": "19.0.2", - "sinon-chai": "4.0.0", - "type-fest": "4.33.0" - }, "engines": { "node": ">= 16.13" } @@ -19605,24 +19525,6 @@ "@vaadin/hilla-generator-utils": "24.7.0-alpha8", "typescript": "5.7.3" }, - "devDependencies": { - "@types/chai": "5.0.1", - "@types/mocha": "10.0.10", - "@types/node": "22.10.10", - "@types/sinon": "17.0.3", - "@types/sinon-chai": "4.0.0", - "@vaadin/hilla-generator-core": "24.7.0-alpha8", - "c8": "10.1.3", - "chai": "5.1.2", - "concurrently": "9.1.2", - "copyfiles": "2.4.1", - "mocha": "11.1.0", - "monocart-coverage-reports": "2.11.5", - "pino": "9.6.0", - "sinon": "19.0.2", - "sinon-chai": "4.0.0", - "type-fest": "4.33.0" - }, "engines": { "node": ">= 16.13" } @@ -19640,25 +19542,6 @@ "openapi-types": "12.1.3", "typescript": "5.7.3" }, - "devDependencies": { - "@types/chai": "5.0.1", - "@types/mocha": "10.0.10", - "@types/node": "22.10.10", - "@types/sinon": "17.0.3", - "@types/sinon-chai": "4.0.0", - "@vaadin/hilla-generator-core": "24.7.0-alpha8", - "@vaadin/hilla-generator-plugin-client": "24.7.0-alpha8", - "c8": "10.1.3", - "chai": "5.1.2", - "concurrently": "9.1.2", - "copyfiles": "2.4.1", - "mocha": "11.1.0", - "monocart-coverage-reports": "2.11.5", - "pino": "9.6.0", - "sinon": "19.0.2", - "sinon-chai": "4.0.0", - "type-fest": "4.33.0" - }, "engines": { "node": ">= 16.13" } @@ -19675,25 +19558,6 @@ "openapi-types": "12.1.3", "typescript": "5.7.3" }, - "devDependencies": { - "@types/chai": "5.0.1", - "@types/mocha": "10.0.10", - "@types/node": "22.10.10", - "@types/sinon": "17.0.3", - "@types/sinon-chai": "4.0.0", - "@vaadin/hilla-generator-core": "24.7.0-alpha8", - "@vaadin/hilla-generator-plugin-client": "24.7.0-alpha8", - "c8": "10.1.3", - "chai": "5.1.2", - "concurrently": "9.1.2", - "copyfiles": "2.4.1", - "mocha": "11.1.0", - "monocart-coverage-reports": "2.11.5", - "pino": "9.6.0", - "sinon": "19.0.2", - "sinon-chai": "4.0.0", - "type-fest": "4.33.0" - }, "engines": { "node": ">= 16.13" } @@ -19712,25 +19576,6 @@ "openapi-types": "12.1.3", "typescript": "5.7.3" }, - "devDependencies": { - "@types/chai": "5.0.1", - "@types/mocha": "10.0.10", - "@types/node": "22.10.10", - "@types/sinon": "17.0.3", - "@types/sinon-chai": "4.0.0", - "@vaadin/hilla-generator-core": "24.7.0-alpha8", - "@vaadin/hilla-generator-plugin-client": "24.7.0-alpha8", - "c8": "10.1.3", - "chai": "5.1.2", - "concurrently": "9.1.2", - "copyfiles": "2.4.1", - "mocha": "11.1.0", - "monocart-coverage-reports": "2.11.5", - "pino": "9.6.0", - "sinon": "19.0.2", - "sinon-chai": "4.0.0", - "type-fest": "4.33.0" - }, "engines": { "node": ">= 16.13" } @@ -19748,26 +19593,6 @@ "openapi-types": "^12.1.3", "typescript": "5.7.3" }, - "devDependencies": { - "@types/chai": "5.0.1", - "@types/mocha": "^10.0.10", - "@types/node": "22.10.10", - "@types/sinon": "17.0.3", - "@types/sinon-chai": "4.0.0", - "@vaadin/hilla-generator-core": "24.7.0-alpha8", - "@vaadin/hilla-generator-plugin-client": "24.7.0-alpha8", - "@vaadin/hilla-generator-plugin-model": "24.7.0-alpha8", - "c8": "^10.1.3", - "chai": "5.1.2", - "concurrently": "^9.1.2", - "copyfiles": "^2.4.1", - "mocha": "11.1.0", - "monocart-coverage-reports": "^2.11.5", - "pino": "^9.6.0", - "sinon": "19.0.2", - "sinon-chai": "^4.0.0", - "type-fest": "4.33.0" - }, "engines": { "node": ">= 16.13" } @@ -19781,23 +19606,6 @@ "pino-pretty": "10.3.1", "typescript": "5.7.3" }, - "devDependencies": { - "@types/chai": "5.0.1", - "@types/mocha": "10.0.10", - "@types/node": "22.10.10", - "@types/sinon": "17.0.3", - "@types/sinon-chai": "4.0.0", - "c8": "10.1.3", - "chai": "5.1.2", - "chai-like": "1.1.3", - "concurrently": "9.1.2", - "copyfiles": "2.4.1", - "mocha": "11.1.0", - "monocart-coverage-reports": "2.11.5", - "sinon": "19.0.2", - "sinon-chai": "4.0.0", - "type-fest": "4.33.0" - }, "engines": { "node": ">= 16.13" } @@ -19810,19 +19618,6 @@ "@vaadin/hilla-frontend": "24.7.0-alpha8", "validator": "13.12.0" }, - "devDependencies": { - "@types/chai": "5.0.1", - "@types/chai-dom": "1.11.3", - "@types/mocha": "10.0.10", - "@types/sinon": "17.0.3", - "@types/sinon-chai": "4.0.0", - "@types/validator": "13.12.2", - "chai": "5.1.2", - "chai-dom": "1.12.1", - "sinon": "19.0.2", - "sinon-chai": "4.0.0", - "typescript": "5.7.3" - }, "peerDependencies": { "lit": "^3.0.0" } @@ -19834,32 +19629,6 @@ "dependencies": { "@vaadin/hilla-lit-form": "24.7.0-alpha8" }, - "devDependencies": { - "@testing-library/react": "16.2.0", - "@testing-library/user-event": "14.6.1", - "@types/chai": "5.0.1", - "@types/chai-as-promised": "8.0.1", - "@types/chai-dom": "1.11.3", - "@types/chai-like": "1.1.3", - "@types/mocha": "10.0.10", - "@types/node": "22.10.10", - "@types/react": "19.0.8", - "@types/react-dom": "19", - "@types/sinon": "17.0.3", - "@types/sinon-chai": "4.0.0", - "@types/validator": "13.12.2", - "c8": "10.1.3", - "chai": "5.1.2", - "chai-as-promised": "8.0.1", - "chai-dom": "1.12.1", - "chai-like": "1.1.3", - "glob": "11.0.1", - "mocha": "11.1.0", - "monocart-coverage-reports": "2.11.5", - "sinon": "19.0.2", - "sinon-chai": "4.0.0", - "typescript": "5.7.3" - }, "peerDependencies": { "react": "18 || 19", "react-dom": "18 || 19" @@ -19872,26 +19641,6 @@ "dependencies": { "@vaadin/hilla-frontend": "24.7.0-alpha8" }, - "devDependencies": { - "@testing-library/dom": "10.4.0", - "@testing-library/react": "16.2.0", - "@testing-library/user-event": "14.6.1", - "@types/chai": "5.0.1", - "@types/chai-dom": "1.11.3", - "@types/mocha": "10.0.10", - "@types/react": "19.0.8", - "@types/react-dom": "19", - "@types/sinon": "17.0.3", - "@types/sinon-chai": "4.0.0", - "@types/validator": "13.12.2", - "@web/test-runner": "0.19.0", - "chai": "5.1.2", - "chai-dom": "1.12.1", - "react-router": "7.1.1", - "sinon": "19.0.2", - "sinon-chai": "4.0.0", - "typescript": "5.7.3" - }, "peerDependencies": { "react": "18 || 19", "react-dom": "18 || 19", @@ -19908,27 +19657,6 @@ "@vaadin/hilla-react-form": "24.7.0-alpha8", "@vaadin/react-components": "24.7.0-alpha7" }, - "devDependencies": { - "@testing-library/dom": "10.4.0", - "@testing-library/react": "16.2.0", - "@testing-library/user-event": "14.6.1", - "@types/chai": "5.0.1", - "@types/chai-as-promised": "8.0.1", - "@types/chai-dom": "1.11.3", - "@types/mocha": "10.0.10", - "@types/react": "19.0.8", - "@types/react-dom": "19", - "@types/sinon": "17.0.3", - "@types/sinon-chai": "4.0.0", - "@types/validator": "13.12.2", - "chai": "5.1.2", - "chai-as-promised": "8.0.1", - "chai-dom": "1.12.1", - "karma-viewport": "1.0.9", - "sinon": "19.0.2", - "sinon-chai": "4.0.0", - "typescript": "5.7.3" - }, "peerDependencies": { "react": "18 || 19", "react-dom": "18 || 19" @@ -19941,26 +19669,6 @@ "dependencies": { "@vaadin/hilla-lit-form": "24.7.0-alpha8" }, - "devDependencies": { - "@testing-library/dom": "10.4.0", - "@testing-library/react": "16.2.0", - "@testing-library/user-event": "14.6.1", - "@types/chai": "5.0.1", - "@types/chai-as-promised": "8.0.1", - "@types/chai-dom": "1.11.3", - "@types/mocha": "10.0.10", - "@types/react": "19.0.8", - "@types/react-dom": "19", - "@types/sinon": "17.0.3", - "@types/sinon-chai": "4.0.0", - "@types/validator": "13.12.2", - "chai": "5.1.2", - "chai-as-promised": "8.0.1", - "chai-dom": "1.12.1", - "sinon": "19.0.2", - "sinon-chai": "4.0.0", - "typescript": "5.7.3" - }, "peerDependencies": { "react": "18 || 19", "react-dom": "18 || 19" @@ -19975,27 +19683,6 @@ "@vaadin/hilla-react-signals": "24.7.0-alpha8", "intl-messageformat": "10.7.11" }, - "devDependencies": { - "@testing-library/dom": "10.4.0", - "@testing-library/react": "16.2.0", - "@testing-library/user-event": "14.6.1", - "@types/chai": "5.0.1", - "@types/chai-as-promised": "8.0.1", - "@types/chai-dom": "1.11.3", - "@types/mocha": "10.0.10", - "@types/react": "19.0.8", - "@types/react-dom": "19", - "@types/sinon": "17.0.3", - "@types/sinon-chai": "4.0.0", - "@types/validator": "13.12.2", - "chai": "5.1.2", - "chai-as-promised": "8.0.1", - "chai-dom": "1.12.1", - "fetch-mock": "^12.2.0", - "sinon": "19.0.2", - "sinon-chai": "4.0.0", - "typescript": "5.7.3" - }, "peerDependencies": { "react": "18 || 19", "react-dom": "18 || 19" @@ -20010,29 +19697,6 @@ "@vaadin/hilla-frontend": "24.7.0-alpha8", "nanoid": "5.0.9" }, - "devDependencies": { - "@testing-library/dom": "10.4.0", - "@testing-library/react": "16.2.0", - "@testing-library/user-event": "14.6.1", - "@types/chai": "5.0.1", - "@types/chai-as-promised": "8.0.1", - "@types/chai-dom": "1.11.3", - "@types/mocha": "10.0.10", - "@types/react": "19.0.8", - "@types/react-dom": "19", - "@types/sinon": "17.0.3", - "@types/sinon-chai": "4.0.0", - "@types/validator": "13.12.2", - "chai": "5.1.2", - "chai-as-promised": "8.0.1", - "chai-dom": "1.12.1", - "chai-like": "1.1.3", - "karma": "6.4.4", - "karma-viewport": "1.0.9", - "sinon": "19.0.2", - "sinon-chai": "4.0.0", - "typescript": "5.7.3" - }, "peerDependencies": { "react": "18 || 19", "react-dom": "18 || 19" diff --git a/packages/ts/react-i18n/test/i18n.spec.tsx b/packages/ts/react-i18n/test/i18n.spec.tsx index 0759c000b9..3b2e860cb2 100644 --- a/packages/ts/react-i18n/test/i18n.spec.tsx +++ b/packages/ts/react-i18n/test/i18n.spec.tsx @@ -45,7 +45,7 @@ describe('@vaadin/hilla-react-i18n', () => { i18n = new I18n(); fetchMock .mockGlobal() - .get('?v-r=i18n&langtag=de-DE', { + .get(/\?v-r=i18n&langtag=de-DE/u, { body: { 'addresses.form.city.label': 'Stadt', 'addresses.form.street.label': 'Strasse', @@ -53,15 +53,15 @@ describe('@vaadin/hilla-react-i18n', () => { status: 200, headers: { 'X-Vaadin-Retrieved-Locale': 'de-DE' }, }) - .get('?v-r=i18n&langtag=not-found', 404) - .get('?v-r=i18n&langtag=unknown', { + .get(/\?v-r=i18n&langtag=not-found/u, 404) + .get(/\?v-r=i18n&langtag=unknown/u, { body: { 'addresses.form.city.label': 'Sehir', 'addresses.form.street.label': 'Sokak', }, status: 200, }) - .get('*', { + .get(/\?v-r=i18n&.*/u, { body: { 'addresses.form.city.label': 'City', 'addresses.form.street.label': 'Street',