@sveltejs/kit 1.5.6 → 1.5.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.5.6",
3
+ "version": "1.5.7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/sveltejs/kit",
@@ -80,7 +80,7 @@
80
80
  "node": "^16.14 || >=18"
81
81
  },
82
82
  "scripts": {
83
- "lint": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore && eslint src/**",
83
+ "lint": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore && eslint src/**/*.js",
84
84
  "check": "tsc",
85
85
  "check:all": "tsc && pnpm -r --filter=\"./**\" check",
86
86
  "format": "prettier --write . --config ../../.prettierrc --ignore-path .gitignore",
@@ -320,7 +320,7 @@ function kit({ svelte_config }) {
320
320
 
321
321
  async resolveId(id) {
322
322
  // treat $env/static/[public|private] as virtual
323
- if (id.startsWith('$env/') || id === '$internal/paths' || id === '$service-worker') {
323
+ if (id.startsWith('$env/') || id === '@sveltejs/kit/paths' || id === '$service-worker') {
324
324
  return `\0${id}`;
325
325
  }
326
326
  },
@@ -358,7 +358,9 @@ function kit({ svelte_config }) {
358
358
  );
359
359
  case '\0$service-worker':
360
360
  return create_service_worker_module(svelte_config);
361
- case '\0$internal/paths':
361
+ // for internal use only. it's published as $app/paths externally
362
+ // we use this alias so that we won't collide with user aliases
363
+ case '\0@sveltejs/kit/paths':
362
364
  const { assets, base } = svelte_config.kit.paths;
363
365
  return `export const base = ${s(base)};
364
366
  export let assets = ${assets ? s(assets) : 'base'};
@@ -0,0 +1,6 @@
1
+ /** Internal version of $app/paths */
2
+ declare module '@sveltejs/kit/paths' {
3
+ export const base: `/${string}`;
4
+ export let assets: `https://${string}` | `http://${string}`;
5
+ export function set_assets(path: string): void;
6
+ }
@@ -1 +1 @@
1
- export { base, assets } from '$internal/paths';
1
+ export { base, assets } from '@sveltejs/kit/paths';
@@ -27,7 +27,7 @@ import { parse } from './parse.js';
27
27
 
28
28
  import Root from '__GENERATED__/root.svelte';
29
29
  import { nodes, server_loads, dictionary, matchers, hooks } from '__CLIENT__/manifest.js';
30
- import { base } from '$internal/paths';
30
+ import { base } from '@sveltejs/kit/paths';
31
31
  import { HttpError, Redirect } from '../control.js';
32
32
  import { stores } from './singletons.js';
33
33
  import { unwrap_promises } from '../../utils/promises.js';
@@ -1,6 +1,6 @@
1
1
  import { BROWSER, DEV } from 'esm-env';
2
2
  import { writable } from 'svelte/store';
3
- import { assets } from '$internal/paths';
3
+ import { assets } from '@sveltejs/kit/paths';
4
4
  import { version } from '../shared.js';
5
5
  import { PRELOAD_PRIORITIES } from './constants.js';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import * as set_cookie_parser from 'set-cookie-parser';
2
2
  import { respond } from './respond.js';
3
- import * as paths from '$internal/paths';
3
+ import * as paths from '@sveltejs/kit/paths';
4
4
 
5
5
  /**
6
6
  * @param {{
@@ -1,7 +1,7 @@
1
1
  import * as devalue from 'devalue';
2
2
  import { readable, writable } from 'svelte/store';
3
3
  import { DEV } from 'esm-env';
4
- import { assets, base } from '$internal/paths';
4
+ import { assets, base } from '@sveltejs/kit/paths';
5
5
  import { hash } from '../../hash.js';
6
6
  import { serialize_data } from './serialize_data.js';
7
7
  import { s } from '../../../utils/misc.js';
@@ -1,5 +1,5 @@
1
1
  import { DEV } from 'esm-env';
2
- import { base } from '$internal/paths';
2
+ import { base } from '@sveltejs/kit/paths';
3
3
  import { is_endpoint_request, render_endpoint } from './endpoint.js';
4
4
  import { render_page } from './page/index.js';
5
5
  import { render_response } from './page/render.js';
@@ -1,4 +1,4 @@
1
- export { set_assets } from '$internal/paths';
1
+ export { set_assets } from '@sveltejs/kit/paths';
2
2
 
3
3
  export let building = false;
4
4
  export let version = '';
@@ -438,10 +438,3 @@ declare module '@sveltejs/kit/vite' {
438
438
  export function sveltekit(): Promise<Plugin[]>;
439
439
  export { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
440
440
  }
441
-
442
- /** Internal version of $app/paths */
443
- declare module '$internal/paths' {
444
- export const base: `/${string}`;
445
- export let assets: `https://${string}` | `http://${string}`;
446
- export function set_assets(path: string): void;
447
- }