@sveltejs/kit 1.0.0-next.309 → 1.0.0-next.311

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/README.md CHANGED
@@ -5,7 +5,7 @@ This is the [SvelteKit](https://kit.svelte.dev) framework and CLI.
5
5
  The quickest way to get started is via the [create-svelte](https://github.com/sveltejs/kit/tree/master/packages/create-svelte) package:
6
6
 
7
7
  ```bash
8
- npm init svelte@next my-app
8
+ npm init svelte my-app
9
9
  cd my-app
10
10
  npm install
11
11
  npm run dev
@@ -1433,7 +1433,11 @@ function create_client({ target, session, base, trailing_slash }) {
1433
1433
  // 2. 'rel' attribute includes external
1434
1434
  const rel = (a.getAttribute('rel') || '').split(/\s+/);
1435
1435
 
1436
- if (a.hasAttribute('download') || rel.includes('external')) {
1436
+ if (
1437
+ a.hasAttribute('download') ||
1438
+ rel.includes('external') ||
1439
+ a.hasAttribute('sveltekit:reload')
1440
+ ) {
1437
1441
  return;
1438
1442
  }
1439
1443
 
@@ -1725,11 +1725,18 @@ async function load_node({
1725
1725
  throw new Error('Request body must be a string');
1726
1726
  }
1727
1727
 
1728
- response = await respond(new Request(new URL(requested, event.url).href, opts), options, {
1729
- getClientAddress: state.getClientAddress,
1730
- initiator: route,
1731
- prerender: state.prerender
1732
- });
1728
+ response = await respond(
1729
+ // we set `credentials` to `undefined` to workaround a bug in Cloudflare
1730
+ // (https://github.com/sveltejs/kit/issues/3728) — which is fine, because
1731
+ // we only need the headers
1732
+ new Request(new URL(requested, event.url).href, { ...opts, credentials: undefined }),
1733
+ options,
1734
+ {
1735
+ getClientAddress: state.getClientAddress,
1736
+ initiator: route,
1737
+ prerender: state.prerender
1738
+ }
1739
+ );
1733
1740
 
1734
1741
  if (state.prerender) {
1735
1742
  dependency = { response, body: null };
@@ -778,6 +778,7 @@ function crawl(html) {
778
778
  }
779
779
 
780
780
  let href = '';
781
+ let rel = '';
781
782
 
782
783
  while (i < html.length) {
783
784
  const start = i;
@@ -839,6 +840,8 @@ function crawl(html) {
839
840
 
840
841
  if (name === 'href') {
841
842
  href = value;
843
+ } else if (name === 'rel') {
844
+ rel = value;
842
845
  } else if (name === 'src') {
843
846
  hrefs.push(value);
844
847
  } else if (name === 'srcset') {
@@ -869,7 +872,7 @@ function crawl(html) {
869
872
  i += 1;
870
873
  }
871
874
 
872
- if (href) {
875
+ if (href && !/\bexternal\b/i.test(rel)) {
873
876
  hrefs.push(href);
874
877
  }
875
878
  }
package/dist/cli.js CHANGED
@@ -870,7 +870,7 @@ async function launch(port, https, base) {
870
870
  exec(`${cmd} ${https ? 'https' : 'http'}://localhost:${port}${base}`);
871
871
  }
872
872
 
873
- const prog = sade('svelte-kit').version('1.0.0-next.309');
873
+ const prog = sade('svelte-kit').version('1.0.0-next.311');
874
874
 
875
875
  prog
876
876
  .command('dev')
@@ -1049,7 +1049,7 @@ async function check_port(port) {
1049
1049
  function welcome({ port, host, https, open, base, loose, allow, cwd }) {
1050
1050
  if (open) launch(port, https, base);
1051
1051
 
1052
- console.log($.bold().cyan(`\n SvelteKit v${'1.0.0-next.309'}\n`));
1052
+ console.log($.bold().cyan(`\n SvelteKit v${'1.0.0-next.311'}\n`));
1053
1053
 
1054
1054
  const protocol = https ? 'https:' : 'http:';
1055
1055
  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.309",
3
+ "version": "1.0.0-next.311",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/sveltejs/kit",
@@ -38,7 +38,7 @@
38
38
  "selfsigned": "^2.0.0",
39
39
  "sirv": "^2.0.0",
40
40
  "svelte": "^3.44.2",
41
- "svelte-check": "^2.2.10",
41
+ "svelte-check": "^2.5.0",
42
42
  "svelte-preprocess": "^4.9.8",
43
43
  "svelte2tsx": "~0.5.0",
44
44
  "tiny-glob": "^0.2.9",