Repository navigation
Conversation
🦋 Changeset detectedLatest commit: 190700a The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
Author
|
Makes sense, since |
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.
Fixes #3162
svelte-check's default mode and
--tsgo-experimental-apinow take the hooks and params locations from the Svelte config'sfilesoption, and all modes readfiles.src.What was wrong:
JSOrTSDocumentSnapshotread the config only for files that already matched the default locations, and then assigned with||=over non-empty defaults, so a configured location never applied.--tsgo-experimental-apiprovider had its own copy of the defaults. That copy is also where fix: typehooks.serverexports with--tsgo-experimental-api#3154 fixes the server hooks path, so this includes that fix; once one of them lands, I'll merge master into the other.hooks.server: 'server'also typedobserver.tsandother/server.ts.What changed:
resolveKitFilesSettings(inconfigLoader.ts) mapsfilesto the settings for every mode. Like SvelteKit, a location the config sets, directly or throughfiles.src, is resolved in the config's directory. Locations the config leaves out keep the relative defaults.isHooksFile/isParamsFilecompare an absolute location as a path, so only the configured location matches: not a deeper folder with the same names, another drive or share. Relative locations still match in any folder, as the defaults always have.node_modulesand none are hooks or param matchers, so this doesn't add a lookup per.d.ts.Test: a
DocumentSnapshotcase loads a smallsvelte.config.jsfixture (files.src: './app'and a custom server hooks path) throughconfigLoader.loadConfigs, and checks that the hooks and params files get their types and that the same relative path inside another folder doesn't. On master it fails at "configured server hook must be typed". Rootpnpm testpasses.pnpm lintpasses with #3161's ignore rules; without them it fails on generated files afterpnpm test.