Skip to content

fix: ensure redirect used in packages uses the same Redirect instance #13843

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 5, 2025

Conversation

eltigerchino
Copy link
Member

@eltigerchino eltigerchino commented May 30, 2025

fixes #13816

This PR ensures any packages depending on @sveltejs/kit are not externalised so that the instanceof Redirect checks we have works when another package uses our redirect() method.

Thanks to @dominikg and Vitefu, I've followed the example from https://github.com/sveltejs/vite-plugin-svelte/blob/6e338f4a293dd4a1ef29a96f9362f9a7b36524e4/packages/vite-plugin-svelte/src/utils/options.js#L478-L480


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.

Copy link

changeset-bot bot commented May 30, 2025

🦋 Changeset detected

Latest commit: 699ae17

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 Patch

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

@eltigerchino eltigerchino marked this pull request as draft May 30, 2025 07:18
@eltigerchino eltigerchino marked this pull request as ready for review May 30, 2025 15:29
@elliott-with-the-longest-name-on-github elliott-with-the-longest-name-on-github merged commit 408e1f5 into main Jun 5, 2025
18 checks passed
@elliott-with-the-longest-name-on-github elliott-with-the-longest-name-on-github deleted the redirect-from-package branch June 5, 2025 17:30
@github-actions github-actions bot mentioned this pull request Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

redirect does not work when called from separate library
2 participants