chore: fix ecosystem CI
#13054
Pull request
This PR is meant to get the ecosystem CI passing for SvelteKit, which overrides Svelte 4 with 5 (and vite-plugin-svelte 3 with 4 in my testing). https://github.com/sveltejs/svelte-ecosystem-ci/actions/runs/12026344184/job/33525133268
Changes are:
- update typescript version in test apps to match Svelte 5's so that exists in ts lib. This fixes this CI error where the event type can't be found.
explicitly use theuse string templates for values so that the text is visible ()."undefined"string in tests in place ofundefinedvalues- use
innerTextin place ofinnerHTMLfor tests when asserting content so that Svelte 5 hydration marker comments<!-- ->are not captured.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
- It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
- This message body should clearly illustrate what problems it solves.
- Ideally, include a test that fails without this PR but passes with it.
Tests
- Run the tests with
pnpm testand lint the project withpnpm lintandpnpm check
Changesets
- If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.
Edits
- Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.
Info
⚠️ No Changeset found
Latest commit: a8536a1
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
preview: https://svelte-dev-git-preview-kit-13054-svelte.vercel.app/
this is an automated message
The test below is currently failing on Svelte 5 due to this error #11057 https://github.com/sveltejs/kit/blob/7246a54968649d1bea0e608a72968f8bdc7c2e5c/packages/kit/test/apps/basics/test/client.test.js#L85-L90
Any error thrown from the browser during hydration (including accessing url.hash) seems to cause this error.
cd packages/kit/test/apps/basicpnpm dev- Navigate to
http://localhost:5173/load/url-hash
Browser logs:
Uncaught (in promise) HierarchyRequestError: Failed to execute 'appendChild' on 'Node': This node type does not support this method.
in +layout.svelte
in root.svelte
at Module.child (http://localhost:5173/node_modules/.vite/deps/chunk-4AIBKQBG.js?v=a2d4f57d:2051:27)
at _error (http://localhost:5173/src/routes/+error.svelte:40:22)
at http://localhost:5173/.svelte-kit/generated/root.svelte:281:12
at http://localhost:5173/node_modules/.vite/deps/chunk-BVF2PIZR.js?v=a2d4f57d:1180:30
at update_reaction (http://localhost:5173/node_modules/.vite/deps/chunk-4AIBKQBG.js?v=a2d4f57d:1062:23)
at update_effect (http://localhost:5173/node_modules/.vite/deps/chunk-4AIBKQBG.js?v=a2d4f57d:1153:21)
at create_effect (http://localhost:5173/node_modules/.vite/deps/chunk-4AIBKQBG.js?v=a2d4f57d:2168:7)
at branch (http://localhost:5173/node_modules/.vite/deps/chunk-4AIBKQBG.js?v=a2d4f57d:2300:10)
at http://localhost:5173/node_modules/.vite/deps/chunk-BVF2PIZR.js?v=a2d4f57d:1180:17
at update_reaction (http://localhost:5173/node_modules/.vite/deps/chunk-4AIBKQBG.js?v=a2d4f57d:1062:23)HierarchyRequestError: Failed to execute 'appendChild' on 'Node': This node type does not support this method.
in +layout.svelte
in root.svelte
at Module.child (http://localhost:5173/node_modules/.vite/deps/chunk-4AIBKQBG.js?v=a2d4f57d:2051:27)
at _error (http://localhost:5173/src/routes/+error.svelte:40:22)
at http://localhost:5173/.svelte-kit/generated/root.svelte:281:12
at http://localhost:5173/node_modules/.vite/deps/chunk-BVF2PIZR.js?v=a2d4f57d:1180:30
at update_reaction (http://localhost:5173/node_modules/.vite/deps/chunk-4AIBKQBG.js?v=a2d4f57d:1062:23)
at update_effect (http://localhost:5173/node_modules/.vite/deps/chunk-4AIBKQBG.js?v=a2d4f57d:1153:21)
at create_effect (http://localhost:5173/node_modules/.vite/deps/chunk-4AIBKQBG.js?v=a2d4f57d:2168:7)
at branch (http://localhost:5173/node_modules/.vite/deps/chunk-4AIBKQBG.js?v=a2d4f57d:2300:10)
at http://localhost:5173/node_modules/.vite/deps/chunk-BVF2PIZR.js?v=a2d4f57d:1180:17
at update_reaction (http://localhost:5173/node_modules/.vite/deps/chunk-4AIBKQBG.js?v=a2d4f57d:1062:23)
EDIT: created a new issue here sveltejs/svelte#14437
The tests in packages/kit/test/apps/options are failing because of the CSP directive below
https://github.com/sveltejs/kit/blob/7246a54968649d1bea0e608a72968f8bdc7c2e5c/packages/kit/test/apps/options/svelte.config.js#L9
Related to #7975
Filed an issue for this here sveltejs/svelte#14438
This reverts commit a19303dbbcbed407928359779b0182c460a15abc.
fix: use different technique to ensure asserting strictly for undefined
• Nov 26, 2024, 2:30 PMPro tip: You can prefix GitHub URLs of issues, PRs or discussions with svcl.dev/ to view them on this page! Also try it on a GitHub release ;)