From 8cef9fe9f25ef58c64c808b23f6a63b395eac09c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Westk=C3=A4mper?= Date: Mon, 30 Dec 2024 15:00:15 +0200 Subject: [PATCH 1/2] Bump node version --- .github/workflows/ci.yml | 2 +- .github/workflows/npm_publish.yml | 2 +- .github/workflows/publish-docs.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b97d52b..f6cf0b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 22 - name: Install dependencies run: npm ci diff --git a/.github/workflows/npm_publish.yml b/.github/workflows/npm_publish.yml index 8ac3044..33e7b98 100644 --- a/.github/workflows/npm_publish.yml +++ b/.github/workflows/npm_publish.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 22 - run: npm init --scope=nosto -y - run: npm install - run: npm run build diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 024b180..814a902 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -33,7 +33,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 22 cache: 'npm' - run: npm ci From 826818d9826de061c920f087ed3720807b40db1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Westk=C3=A4mper?= Date: Mon, 30 Dec 2024 15:06:24 +0200 Subject: [PATCH 2/2] Fix test --- package-lock.json | 20 +++++++++++++------- spec/setup.js | 1 - 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2edef8f..4d8d6d1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,12 +8,8 @@ "name": "@nosto/nosto-react", "version": "2.3.0", "license": "ISC", - "dependencies": { - "@nosto/nosto-js": "*", - "react": "^19.0.0", - "react-dom": "^19.0.0" - }, "devDependencies": { + "@nosto/nosto-js": "*", "@testing-library/jest-dom": "^6.4.8", "@testing-library/react": "^16.0.0", "@testing-library/user-event": "^14.4.3", @@ -25,6 +21,8 @@ "eslint-plugin-promise": "^7.1.0", "eslint-plugin-react": "^7.33.2", "prettier": "^3.3.3", + "react": "^19.0.0", + "react-dom": "^19.0.0", "react-router": "^7.0.1", "react-router-dom": "^7.0.1", "rimraf": "^6.0.1", @@ -34,6 +32,10 @@ "vite": "^6.0.3", "vite-plugin-dts": "^4.2.2", "vitest": "^2.0.5" + }, + "peerDependencies": { + "react": "^18.3.1 || ^19.0.0", + "react-dom": "^18.3.1 || ^19.0.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -1214,7 +1216,8 @@ "node_modules/@nosto/nosto-js": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@nosto/nosto-js/-/nosto-js-1.0.9.tgz", - "integrity": "sha512-YlWMHtgotDicGT5sli29NzwlQklffdhclK45hjVU6wIEURT/r9nkX3DFe/pWs+HljwLWBDgyB6fWiF+heTuqxg==" + "integrity": "sha512-YlWMHtgotDicGT5sli29NzwlQklffdhclK45hjVU6wIEURT/r9nkX3DFe/pWs+HljwLWBDgyB6fWiF+heTuqxg==", + "dev": true }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", @@ -5835,6 +5838,7 @@ "version": "19.0.0", "resolved": "https://registry.npmjs.org/react/-/react-19.0.0.tgz", "integrity": "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -5843,6 +5847,7 @@ "version": "19.0.0", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0.tgz", "integrity": "sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==", + "dev": true, "dependencies": { "scheduler": "^0.25.0" }, @@ -6185,7 +6190,8 @@ "node_modules/scheduler": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0.tgz", - "integrity": "sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==" + "integrity": "sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==", + "dev": true }, "node_modules/semver": { "version": "6.3.1", diff --git a/spec/setup.js b/spec/setup.js index 6323639..f8642d9 100644 --- a/spec/setup.js +++ b/spec/setup.js @@ -14,7 +14,6 @@ global.window.CSS = { escape: v => v } global.location = window.location global.document = window.document global.localStorage = window.localStorage -global.navigator = window.navigator // test mode flag global.window.nostoReactTest = true