Skip to content

Commit a87a4ca

Browse files
authored
[fix] add migration hint for renamed methods (#7874)
related to #7776
1 parent 1c9471b commit a87a4ca

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

Diff for: .changeset/fresh-zebras-mate.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sveltejs/kit': patch
3+
---
4+
5+
[fix] add migration hint for renamed methods

Diff for: packages/kit/src/runtime/app/navigation.js

+10
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,13 @@ export const preloadData = ssr ? guard('preloadData') : client.preload_data;
2121
export const preloadCode = ssr ? guard('preloadCode') : client.preload_code;
2222
export const beforeNavigate = ssr ? () => {} : client.before_navigate;
2323
export const afterNavigate = ssr ? () => {} : client.after_navigate;
24+
25+
// TODO remove for 1.0 release
26+
/** @param {any} _args */
27+
export const prefetch = (..._args) => {
28+
throw new Error('prefetch has been renamed to preloadData');
29+
};
30+
/** @param {any} _args */
31+
export const prefetchRoutes = (..._args) => {
32+
throw new Error('prefetchRoutes has been renamed to preloadCode');
33+
};

0 commit comments

Comments
 (0)