diff --git a/package.json b/package.json index b28c283f09be..f97bb6d6a6d9 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "eslint-config-prettier": "^9.1.0", "eslint-plugin-svelte": "^2.35.1", "eslint-plugin-unicorn": "^50.0.0", - "playwright": "1.30.0" + "playwright": "^1.41.0" }, "packageManager": "pnpm@8.14.1", "engines": { diff --git a/packages/adapter-static/package.json b/packages/adapter-static/package.json index aa9857815333..68e2351a0654 100644 --- a/packages/adapter-static/package.json +++ b/packages/adapter-static/package.json @@ -30,7 +30,7 @@ "test": "pnpm -r --workspace-concurrency 1 --filter=\"./test/**\" test" }, "devDependencies": { - "@playwright/test": "1.30.0", + "@playwright/test": "^1.41.0", "@sveltejs/kit": "workspace:^", "@sveltejs/vite-plugin-svelte": "^3.0.1", "@types/node": "^18.19.3", diff --git a/packages/create-svelte/package.json b/packages/create-svelte/package.json index 7e1beec273ee..e7fb1a3dc362 100644 --- a/packages/create-svelte/package.json +++ b/packages/create-svelte/package.json @@ -16,7 +16,7 @@ "kleur": "^4.1.5" }, "devDependencies": { - "@playwright/test": "1.30.0", + "@playwright/test": "^1.41.0", "@types/gitignore-parser": "^0.0.3", "gitignore-parser": "^0.0.2", "prettier": "^3.1.1", diff --git a/packages/kit/package.json b/packages/kit/package.json index 8b374eb824c4..9c641f95cc40 100644 --- a/packages/kit/package.json +++ b/packages/kit/package.json @@ -25,7 +25,7 @@ "tiny-glob": "^0.2.9" }, "devDependencies": { - "@playwright/test": "1.30.0", + "@playwright/test": "^1.41.0", "@sveltejs/vite-plugin-svelte": "^3.0.1", "@types/connect": "^3.4.38", "@types/node": "^18.19.3", diff --git a/packages/kit/test/apps/basics/test/cross-platform/client.test.js b/packages/kit/test/apps/basics/test/cross-platform/client.test.js index 804b4f06d4cd..7bda137157dc 100644 --- a/packages/kit/test/apps/basics/test/cross-platform/client.test.js +++ b/packages/kit/test/apps/basics/test/cross-platform/client.test.js @@ -417,13 +417,29 @@ test.describe('Scrolling', () => { await expect(page.locator('input')).toBeFocused(); }); - test('scroll positions are recovered on reloading the page', async ({ page, app }) => { + test('scroll positions are recovered on reloading the page', async ({ + page, + app, + browserName + }) => { + // No idea why the workaround below works only in dev mode + // A better solution would probably be to set fission.webContentIsolationStrategy: 1 + // in the Firefox preferences but the Playwright API to do so is incomprehensible + if (!process.env.DEV && browserName === 'firefox') { + return; + } + await page.goto('/anchor'); await page.evaluate(() => window.scrollTo(0, 1000)); await app.goto('/anchor/anchor'); await page.evaluate(() => window.scrollTo(0, 1000)); await page.reload(); + if (browserName === 'firefox') { + // Firefox with Playwright pushed new history entry history after reload + // See https://github.com/microsoft/playwright/issues/22640 + await page.goBack(); + } expect(await page.evaluate(() => window.scrollY)).toBe(1000); await page.goBack(); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bed64323f968..f538945982b9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -33,8 +33,8 @@ importers: specifier: ^50.0.0 version: 50.0.1(eslint@8.56.0) playwright: - specifier: 1.30.0 - version: 1.30.0 + specifier: ^1.41.0 + version: 1.41.0 packages/adapter-auto: dependencies: @@ -197,8 +197,8 @@ importers: packages/adapter-static: devDependencies: '@playwright/test': - specifier: 1.30.0 - version: 1.30.0 + specifier: ^1.41.0 + version: 1.41.0 '@sveltejs/kit': specifier: workspace:^ version: link:../kit @@ -289,7 +289,7 @@ importers: dependencies: '@sveltejs/kit': specifier: ^1.0.0 || ^2.0.0 - version: 2.3.5(@sveltejs/vite-plugin-svelte@3.0.1)(svelte@4.2.8)(vite@5.0.11) + version: link:../kit packages/create-svelte: dependencies: @@ -301,8 +301,8 @@ importers: version: 4.1.5 devDependencies: '@playwright/test': - specifier: 1.30.0 - version: 1.30.0 + specifier: ^1.41.0 + version: 1.41.0 '@types/gitignore-parser': specifier: ^0.0.3 version: 0.0.3 @@ -442,8 +442,8 @@ importers: version: 0.2.9 devDependencies: '@playwright/test': - specifier: 1.30.0 - version: 1.30.0 + specifier: ^1.41.0 + version: 1.41.0 '@sveltejs/vite-plugin-svelte': specifier: ^3.0.1 version: 3.0.1(svelte@4.2.8)(vite@5.0.11) @@ -2119,13 +2119,12 @@ packages: '@nodelib/fs.scandir': 2.1.5 fastq: 1.15.0 - /@playwright/test@1.30.0: - resolution: {integrity: sha512-SVxkQw1xvn/Wk/EvBnqWIq6NLo1AppwbYOjNLmyU0R1RoQ3rLEBtmjTnElcnz8VEtn11fptj1ECxK0tgURhajw==} - engines: {node: '>=14'} + /@playwright/test@1.41.0: + resolution: {integrity: sha512-Grvzj841THwtpBOrfiHOeYTJQxDRnKofMSzCiV8XeyLWu3o89qftQ4BCKfkziJhSUQRd0utKhrddtIsiraIwmw==} + engines: {node: '>=16'} hasBin: true dependencies: - '@types/node': 18.19.3 - playwright-core: 1.30.0 + playwright: 1.41.0 dev: true /@polka/url@1.0.0-next.24: @@ -2314,33 +2313,6 @@ packages: typescript: 5.3.3 dev: true - /@sveltejs/kit@2.3.5(@sveltejs/vite-plugin-svelte@3.0.1)(svelte@4.2.8)(vite@5.0.11): - resolution: {integrity: sha512-Vu+ckGQu/t+pcuueryaHYacgoYsYq6KB1k1p4w1xDp1eQ2aYz3POcx3GSuqxWjJfOwMMM83xiuAnDWBKyOn1Tg==} - engines: {node: '>=18.13'} - hasBin: true - requiresBuild: true - peerDependencies: - '@sveltejs/vite-plugin-svelte': ^3.0.0 - svelte: ^4.0.0 || ^5.0.0-next.0 - vite: ^5.0.3 - dependencies: - '@sveltejs/vite-plugin-svelte': 3.0.1(svelte@4.2.8)(vite@5.0.11) - '@types/cookie': 0.6.0 - cookie: 0.6.0 - devalue: 4.3.2 - esm-env: 1.0.0 - import-meta-resolve: 4.0.0 - kleur: 4.1.5 - magic-string: 0.30.5 - mrmime: 2.0.0 - sade: 1.8.1 - set-cookie-parser: 2.6.0 - sirv: 2.0.4 - svelte: 4.2.8 - tiny-glob: 0.2.9 - vite: 5.0.11(@types/node@18.19.3)(lightningcss@1.22.1) - dev: false - /@sveltejs/site-kit@6.0.0-next.59(@sveltejs/kit@packages+kit)(svelte@4.2.8): resolution: {integrity: sha512-nAUCuunhN0DmurQBxbsauqvdvv4mL0F/Aluxq0hFf6gB3iSn9WdaUZdPMXoujy+8cy+m6UvKuyhkgApZhmOLvw==} peerDependencies: @@ -2367,6 +2339,7 @@ packages: vite: 5.0.11(@types/node@18.19.3)(lightningcss@1.22.1) transitivePeerDependencies: - supports-color + dev: true /@sveltejs/vite-plugin-svelte@3.0.1(svelte@4.2.8)(vite@5.0.11): resolution: {integrity: sha512-CGURX6Ps+TkOovK6xV+Y2rn8JKa8ZPUHPZ/NKgCxAmgBrXReavzFl8aOSCj3kQ1xqT7yGJj53hjcV/gqwDAaWA==} @@ -2386,6 +2359,7 @@ packages: vitefu: 0.2.5(vite@5.0.11) transitivePeerDependencies: - supports-color + dev: true /@svitejs/changesets-changelog-github-compact@1.1.0: resolution: {integrity: sha512-qhUGGDHcpbY2zpjW3SwqchuW8J/5EzlPFud7xNntHKA7f3a/mx5+g+ruJKFHSAiVZYo30PALt+AyhmPUNKH/Og==} @@ -2457,6 +2431,7 @@ packages: resolution: {integrity: sha512-k5fggr14DwAytoA/t8rPrIz++lXK7/DqckthCmoZOKNsEbJkId4Z//BqgApXBUGrGddrigYa1oqheo/7YmW4rg==} dependencies: undici-types: 5.26.5 + dev: true /@types/normalize-package-data@2.4.4: resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -3375,6 +3350,7 @@ packages: resolution: {integrity: sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==} engines: {node: '>=0.10'} hasBin: true + dev: true /detect-libc@2.0.2: resolution: {integrity: sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==} @@ -3917,6 +3893,14 @@ packages: /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + /fsevents@2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + /fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -4537,6 +4521,7 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true + dev: true optional: true /lightningcss-darwin-x64@1.22.1: @@ -4545,6 +4530,7 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true + dev: true optional: true /lightningcss-freebsd-x64@1.22.1: @@ -4553,6 +4539,7 @@ packages: cpu: [x64] os: [freebsd] requiresBuild: true + dev: true optional: true /lightningcss-linux-arm-gnueabihf@1.22.1: @@ -4561,6 +4548,7 @@ packages: cpu: [arm] os: [linux] requiresBuild: true + dev: true optional: true /lightningcss-linux-arm64-gnu@1.22.1: @@ -4569,6 +4557,7 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: true optional: true /lightningcss-linux-arm64-musl@1.22.1: @@ -4577,6 +4566,7 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: true optional: true /lightningcss-linux-x64-gnu@1.22.1: @@ -4585,6 +4575,7 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: true optional: true /lightningcss-linux-x64-musl@1.22.1: @@ -4593,6 +4584,7 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: true optional: true /lightningcss-win32-x64-msvc@1.22.1: @@ -4601,6 +4593,7 @@ packages: cpu: [x64] os: [win32] requiresBuild: true + dev: true optional: true /lightningcss@1.22.1: @@ -4618,6 +4611,7 @@ packages: lightningcss-linux-x64-gnu: 1.22.1 lightningcss-linux-x64-musl: 1.22.1 lightningcss-win32-x64-msvc: 1.22.1 + dev: true /lilconfig@2.1.0: resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} @@ -4899,6 +4893,7 @@ packages: resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + dev: true /natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} @@ -5201,19 +5196,20 @@ packages: pathe: 1.1.2 dev: true - /playwright-core@1.30.0: - resolution: {integrity: sha512-7AnRmTCf+GVYhHbLJsGUtskWTE33SwMZkybJ0v6rqR1boxq2x36U7p1vDRV7HO2IwTZgmycracLxPEJI49wu4g==} - engines: {node: '>=14'} + /playwright-core@1.41.0: + resolution: {integrity: sha512-UGKASUhXmvqm2Lxa1fNr8sFwAtqjpgBRr9jQ7XBI8Rn5uFiEowGUGwrruUQsVPIom4bk7Lt+oLGpXobnXzrBIw==} + engines: {node: '>=16'} hasBin: true dev: true - /playwright@1.30.0: - resolution: {integrity: sha512-ENbW5o75HYB3YhnMTKJLTErIBExrSlX2ZZ1C/FzmHjUYIfxj/UnI+DWpQr992m+OQVSg0rCExAOlRwB+x+yyIg==} - engines: {node: '>=14'} + /playwright@1.41.0: + resolution: {integrity: sha512-XOsfl5ZtAik/T9oek4V0jAypNlaCNzuKOwVhqhgYT3os6kH34PzbRb74F0VWcLYa5WFdnmxl7qyAHBXvPv7lqQ==} + engines: {node: '>=16'} hasBin: true - requiresBuild: true dependencies: - playwright-core: 1.30.0 + playwright-core: 1.41.0 + optionalDependencies: + fsevents: 2.3.2 dev: true /pluralize@8.0.0: @@ -5288,6 +5284,7 @@ packages: nanoid: 3.3.7 picocolors: 1.0.0 source-map-js: 1.0.2 + dev: true /preferred-pm@3.1.2: resolution: {integrity: sha512-nk7dKrcW8hfCZ4H6klWcdRknBOXWzNQByJ0oJyX97BOupsYD+FzLS4hflgEu/uPUEHZCuRfMxzCBsuWd7OzT8Q==} @@ -5986,6 +5983,7 @@ packages: svelte: ^3.19.0 || ^4.0.0 dependencies: svelte: 4.2.8 + dev: true /svelte-local-storage-store@0.6.4(svelte@4.2.8): resolution: {integrity: sha512-45WoY2vSGPQM1sIQJ9jTkPPj20hYeqm+af6mUGRFSPP5WglZf36YYoZqwmZZ8Dt/2SU8lem+BTA8/Z/8TkqNLg==} @@ -6323,6 +6321,7 @@ packages: /undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + dev: true /universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} @@ -6446,6 +6445,7 @@ packages: rollup: 4.9.5 optionalDependencies: fsevents: 2.3.3 + dev: true /vitefu@0.2.5(vite@5.0.11): resolution: {integrity: sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==} @@ -6456,6 +6456,7 @@ packages: optional: true dependencies: vite: 5.0.11(@types/node@18.19.3)(lightningcss@1.22.1) + dev: true /vitest@1.2.0(@types/node@18.19.3)(lightningcss@1.22.1): resolution: {integrity: sha512-Ixs5m7BjqvLHXcibkzKRQUvD/XLw0E3rvqaCMlrm/0LMsA0309ZqYvTlPzkhh81VlEyVZXFlwWnkhb6/UMtcaQ==} diff --git a/renovate.json b/renovate.json index ca68a4d66245..1131556abb02 100644 --- a/renovate.json +++ b/renovate.json @@ -10,10 +10,8 @@ "enabled": false }, "ignoreDeps": [ - "@playwright/test", "@types/node", "esbuild", - "playwright", "rollup", "typescript" ],