Skip to content

Commit

Permalink
[fix] add migration hint for renamed methods
Browse files Browse the repository at this point in the history
related to #7776
  • Loading branch information
dummdidumm committed Nov 29, 2022
1 parent 1c9471b commit a7503bf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/fresh-zebras-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

[fix] add migration hint for renamed methods
10 changes: 10 additions & 0 deletions packages/kit/src/runtime/app/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,13 @@ export const preloadData = ssr ? guard('preloadData') : client.preload_data;
export const preloadCode = ssr ? guard('preloadCode') : client.preload_code;
export const beforeNavigate = ssr ? () => {} : client.before_navigate;
export const afterNavigate = ssr ? () => {} : client.after_navigate;

// TODO remove for 1.0 release
/** @param {any} _args */
export const prefetch = (..._args) => {
throw new Error('prefetch has been renamed to preloadData');
};
/** @param {any} _args */
export const prefetchRoutes = (..._args) => {
throw new Error('prefetchRoutes has been renamed to preloadCode');
};

0 comments on commit a7503bf

Please sign in to comment.