@sveltejs/kit 1.0.0-next.188 → 1.0.0-next.189

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.
@@ -47,9 +47,7 @@ async function prefetchRoutes_(pathnames) {
47
47
  ? router.routes.filter((route) => pathnames.some((pathname) => route[0].test(pathname)))
48
48
  : router.routes;
49
49
 
50
- const promises = matching
51
- .filter(/** @returns {r is import('types/internal').CSRPage} */ (r) => r && r.length > 1)
52
- .map((r) => Promise.all(r[1].map((load) => load())));
50
+ const promises = matching.map((r) => Promise.all(r[1].map((load) => load())));
53
51
 
54
52
  await Promise.all(promises);
55
53
  }
@@ -749,21 +749,13 @@ class Renderer {
749
749
  for (let i = 0; i < info.routes.length; i += 1) {
750
750
  const route = info.routes[i];
751
751
 
752
- // check if endpoint route
753
- if (route.length === 1) {
754
- return { reload: true, props: {}, state: this.current };
755
- }
756
-
757
752
  // load code for subsequent routes immediately, if they are as
758
753
  // likely to match the current path/query as the current one
759
754
  let j = i + 1;
760
755
  while (j < info.routes.length) {
761
756
  const next = info.routes[j];
762
757
  if (next[0].toString() === route[0].toString()) {
763
- // if it's a page route
764
- if (next.length !== 1) {
765
- next[1].forEach((loader) => loader());
766
- }
758
+ next[1].forEach((loader) => loader());
767
759
  j += 1;
768
760
  } else {
769
761
  break;
@@ -1141,7 +1133,7 @@ class Renderer {
1141
1133
  }
1142
1134
  }
1143
1135
 
1144
- // @ts-expect-error - value will be replaced on build step
1136
+ // @ts-expect-error - doesn't exist yet. generated by Rollup
1145
1137
 
1146
1138
  /**
1147
1139
  * @param {{
@@ -171,8 +171,6 @@ function generate_client_manifest(manifest_data, base) {
171
171
  if (params) tuple.push(params);
172
172
 
173
173
  return `// ${route.a[route.a.length - 1]}\n\t\t[${tuple.join(', ')}]`;
174
- } else {
175
- return `// ${route.file}\n\t\t[${route.pattern}]`;
176
174
  }
177
175
  })
178
176
  .join(',\n\n\t\t')}
package/dist/cli.js CHANGED
@@ -817,7 +817,7 @@ async function launch(port, https) {
817
817
  exec(`${cmd} ${https ? 'https' : 'http'}://localhost:${port}`);
818
818
  }
819
819
 
820
- const prog = sade('svelte-kit').version('1.0.0-next.188');
820
+ const prog = sade('svelte-kit').version('1.0.0-next.189');
821
821
 
822
822
  prog
823
823
  .command('dev')
@@ -969,7 +969,7 @@ async function check_port(port) {
969
969
  function welcome({ port, host, https, open }) {
970
970
  if (open) launch(port, https);
971
971
 
972
- console.log($.bold().cyan(`\n SvelteKit v${'1.0.0-next.188'}\n`));
972
+ console.log($.bold().cyan(`\n SvelteKit v${'1.0.0-next.189'}\n`));
973
973
 
974
974
  const protocol = https ? 'https:' : 'http:';
975
975
  const exposed = typeof host !== 'undefined' && host !== 'localhost' && host !== '127.0.0.1';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltejs/kit",
3
- "version": "1.0.0-next.188",
3
+ "version": "1.0.0-next.189",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/sveltejs/kit",
@@ -103,11 +103,7 @@ export interface SSREndpoint {
103
103
 
104
104
  export type SSRRoute = SSREndpoint | SSRPage;
105
105
 
106
- export type CSRPage = [RegExp, CSRComponentLoader[], CSRComponentLoader[], GetParams?];
107
-
108
- export type CSREndpoint = [RegExp];
109
-
110
- export type CSRRoute = CSREndpoint | CSRPage;
106
+ export type CSRRoute = [RegExp, CSRComponentLoader[], CSRComponentLoader[], GetParams?];
111
107
 
112
108
  export interface SSRManifest {
113
109
  assets: Asset[];