@sveltejs/kit 1.0.0-next.168 → 1.0.0-next.171

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/dist/cli.js CHANGED
@@ -822,7 +822,7 @@ async function launch(port, https) {
822
822
  exec(`${cmd} ${https ? 'https' : 'http'}://localhost:${port}`);
823
823
  }
824
824
 
825
- const prog = sade('svelte-kit').version('1.0.0-next.168');
825
+ const prog = sade('svelte-kit').version('1.0.0-next.171');
826
826
 
827
827
  prog
828
828
  .command('dev')
@@ -865,7 +865,7 @@ prog
865
865
  const config = await get_config();
866
866
 
867
867
  try {
868
- const { build } = await import('./chunks/index4.js');
868
+ const { build } = await import('./chunks/index3.js');
869
869
  const build_data = await build(config);
870
870
 
871
871
  console.log(
@@ -873,7 +873,7 @@ prog
873
873
  );
874
874
 
875
875
  if (config.kit.adapter) {
876
- const { adapt } = await import('./chunks/index5.js');
876
+ const { adapt } = await import('./chunks/index4.js');
877
877
  await adapt(config, build_data, { verbose });
878
878
 
879
879
  // this is necessary to close any open db connections, etc
@@ -904,7 +904,7 @@ prog
904
904
  process.env.NODE_ENV = process.env.NODE_ENV || 'production';
905
905
  const config = await get_config();
906
906
 
907
- const { preview } = await import('./chunks/index6.js');
907
+ const { preview } = await import('./chunks/index5.js');
908
908
 
909
909
  try {
910
910
  await preview({ port, host, config, https });
@@ -922,7 +922,7 @@ prog
922
922
  .action(async () => {
923
923
  const config = await get_config();
924
924
 
925
- const { make_package } = await import('./chunks/index7.js');
925
+ const { make_package } = await import('./chunks/index6.js');
926
926
 
927
927
  try {
928
928
  await make_package(config);
@@ -965,7 +965,7 @@ async function check_port(port) {
965
965
  function welcome({ port, host, https, open }) {
966
966
  if (open) launch(port, https);
967
967
 
968
- console.log($.bold().cyan(`\n SvelteKit v${'1.0.0-next.168'}\n`));
968
+ console.log($.bold().cyan(`\n SvelteKit v${'1.0.0-next.171'}\n`));
969
969
 
970
970
  const protocol = https ? 'https:' : 'http:';
971
971
  const exposed = host !== 'localhost' && host !== '127.0.0.1';
package/dist/ssr.js CHANGED
@@ -1084,37 +1084,41 @@ async function respond_with_error({ request, options, state, $session, status, e
1084
1084
  };
1085
1085
 
1086
1086
  // error pages don't fall through, so we know it's not undefined
1087
- const loaded = /** @type {Loaded} */ (await load_node({
1088
- request,
1089
- options,
1090
- state,
1091
- route: null,
1092
- page,
1093
- node: default_layout,
1094
- $session,
1095
- context: {},
1096
- prerender_enabled: is_prerender_enabled(options, default_error, state),
1097
- is_leaf: false,
1098
- is_error: false
1099
- }));
1100
-
1101
- const branch = [
1102
- loaded,
1103
- /** @type {Loaded} */ (await load_node({
1087
+ const loaded = /** @type {Loaded} */ (
1088
+ await load_node({
1104
1089
  request,
1105
1090
  options,
1106
1091
  state,
1107
1092
  route: null,
1108
1093
  page,
1109
- node: default_error,
1094
+ node: default_layout,
1110
1095
  $session,
1111
- context: loaded ? loaded.context : {},
1096
+ context: {},
1112
1097
  prerender_enabled: is_prerender_enabled(options, default_error, state),
1113
1098
  is_leaf: false,
1114
- is_error: true,
1115
- status,
1116
- error
1117
- }))
1099
+ is_error: false
1100
+ })
1101
+ );
1102
+
1103
+ const branch = [
1104
+ loaded,
1105
+ /** @type {Loaded} */ (
1106
+ await load_node({
1107
+ request,
1108
+ options,
1109
+ state,
1110
+ route: null,
1111
+ page,
1112
+ node: default_error,
1113
+ $session,
1114
+ context: loaded ? loaded.context : {},
1115
+ prerender_enabled: is_prerender_enabled(options, default_error, state),
1116
+ is_leaf: false,
1117
+ is_error: true,
1118
+ status,
1119
+ error
1120
+ })
1121
+ )
1118
1122
  ];
1119
1123
 
1120
1124
  try {
@@ -1290,16 +1294,18 @@ async function respond$1(opts) {
1290
1294
 
1291
1295
  try {
1292
1296
  // there's no fallthough on an error page, so we know it's not undefined
1293
- const error_loaded = /** @type {import('./types').Loaded} */ (await load_node({
1294
- ...opts,
1295
- node: error_node,
1296
- context: node_loaded.context,
1297
- prerender_enabled: is_prerender_enabled(options, error_node, state),
1298
- is_leaf: false,
1299
- is_error: true,
1300
- status,
1301
- error
1302
- }));
1297
+ const error_loaded = /** @type {import('./types').Loaded} */ (
1298
+ await load_node({
1299
+ ...opts,
1300
+ node: error_node,
1301
+ context: node_loaded.context,
1302
+ prerender_enabled: is_prerender_enabled(options, error_node, state),
1303
+ is_leaf: false,
1304
+ is_error: true,
1305
+ status,
1306
+ error
1307
+ })
1308
+ );
1303
1309
 
1304
1310
  if (error_loaded.loaded.error) {
1305
1311
  continue;
@@ -1679,8 +1685,9 @@ async function respond(incoming, options, state = {}) {
1679
1685
  });
1680
1686
  }
1681
1687
 
1688
+ const decoded = decodeURI(request.path);
1682
1689
  for (const route of options.manifest.routes) {
1683
- const match = route.pattern.exec(request.path);
1690
+ const match = route.pattern.exec(decoded);
1684
1691
  if (!match) continue;
1685
1692
 
1686
1693
  const response =
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltejs/kit",
3
- "version": "1.0.0-next.168",
3
+ "version": "1.0.0-next.171",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/sveltejs/kit",
@@ -10,39 +10,39 @@
10
10
  "type": "module",
11
11
  "dependencies": {
12
12
  "@sveltejs/vite-plugin-svelte": "^1.0.0-next.24",
13
- "cheap-watch": "^1.0.3",
13
+ "cheap-watch": "^1.0.4",
14
14
  "sade": "^1.7.4",
15
15
  "vite": "^2.5.7"
16
16
  },
17
17
  "devDependencies": {
18
- "@rollup/plugin-replace": "^2.4.2",
18
+ "@rollup/plugin-replace": "^3.0.0",
19
19
  "@types/amphtml-validator": "^1.0.1",
20
- "@types/cookie": "^0.4.0",
21
- "@types/marked": "^2.0.2",
20
+ "@types/cookie": "^0.4.1",
21
+ "@types/marked": "^3.0.1",
22
22
  "@types/micromatch": "^4.0.2",
23
23
  "@types/mime": "^2.0.3",
24
- "@types/node": "^14.14.43",
25
- "@types/rimraf": "^3.0.0",
26
- "@types/sade": "^1.7.2",
27
- "amphtml-validator": "^1.0.34",
24
+ "@types/node": "^16.9.1",
25
+ "@types/rimraf": "^3.0.2",
26
+ "@types/sade": "^1.7.3",
27
+ "amphtml-validator": "^1.0.35",
28
28
  "cookie": "^0.4.1",
29
29
  "devalue": "^2.0.1",
30
- "eslint": "^7.25.0",
30
+ "eslint": "^7.32.0",
31
31
  "kleur": "^4.1.4",
32
32
  "locate-character": "^2.0.5",
33
- "marked": "^2.0.3",
33
+ "marked": "^3.0.4",
34
34
  "micromatch": "^4.0.4",
35
35
  "mime": "^2.5.2",
36
- "node-fetch": "^3.0.0-beta.9",
36
+ "node-fetch": "3.0.0-beta.9",
37
37
  "port-authority": "^1.1.2",
38
38
  "rimraf": "^3.0.2",
39
- "rollup": "^2.55.0",
39
+ "rollup": "^2.56.3",
40
40
  "selfsigned": "^1.10.11",
41
- "sirv": "^1.0.12",
42
- "svelte": "^3.42.4",
41
+ "sirv": "^1.0.17",
42
+ "svelte": "^3.42.6",
43
43
  "svelte-check": "^2.2.6",
44
- "svelte2tsx": "~0.4.1",
45
- "tiny-glob": "^0.2.8",
44
+ "svelte2tsx": "~0.4.6",
45
+ "tiny-glob": "^0.2.9",
46
46
  "uvu": "^0.5.1"
47
47
  },
48
48
  "peerDependencies": {
@@ -28,9 +28,7 @@ export interface SSRComponent {
28
28
  preload?: any; // TODO remove for 1.0
29
29
  load: Load;
30
30
  default: {
31
- render(
32
- props: Record<string, any>
33
- ): {
31
+ render(props: Record<string, any>): {
34
32
  html: string;
35
33
  head: string;
36
34
  css: {
@@ -1,8 +0,0 @@
1
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
2
-
3
- function createCommonjsModule(fn) {
4
- var module = { exports: {} };
5
- return fn(module, module.exports), module.exports;
6
- }
7
-
8
- export { commonjsGlobal as a, createCommonjsModule as c };