@sveltejs/kit 1.16.0 → 1.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltejs/kit",
3
- "version": "1.16.0",
3
+ "version": "1.16.1",
4
4
  "description": "The fastest way to build Svelte apps",
5
5
  "repository": {
6
6
  "type": "git",
@@ -525,6 +525,12 @@ function kit({ svelte_config }) {
525
525
  } else {
526
526
  input['entry/start'] = `${runtime_directory}/client/start.js`;
527
527
  input['entry/app'] = `${kit.outDir}/generated/client-optimized/app.js`;
528
+
529
+ manifest_data.nodes.forEach((node, i) => {
530
+ if (node.component || node.universal) {
531
+ input[`nodes/${i}`] = `${kit.outDir}/generated/client-optimized/nodes/${i}.js`;
532
+ }
533
+ });
528
534
  }
529
535
 
530
536
  // see the kit.output.preloadStrategy option for details on why we have multiple options here
@@ -171,6 +171,9 @@ export function create_client(app, target) {
171
171
  if (navigation_result.type === 'redirect') {
172
172
  return goto(new URL(navigation_result.location, url).href, {}, [url.pathname], nav_token);
173
173
  } else {
174
+ if (navigation_result.props.page !== undefined) {
175
+ page = navigation_result.props.page;
176
+ }
174
177
  root.$set(navigation_result.props);
175
178
  }
176
179
  }
@@ -1737,14 +1740,30 @@ export function create_client(app, target) {
1737
1740
  });
1738
1741
  });
1739
1742
 
1743
+ /** @type {Array<import('./types').BranchNode | undefined>} */
1744
+ const branch = await Promise.all(branch_promises);
1745
+
1746
+ const parsed_route = routes.find(({ id }) => id === route.id);
1747
+
1748
+ // server-side will have compacted the branch, reinstate empty slots
1749
+ // so that error boundaries can be lined up correctly
1750
+ if (parsed_route) {
1751
+ const layouts = parsed_route.layouts;
1752
+ for (let i = 0; i < layouts.length; i++) {
1753
+ if (!layouts[i]) {
1754
+ branch.splice(i, 0, undefined);
1755
+ }
1756
+ }
1757
+ }
1758
+
1740
1759
  result = await get_navigation_result_from_branch({
1741
1760
  url,
1742
1761
  params,
1743
- branch: await Promise.all(branch_promises),
1762
+ branch,
1744
1763
  status,
1745
1764
  error,
1746
1765
  form,
1747
- route: routes.find(({ id }) => id === route.id) ?? null
1766
+ route: parsed_route ?? null
1748
1767
  });
1749
1768
  } catch (error) {
1750
1769
  if (error instanceof Redirect) {