chore: use unbundled type declarations for @sveltejs/kit/* modules - #16775
Draft
Rich-Harris wants to merge 1 commit into
Draft
chore: use unbundled type declarations for @sveltejs/kit/* modules#16775Rich-Harris wants to merge 1 commit into
@sveltejs/kit/* modules#16775Rich-Harris wants to merge 1 commit into
Conversation
|
Install the latest version of pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/8f2b6c30d67ae747713fcea4b68c98d8fcb0fdf0Open in |
🦋 Changeset detectedLatest commit: 8f2b6c3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We use dts-buddy to bundle our types, but the original reason for doing so doesn't really apply any more, as far as the
@sveltejs/kit/*modules go — everyone uses a modernmoduleResolutionoption now (I think the legacy ones were removed or deprecated?) which meanstypesresolve conditions inpackage.exportsare reliable. So we don't need to usedeclare modulefor people to be able to see the types of subpackages.We do still need it for
$app/*modules, of course. But making this change speeds upprepublishOnly, and means that cmd-click works much more reliably (no sourcemaps between you and the code).One thing I'm not sure about is why the
RequestEventandCookiestypes are being inlined into$app/serverrather than imported from@sveltejs/kit. Not sure off the top of my head if that's a bug in dts-buddy or a missing piece of config or something.Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
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