Skip to content
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

chore: update broken links #11320

Merged
merged 3 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/brave-nails-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"svelte-migrate": patch
---

chore: fix broken migration links
16 changes: 8 additions & 8 deletions packages/migrate/migrations/sveltekit-2/migrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function update_tsconfig_content(content) {
if (updated !== content) {
log_migration(
'Removed deprecated `importsNotUsedAsValues` and `preserveValueImports`' +
' from tsconfig.json: https://kit.svelte.dev/docs/v2-migration-guide#updated-dependency-requirements'
' from tsconfig.json: https://kit.svelte.dev/docs/migrating-to-sveltekit-2#updated-dependency-requirements'
);
}

Expand All @@ -68,13 +68,13 @@ export function update_tsconfig_content(content) {
if (updated !== content) {
log_migration(
'Updated `moduleResolution` to `bundler`' +
' in tsconfig.json: https://kit.svelte.dev/docs/v2-migration-guide#updated-dependency-requirements'
' in tsconfig.json: https://kit.svelte.dev/docs/migrating-to-sveltekit-2#updated-dependency-requirements'
);
}

if (content.includes('"paths":') || content.includes('"baseUrl":')) {
log_migration(
'`paths` and/or `baseUrl` detected in your tsconfig.json - remove it and use `kit.alias` instead: https://kit.svelte.dev/docs/v2-migration-guide#generated-tsconfigjson-is-more-strict'
'`paths` and/or `baseUrl` detected in your tsconfig.json - remove it and use `kit.alias` instead: https://kit.svelte.dev/docs/migrating-to-sveltekit-2#generated-tsconfigjson-is-more-strict'
);
}

Expand All @@ -96,7 +96,7 @@ export function update_svelte_config_content(code) {
const result = code.replace(regex, '');
if (result !== code) {
log_migration(
'Removed `dangerZone` from svelte.config.js: https://kit.svelte.dev/docs/v2-migration-guide#server-fetches-are-not-trackable-anymore'
'Removed `dangerZone` from svelte.config.js: https://kit.svelte.dev/docs/migrating-to-sveltekit-2#server-fetches-are-not-trackable-anymore'
);
}

Expand All @@ -108,7 +108,7 @@ export function update_svelte_config_content(code) {

const logger = log_on_ts_modification(
source,
'Changed `vitePreprocess` import: https://kit.svelte.dev/docs/v2-migration-guide#vitepreprocess-is-no-longer-exported-from-sveltejs-kit-vite'
'Changed `vitePreprocess` import: https://kit.svelte.dev/docs/migrating-to-sveltekit-2#vitepreprocess-is-no-longer-exported-from-sveltejs-kit-vite'
);

if (namedImport.getParent().getParent().getNamedImports().length === 1) {
Expand Down Expand Up @@ -157,7 +157,7 @@ export function transform_code(code, _is_ts, file_path) {
function remove_throws(source) {
const logger = log_on_ts_modification(
source,
'Removed `throw` from redirect/error functions: https://kit.svelte.dev/docs/v2-migration-guide#redirect-and-error-are-no-longer-thrown-by-you'
'Removed `throw` from redirect/error functions: https://kit.svelte.dev/docs/migrating-to-sveltekit-2#redirect-and-error-are-no-longer-thrown-by-you'
);

/** @param {string} id */
Expand Down Expand Up @@ -204,7 +204,7 @@ function add_cookie_note(file_path, source) {

const logger = log_on_ts_modification(
source,
'Remember to add the `path` option to `cookies.set/delete/serialize` calls: https://kit.svelte.dev/docs/v2-migration-guide#path-is-now-a-required-option-for-cookies'
'Remember to add the `path` option to `cookies.set/delete/serialize` calls: https://kit.svelte.dev/docs/migrating-to-sveltekit-2#path-is-now-a-required-option-for-cookies'
);

const calls = [];
Expand Down Expand Up @@ -282,7 +282,7 @@ function replace_resolve_path(source) {

const logger = log_on_ts_modification(
source,
'Replaced `resolvePath` with `resolveRoute`: https://kit.svelte.dev/docs/v2-migration-guide#resolvePath-has-been-removed'
'Replaced `resolvePath` with `resolveRoute`: https://kit.svelte.dev/docs/migrating-to-sveltekit-2#resolvePath-has-been-removed'
);

for (const id of namedImport.getNameNode().findReferencesAsNodes()) {
Expand Down
Loading