@sveltejs/kit
Advanced tools
Comparing version 2.5.15 to 2.5.16
{ | ||
"name": "@sveltejs/kit", | ||
"version": "2.5.15", | ||
"version": "2.5.16", | ||
"description": "The fastest way to build Svelte apps", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
import { load_config } from './src/core/config/index.js'; | ||
import * as sync from './src/core/sync/sync.js'; | ||
import glob from 'tiny-glob/sync.js'; | ||
@@ -41,2 +40,5 @@ import fs from 'node:fs'; | ||
// defer import until after the chdir so that peer dependency resolves correctly | ||
const sync = await import('./src/core/sync/sync.js'); | ||
try { | ||
@@ -43,0 +45,0 @@ const config = await load_config(); |
import fs from 'node:fs'; | ||
import path from 'node:path'; | ||
import { VERSION } from 'svelte/compiler'; | ||
import { mkdirp } from '../../utils/filesystem.js'; | ||
import { resolve_peer_dependency } from '../../utils/import.js'; | ||
/** @type {string} */ | ||
let VERSION; | ||
try { | ||
({ VERSION } = await resolve_peer_dependency('svelte/compiler')); | ||
} catch { | ||
// we can end up here from e.g. unit tests. this is the simplest fix | ||
({ VERSION } = await import('svelte/compiler')); | ||
} | ||
/** @type {Map<string, string>} */ | ||
@@ -7,0 +17,0 @@ const previous_contents = new Map(); |
import fs from 'node:fs'; | ||
import path from 'node:path'; | ||
import * as imr from 'import-meta-resolve'; | ||
import colors from 'kleur'; | ||
@@ -37,3 +36,3 @@ | ||
} from './module_ids.js'; | ||
import { pathToFileURL } from 'node:url'; | ||
import { resolve_peer_dependency } from '../../utils/import.js'; | ||
@@ -128,19 +127,2 @@ const cwd = process.cwd(); | ||
/** | ||
* Resolve a dependency relative to the current working directory, | ||
* rather than relative to this package | ||
* @param {string} dependency | ||
*/ | ||
async function resolve_peer_dependency(dependency) { | ||
try { | ||
// @ts-expect-error the types are wrong | ||
const resolved = imr.resolve(dependency, pathToFileURL(process.cwd() + '/dummy.js')); | ||
return import(resolved); | ||
} catch { | ||
throw new Error( | ||
`Could not resolve peer dependency "${dependency}" relative to your project — please install it and try again.` | ||
); | ||
} | ||
} | ||
/** | ||
* Returns the SvelteKit Vite plugins. | ||
@@ -147,0 +129,0 @@ * @returns {Promise<import('vite').Plugin[]>} |
// generated during release, do not modify | ||
/** @type {string} */ | ||
export const VERSION = '2.5.15'; | ||
export const VERSION = '2.5.16'; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
732391
129
21329