@sveltejs/kit 1.0.0-next.361 → 1.0.0-next.364

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.
@@ -1418,9 +1418,11 @@ async function render_response({
1418
1418
  });
1419
1419
  `;
1420
1420
 
1421
+ // we use an anonymous function instead of an arrow function to support
1422
+ // older browsers (https://github.com/sveltejs/kit/pull/5417)
1421
1423
  const init_service_worker = `
1422
1424
  if ('serviceWorker' in navigator) {
1423
- addEventListener('load', () => {
1425
+ addEventListener('load', function () {
1424
1426
  navigator.serviceWorker.register('${options.service_worker}');
1425
1427
  });
1426
1428
  }
package/dist/cli.js CHANGED
@@ -18,7 +18,7 @@ function handle_error(e) {
18
18
  process.exit(1);
19
19
  }
20
20
 
21
- const prog = sade('svelte-kit').version('1.0.0-next.361');
21
+ const prog = sade('svelte-kit').version('1.0.0-next.364');
22
22
 
23
23
  prog
24
24
  .command('package')
@@ -3495,7 +3495,7 @@ class RedirectHandler$2 {
3495
3495
  return this.handler.onHeaders(statusCode, headers, resume, statusText)
3496
3496
  }
3497
3497
 
3498
- const { origin, pathname, search } = util$b.parseURL(new URL(this.location, this.opts.origin));
3498
+ const { origin, pathname, search } = util$b.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)));
3499
3499
  const path = search ? `${pathname}${search}` : pathname;
3500
3500
 
3501
3501
  // Remove headers referring to the original URL.
@@ -9510,8 +9510,7 @@ function requireRequest () {
9510
9510
  webidl.converters.RequestInit = webidl.dictionaryConverter([
9511
9511
  {
9512
9512
  key: 'method',
9513
- converter: webidl.converters.ByteString,
9514
- defaultValue: 'GET'
9513
+ converter: webidl.converters.ByteString
9515
9514
  },
9516
9515
  {
9517
9516
  key: 'headers',
@@ -10261,7 +10260,7 @@ function requireFetch () {
10261
10260
  }
10262
10261
 
10263
10262
  // https://fetch.spec.whatwg.org/#fetch-method
10264
- async function fetch (input, init = undefined) {
10263
+ async function fetch (input, init = {}) {
10265
10264
  if (arguments.length < 1) {
10266
10265
  throw new TypeError(
10267
10266
  `Failed to execute 'fetch' on 'Window': 1 argument required, but only ${arguments.length} present.`
package/dist/vite.js CHANGED
@@ -2912,10 +2912,6 @@ function kit() {
2912
2912
  input: `${get_runtime_path(svelte_config.kit)}/client/start.js`
2913
2913
  }
2914
2914
  },
2915
- preview: {
2916
- port: config.preview?.port ?? 3000,
2917
- strictPort: config.preview?.strictPort ?? true
2918
- },
2919
2915
  resolve: {
2920
2916
  alias: get_aliases(svelte_config.kit)
2921
2917
  },
@@ -2933,8 +2929,6 @@ function kit() {
2933
2929
  ])
2934
2930
  ]
2935
2931
  },
2936
- port: config.server?.port ?? 3000,
2937
- strictPort: config.server?.strictPort ?? true,
2938
2932
  watch: {
2939
2933
  ignored: [
2940
2934
  // Ignore all siblings of config.kit.outDir/generated
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltejs/kit",
3
- "version": "1.0.0-next.361",
3
+ "version": "1.0.0-next.364",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/sveltejs/kit",
@@ -43,8 +43,8 @@
43
43
  "svelte-preprocess": "^4.10.6",
44
44
  "svelte2tsx": "~0.5.10",
45
45
  "tiny-glob": "^0.2.9",
46
- "typescript": "^4.7.2",
47
- "undici": "^5.6.0",
46
+ "typescript": "^4.7.4",
47
+ "undici": "^5.6.1",
48
48
  "uvu": "^0.5.3",
49
49
  "vite": "^2.9.13"
50
50
  },