Skip to content

breaking: remove stores and other todos#15499

Open
teemingc wants to merge 40 commits intoversion-3from
remove-stores
Open

breaking: remove stores and other todos#15499
teemingc wants to merge 40 commits intoversion-3from
remove-stores

Conversation

@teemingc
Copy link
Member

@teemingc teemingc commented Mar 6, 2026

closes #15406

requires sveltejs/svelte.dev#1845 to be merged for docs to build successfully

This PR tries to resolve a bunch of TODOs we had for Kit 3, including removing:

  • $app/stores
    - base, assets, and resolveRoute from $app/paths
    - builder.createEntries
  • navigation.delta for non-popstate navigations
  • Svelte 4 workarounds
  • Warnings and errors that were only required for to help people migrate years ago
    - Pre-Node 22 workarounds such as a util to replace Promise.withResolvers()

Some thoughts:

  1. Do we want to follow up by changing test files to rune syntax in another PR?
  2. Would it be better to split these removals into smaller PRs?

EDIT: split some changes into other PRs to make this one smaller


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 test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Edits

  • Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.

@changeset-bot
Copy link

changeset-bot bot commented Mar 6, 2026

🦋 Changeset detected

Latest commit: 26f9ff7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@teemingc teemingc changed the base branch from main to version-3 March 6, 2026 01:55
@svelte-docs-bot
Copy link

Copy link
Contributor

@vercel vercel bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Suggestion:

Generated root.svelte calls stores.page.set(), stores.page.notify(), and stores.page.subscribe() but stores prop is never passed on the client side, causing runtime errors

Fix on Vercel

@teemingc teemingc changed the title breaking: remove stores breaking: remove stores and resolve todos Mar 6, 2026
@teemingc teemingc marked this pull request as draft March 6, 2026 03:27
@teemingc teemingc changed the title breaking: remove stores and resolve todos breaking: remove stores and other todos Mar 6, 2026
@teemingc teemingc marked this pull request as ready for review March 6, 2026 12:39
Comment on lines -13 to -14
/* global ENV_PREFIX */
/* global PRECOMPRESS */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The globals are already declared in index.d.ts

}
mounted = true;
return unsubscribe;
initialised = true;
Copy link
Member Author

@teemingc teemingc Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a choice of doing if(untrack(() => mounted)) or having this non-reactive flag so that we only announce routes after the first time page is updated. Seemed better to not import untrack when declaring this simple flag is cheaper

"test:others": "pnpm -r --filter='./packages/*' --filter=!./packages/kit/ --workspace-concurrency=1 test",
"check": "pnpm -r prepublishOnly && pnpm -r check",
"lint": "pnpm -r lint && eslint --cache --cache-location node_modules/.eslintcache 'packages/**/*.js'",
"lint": "pnpm -r lint && echo '\nRunning eslint...' && eslint --cache --cache-location node_modules/.eslintcache 'packages/**/*.js'",
Copy link
Member Author

@teemingc teemingc Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ESLint doesn't output anything when it starts or after a successful run. This placeholder message helps because I thought the linting was frozen after it ran prettier checks in each directory but the process hadn't exited yet.

"target": "es2023",
"module": "node16",
"moduleResolution": "node16",
"target": "esnext",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to change this to get the types for Promise.withResolvers(). Not sure what the effect is on our types generation

@teemingc teemingc marked this pull request as draft March 6, 2026 14:24
@teemingc teemingc marked this pull request as ready for review March 6, 2026 16:34
@teemingc teemingc marked this pull request as draft March 6, 2026 16:51
@teemingc teemingc marked this pull request as ready for review March 7, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove stores

1 participant