@sveltejs/kit 1.27.6 → 1.27.7

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.27.6",
3
+ "version": "1.27.7",
4
4
  "description": "The fastest way to build Svelte apps",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,8 +33,8 @@
33
33
  "@types/set-cookie-parser": "^2.4.2",
34
34
  "dts-buddy": "^0.2.4",
35
35
  "rollup": "^3.29.4",
36
- "svelte": "^4.2.2",
37
- "svelte-preprocess": "^5.0.4",
36
+ "svelte": "^4.2.7",
37
+ "svelte-preprocess": "^5.1.1",
38
38
  "typescript": "^4.9.4",
39
39
  "vite": "^4.4.9",
40
40
  "vitest": "^0.34.5"
@@ -39,6 +39,7 @@ export function write_root(manifest_data, output) {
39
39
  `${output}/root.svelte`,
40
40
  dedent`
41
41
  <!-- This file is generated by @sveltejs/kit — do not edit it! -->
42
+ ${isSvelte5Plus() ? '<svelte:options runes={true} />' : ''}
42
43
  <script>
43
44
  import { setContext, ${isSvelte5Plus() ? '' : 'afterUpdate, '}onMount, tick } from 'svelte';
44
45
  import { browser } from '$app/environment';
@@ -102,7 +102,7 @@ export async function preview(vite, vite_config, svelte_config) {
102
102
  return;
103
103
  }
104
104
 
105
- const { pathname } = new URL(/** @type {string} */ (req.url), 'http://dummy');
105
+ const { pathname, search } = new URL(/** @type {string} */ (req.url), 'http://dummy');
106
106
 
107
107
  let filename = normalizePath(
108
108
  join(svelte_config.kit.outDir, 'output/prerendered/pages' + pathname)
@@ -113,6 +113,7 @@ export async function preview(vite, vite_config, svelte_config) {
113
113
  const has_trailing_slash = pathname.endsWith('/');
114
114
  const html_filename = `${filename}${has_trailing_slash ? 'index.html' : '.html'}`;
115
115
 
116
+ /** @type {string | undefined} */
116
117
  let redirect;
117
118
 
118
119
  if (is_file(html_filename)) {
@@ -127,6 +128,7 @@ export async function preview(vite, vite_config, svelte_config) {
127
128
  }
128
129
 
129
130
  if (redirect) {
131
+ if (search) redirect += search;
130
132
  res.writeHead(307, {
131
133
  location: redirect
132
134
  });
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // generated during release, do not modify
2
2
 
3
3
  /** @type {string} */
4
- export const VERSION = '1.27.6';
4
+ export const VERSION = '1.27.7';