@sveltejs/kit 1.3.3 → 1.3.5

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.3.3",
3
+ "version": "1.3.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/sveltejs/kit",
@@ -13,7 +13,7 @@
13
13
  "@sveltejs/vite-plugin-svelte": "^2.0.0",
14
14
  "@types/cookie": "^0.5.1",
15
15
  "cookie": "^0.5.0",
16
- "devalue": "^4.2.2",
16
+ "devalue": "^4.2.3",
17
17
  "esm-env": "^1.0.0",
18
18
  "kleur": "^4.1.5",
19
19
  "magic-string": "^0.27.0",
@@ -55,9 +55,9 @@ async function analyse({ manifest_path, env }) {
55
55
  for (const loader of manifest._.nodes) {
56
56
  const node = await loader();
57
57
 
58
- metadata.nodes.push({
58
+ metadata.nodes[node.index] = {
59
59
  has_server_load: node.server?.load !== undefined
60
- });
60
+ };
61
61
  }
62
62
 
63
63
  // analyse routes
@@ -38,7 +38,6 @@ export function write_client_manifest(kit, manifest_data, output, metadata) {
38
38
 
39
39
  /** @type {Map<import('types').PageNode, number>} */
40
40
  const indices = new Map();
41
-
42
41
  const nodes = manifest_data.nodes
43
42
  .map((node, i) => {
44
43
  indices.set(node, i);
@@ -64,6 +63,7 @@ export function write_client_manifest(kit, manifest_data, output, metadata) {
64
63
  if (route.leaf) {
65
64
  if (metadata) {
66
65
  const i = /** @type {number} */ (indices.get(route.leaf));
66
+
67
67
  leaf_has_server_load = metadata[i].has_server_load;
68
68
  } else if (route.leaf.server) {
69
69
  leaf_has_server_load = true;
@@ -343,7 +343,7 @@ export function create_client({ target, base }) {
343
343
  }
344
344
 
345
345
  if (autoscroll) {
346
- const deep_linked = url.hash && document.getElementById(url.hash.slice(1));
346
+ const deep_linked = url.hash && document.querySelector(decodeURIComponent(url.hash));
347
347
  if (scroll) {
348
348
  scrollTo(scroll.x, scroll.y);
349
349
  } else if (deep_linked) {
package/types/index.d.ts CHANGED
@@ -506,7 +506,7 @@ export interface KitConfig {
506
506
  typescript?: {
507
507
  /**
508
508
  * A function that allows you to edit the generated `tsconfig.json`. You can mutate the config (recommended) or return a new one.
509
- * This is useful for to example — extend a shared `tsconfig.json` in a monorepo root
509
+ * This is useful for extending a shared `tsconfig.json` in a monorepo root, for example.
510
510
  * @default (config) => config
511
511
  */
512
512
  config?: (config: Record<string, any>) => Record<string, any> | void;