diff --git a/ark_nova_stats/frontend/src/setupTests.jsx b/ark_nova_stats/frontend/src/setupTests.jsx index ab83bcce..69b3cb83 100644 --- a/ark_nova_stats/frontend/src/setupTests.jsx +++ b/ark_nova_stats/frontend/src/setupTests.jsx @@ -1,4 +1,15 @@ import '@testing-library/jest-dom' import { jest } from '@jest/globals'; +import { TextEncoder, TextDecoder } from 'util'; global.jest = jest; + +Object.defineProperty(window, 'TextEncoder', { + writable: true, + value: TextEncoder +}); + +Object.defineProperty(window, 'TextDecoder', { + writable: true, + value: TextDecoder +}); diff --git a/fitbit_challenges/frontend/src/setupTests.jsx b/fitbit_challenges/frontend/src/setupTests.jsx index ab83bcce..69b3cb83 100644 --- a/fitbit_challenges/frontend/src/setupTests.jsx +++ b/fitbit_challenges/frontend/src/setupTests.jsx @@ -1,4 +1,15 @@ import '@testing-library/jest-dom' import { jest } from '@jest/globals'; +import { TextEncoder, TextDecoder } from 'util'; global.jest = jest; + +Object.defineProperty(window, 'TextEncoder', { + writable: true, + value: TextEncoder +}); + +Object.defineProperty(window, 'TextDecoder', { + writable: true, + value: TextDecoder +}); diff --git a/package-lock.json b/package-lock.json index 1829bea4..8f001341 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,7 +33,7 @@ "react-canvas-confetti": "^2.0.7", "react-dom": "^18.3.1", "react-plotly.js": "^2.6.0", - "react-router-dom": "^6.27.0", + "react-router-dom": "^7.1.0", "react-scripts": "^5.0.1", "typescript": "^5", "web-vitals": "^4.2.4" @@ -3579,14 +3579,6 @@ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0" } }, - "node_modules/@remix-run/router": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.20.0.tgz", - "integrity": "sha512-mUnk8rPJBI9loFDZ+YzPGdeniYK+FTmRD1TMCz7ev2SNIozyKKpnGgsxO34u6Z4z/t0ITuu7voi/AshfsGsgFg==", - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@rollup/plugin-babel": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", @@ -4229,6 +4221,11 @@ "@types/node": "*" } }, + "node_modules/@types/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==" + }, "node_modules/@types/eslint": { "version": "8.56.10", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz", @@ -17181,33 +17178,49 @@ } }, "node_modules/react-router": { - "version": "6.27.0", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.27.0.tgz", - "integrity": "sha512-YA+HGZXz4jaAkVoYBE98VQl+nVzI+cVI2Oj/06F5ZM+0u3TgedN9Y9kmMRo2mnkSK2nCpNQn0DVob4HCsY/WLw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.1.0.tgz", + "integrity": "sha512-VcFhWqkNIcojDRYaUO8qV0Jib52s9ULpCp3nkBbmrvtoCVFRp6tmk3tJ2w9BZauVctA1YRnJlFYDn9iJRuCpGA==", "dependencies": { - "@remix-run/router": "1.20.0" + "@types/cookie": "^0.6.0", + "cookie": "^1.0.1", + "set-cookie-parser": "^2.6.0", + "turbo-stream": "2.4.0" }, "engines": { - "node": ">=14.0.0" + "node": ">=20.0.0" }, "peerDependencies": { - "react": ">=16.8" + "react": ">=18", + "react-dom": ">=18" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + } } }, "node_modules/react-router-dom": { - "version": "6.27.0", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.27.0.tgz", - "integrity": "sha512-+bvtFWMC0DgAFrfKXKG9Fc+BcXWRUO1aJIihbB79xaeq0v5UzfvnM5houGUm1Y461WVRcgAQ+Clh5rdb1eCx4g==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.1.0.tgz", + "integrity": "sha512-F4/nYBC9e4s0/ZjxM8GkZ9a68DpX76LN1a9W9mfPl2GfbDJ9/vzJro6MThNR5qGBH6KkgcK1BziyEzXhHV46Xw==", "dependencies": { - "@remix-run/router": "1.20.0", - "react-router": "6.27.0" + "react-router": "7.1.0" }, "engines": { - "node": ">=14.0.0" + "node": ">=20.0.0" }, "peerDependencies": { - "react": ">=16.8", - "react-dom": ">=16.8" + "react": ">=18", + "react-dom": ">=18" + } + }, + "node_modules/react-router/node_modules/cookie": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz", + "integrity": "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==", + "engines": { + "node": ">=18" } }, "node_modules/react-scripts": { @@ -19855,6 +19868,11 @@ "node": ">= 0.8.0" } }, + "node_modules/set-cookie-parser": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz", + "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==" + }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -21411,6 +21429,11 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, + "node_modules/turbo-stream": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/turbo-stream/-/turbo-stream-2.4.0.tgz", + "integrity": "sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g==" + }, "node_modules/type": { "version": "2.7.3", "resolved": "https://registry.npmjs.org/type/-/type-2.7.3.tgz", diff --git a/package.json b/package.json index f28019b3..44b0feaa 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "react-canvas-confetti": "^2.0.7", "react-dom": "^18.3.1", "react-plotly.js": "^2.6.0", - "react-router-dom": "^6.27.0", + "react-router-dom": "^7.1.0", "react-scripts": "^5.0.1", "typescript": "^5", "web-vitals": "^4.2.4" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 406df5a4..a4c63c2c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -69,8 +69,8 @@ dependencies: specifier: ^2.6.0 version: 2.6.0(plotly.js@2.35.3)(react@18.3.1) react-router-dom: - specifier: ^6.27.0 - version: 6.27.0(react-dom@18.3.1)(react@18.3.1) + specifier: ^7.1.0 + version: 7.1.0(react-dom@18.3.1)(react@18.3.1) react-scripts: specifier: ^5.0.1 version: 5.0.1(@babel/plugin-syntax-flow@7.26.0)(@babel/plugin-transform-react-jsx@7.25.9)(eslint@8.57.1)(react@18.3.1)(typescript@5.0.2)(webpack-cli@6.0.1) @@ -2723,11 +2723,6 @@ packages: react: 18.3.1 dev: false - /@remix-run/router@1.20.0: - resolution: {integrity: sha512-mUnk8rPJBI9loFDZ+YzPGdeniYK+FTmRD1TMCz7ev2SNIozyKKpnGgsxO34u6Z4z/t0ITuu7voi/AshfsGsgFg==} - engines: {node: '>=14.0.0'} - dev: false - /@rollup/plugin-babel@5.3.1(@babel/core@7.26.0)(rollup@2.79.2): resolution: {integrity: sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==} engines: {node: '>= 10.0.0'} @@ -3146,6 +3141,10 @@ packages: '@types/node': 22.10.2 dev: false + /@types/cookie@0.6.0: + resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} + dev: false + /@types/eslint@8.56.12: resolution: {integrity: sha512-03ruubjWyOHlmljCVoxSuNDdmfZDzsrrz0P2LeJsOXr+ZwFQ+0yQIwNCwt/GYhV7Z31fgtXJTAEs+FYlEL851g==} dependencies: @@ -4857,6 +4856,11 @@ packages: engines: {node: '>= 0.6'} dev: false + /cookie@1.0.2: + resolution: {integrity: sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==} + engines: {node: '>=18'} + dev: false + /copy-webpack-plugin@12.0.2(webpack@5.95.0): resolution: {integrity: sha512-SNwdBeHyII+rWvee/bTnAYyO8vfVdcSTud4EIb6jcZ8inLeWucJE0DnxXQBjlQ5zlteuuvooGQy3LIyGxhvlOA==} engines: {node: '>= 18.12.0'} @@ -11486,27 +11490,34 @@ packages: engines: {node: '>=0.10.0'} dev: false - /react-router-dom@6.27.0(react-dom@18.3.1)(react@18.3.1): - resolution: {integrity: sha512-+bvtFWMC0DgAFrfKXKG9Fc+BcXWRUO1aJIihbB79xaeq0v5UzfvnM5houGUm1Y461WVRcgAQ+Clh5rdb1eCx4g==} - engines: {node: '>=14.0.0'} + /react-router-dom@7.1.0(react-dom@18.3.1)(react@18.3.1): + resolution: {integrity: sha512-F4/nYBC9e4s0/ZjxM8GkZ9a68DpX76LN1a9W9mfPl2GfbDJ9/vzJro6MThNR5qGBH6KkgcK1BziyEzXhHV46Xw==} + engines: {node: '>=20.0.0'} peerDependencies: - react: '>=16.8' - react-dom: '>=16.8' + react: '>=18' + react-dom: '>=18' dependencies: - '@remix-run/router': 1.20.0 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - react-router: 6.27.0(react@18.3.1) + react-router: 7.1.0(react-dom@18.3.1)(react@18.3.1) dev: false - /react-router@6.27.0(react@18.3.1): - resolution: {integrity: sha512-YA+HGZXz4jaAkVoYBE98VQl+nVzI+cVI2Oj/06F5ZM+0u3TgedN9Y9kmMRo2mnkSK2nCpNQn0DVob4HCsY/WLw==} - engines: {node: '>=14.0.0'} + /react-router@7.1.0(react-dom@18.3.1)(react@18.3.1): + resolution: {integrity: sha512-VcFhWqkNIcojDRYaUO8qV0Jib52s9ULpCp3nkBbmrvtoCVFRp6tmk3tJ2w9BZauVctA1YRnJlFYDn9iJRuCpGA==} + engines: {node: '>=20.0.0'} peerDependencies: - react: '>=16.8' + react: '>=18' + react-dom: '>=18' + peerDependenciesMeta: + react-dom: + optional: true dependencies: - '@remix-run/router': 1.20.0 + '@types/cookie': 0.6.0 + cookie: 1.0.2 react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + set-cookie-parser: 2.7.1 + turbo-stream: 2.4.0 dev: false /react-scripts@5.0.1(@babel/plugin-syntax-flow@7.26.0)(@babel/plugin-transform-react-jsx@7.25.9)(eslint@8.57.1)(react@18.3.1)(typescript@5.0.2)(webpack-cli@6.0.1): @@ -12216,6 +12227,10 @@ packages: - supports-color dev: false + /set-cookie-parser@2.7.1: + resolution: {integrity: sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==} + dev: false + /set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} @@ -13143,6 +13158,10 @@ packages: typescript: 5.0.2 dev: false + /turbo-stream@2.4.0: + resolution: {integrity: sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g==} + dev: false + /type-check@0.3.2: resolution: {integrity: sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==} engines: {node: '>= 0.8.0'} diff --git a/skeleton/frontend/src/setupTests.jsx b/skeleton/frontend/src/setupTests.jsx index ab83bcce..69b3cb83 100644 --- a/skeleton/frontend/src/setupTests.jsx +++ b/skeleton/frontend/src/setupTests.jsx @@ -1,4 +1,15 @@ import '@testing-library/jest-dom' import { jest } from '@jest/globals'; +import { TextEncoder, TextDecoder } from 'util'; global.jest = jest; + +Object.defineProperty(window, 'TextEncoder', { + writable: true, + value: TextEncoder +}); + +Object.defineProperty(window, 'TextDecoder', { + writable: true, + value: TextDecoder +});