diff --git a/packages/package/package.json b/packages/package/package.json index 4d534d715aa9..7161db48a851 100644 --- a/packages/package/package.json +++ b/packages/package/package.json @@ -24,7 +24,7 @@ "kleur": "^4.1.5", "sade": "^1.8.1", "semver": "^7.5.4", - "svelte2tsx": "~0.7.33" + "svelte2tsx": "~0.7.51" }, "devDependencies": { "@sveltejs/vite-plugin-svelte": "catalog:", diff --git a/packages/package/src/cli.js b/packages/package/src/cli.js index ca28b1ee1464..ae9ba83f5087 100644 --- a/packages/package/src/cli.js +++ b/packages/package/src/cli.js @@ -30,6 +30,8 @@ prog '--tsconfig', 'A path to a tsconfig or jsconfig file. When not provided, searches for the next upper tsconfig/jsconfig in the workspace path.' ) + .option('--incremental', 'Use incremental type generation for faster rebuilds', false) + .option('--tsgo', 'Use TypeScript Go compiler for type generation', false) .action(async (args) => { try { const config = await load_config(); @@ -51,6 +53,8 @@ prog preserve_output: args['preserve-output'], tsconfig: args.tsconfig, types: args.types, + incremental: args.incremental, + tsgo: args.tsgo, config }; diff --git a/packages/package/src/emit-dts-incremental.js b/packages/package/src/emit-dts-incremental.js new file mode 100644 index 000000000000..061d060b60a0 --- /dev/null +++ b/packages/package/src/emit-dts-incremental.js @@ -0,0 +1,522 @@ +import * as fs from 'node:fs'; +import * as path from 'node:path'; +import process from 'node:process'; +import { execFile } from 'node:child_process'; +import { createRequire } from 'node:module'; +import { posixify, mkdirp, walk } from './filesystem.js'; +import { resolve_aliases, write } from './utils.js'; +import { resolve_svelte_shims } from './typescript.js'; + +const CACHE_DIR_NAME = '__package_types_cache__'; +const SVELTE_SUBDIR = 'svelte'; +const DECLARATIONS_SUBDIR = 'declarations'; +const MANIFEST_VERSION = 1; + +/** + * Incremental declaration emit — drop-in replacement for `emit_dts()`. + * Pre-transpiles `.svelte` files via `svelte2tsx()`, writes an overlay tsconfig, + * then spawns `tsc` or `tsgo` as a child process to produce `.d.ts` files. + * + * @param {string} input Absolute path to lib source dir + * @param {string} output Temp staging dir (`__package__`) + * @param {string} final_output Absolute path to final output dir + * @param {string} cwd Project root + * @param {Record} alias Alias map (e.g. { $lib: '/abs/src/lib' }) + * @param {import('./types.js').File[]} files Scanned source files + * @param {string | undefined} tsconfig Path to user's tsconfig/jsconfig + * @param {{ incremental?: boolean, tsgo?: boolean }} options + */ +export async function emit_dts_incremental( + input, + output, + final_output, + cwd, + alias, + files, + tsconfig, + options +) { + const out_dir = path.resolve(cwd, '.svelte-kit', CACHE_DIR_NAME); + const svelte_dir = path.join(out_dir, SVELTE_SUBDIR); + const declarations_dir = path.join(out_dir, DECLARATIONS_SUBDIR); + + mkdirp(svelte_dir); + mkdirp(declarations_dir); + + const emit_result = await emit_svelte_files(input, out_dir, svelte_dir, files, cwd); + const overlay_path = await write_overlay_tsconfig( + out_dir, + svelte_dir, + declarations_dir, + input, + cwd, + tsconfig, + emit_result, + options + ); + await run_tsc(overlay_path, declarations_dir, cwd, options); + collect_declarations( + declarations_dir, + svelte_dir, + input, + output, + final_output, + alias, + files, + cwd + ); +} + +// --------------------------------------------------------------------------- +// 1. Pre-transpile .svelte files +// --------------------------------------------------------------------------- + +/** + * @typedef {{ + * mtimeMs: number, + * size: number, + * isTsFile: boolean, + * outPath: string, + * dtsPath: string + * }} ManifestEntry + */ + +/** + * @typedef {{ + * version: number, + * entries: Record + * }} Manifest + */ + +/** + * Pre-transpile `.svelte` files to `.ts` via `svelte2tsx()`. + * Unchanged files (by mtime+size) are skipped using a manifest. + * + * @param {string} input + * @param {string} cache_dir + * @param {string} svelte_dir + * @param {import('./types.js').File[]} files + * @param {string} cwd + * @returns {Promise<{ shim_files: string[], svelte_files: string[] }>} + */ +async function emit_svelte_files(input, cache_dir, svelte_dir, files, cwd) { + const { svelte2tsx } = await import('svelte2tsx'); + const { parse, VERSION } = await import('svelte/compiler'); + + const manifest_path = path.join(cache_dir, 'manifest.json'); + const manifest = load_manifest(manifest_path); + + const shims_path = resolve_svelte_shims(cwd); + + const svelte_files = files.filter((f) => f.is_svelte); + const emitted = []; + + for (const file of svelte_files) { + const source_path = path.join(input, file.name); + const stat = fs.statSync(source_path); + const existing = manifest.entries[file.name]; + + // Check manifest for cache hit before computing derived paths + if (existing && existing.mtimeMs === stat.mtimeMs && existing.size === stat.size) { + emitted.push(file.name); + continue; + } + + // Derive output filenames: ++ComponentName.svelte.ts and ComponentName.svelte.d.ts + const base_name = path.basename(file.name); + const dir_name = path.dirname(file.name); + const tsx_name = `++${base_name}.ts`; + const dts_name = `${base_name}.d.ts`; + + const out_path = path.join(svelte_dir, dir_name, tsx_name); + const dts_path = path.join(svelte_dir, dir_name, dts_name); + + const source = fs.readFileSync(source_path, 'utf8'); + const is_ts_file = /\blang\s*=\s*["']ts["']/.test(source); + + try { + const result = svelte2tsx(source, { + parse, + version: VERSION, + filename: source_path, + isTsFile: is_ts_file, + mode: 'dts', + emitOnTemplateError: false, + emitJsDoc: true, + rewriteExternalImports: { + workspacePath: cwd, + generatedPath: out_path + } + }); + + write(out_path, result.code); + + // Write a thin .svelte.d.ts stub that re-exports from the ++ file. + // This allows TS to resolve `.svelte` imports via the stub. + const relative_tsx = `./${tsx_name}`; + const stub = `export { default } from '${relative_tsx}';\nexport * from '${relative_tsx}';\n`; + write(dts_path, stub); + + manifest.entries[file.name] = { + mtimeMs: stat.mtimeMs, + size: stat.size, + isTsFile: is_ts_file, + outPath: posixify(path.relative(cwd, out_path)), + dtsPath: posixify(path.relative(cwd, dts_path)) + }; + + emitted.push(file.name); + } catch (e) { + console.error(`Error transpiling ${file.name}: ${/** @type {Error} */ (e).message}`); + } + } + + // Remove manifest entries for files that no longer exist + for (const key of Object.keys(manifest.entries)) { + if (!svelte_files.some((f) => f.name === key)) { + const entry = manifest.entries[key]; + // Clean up generated files — ignore ENOENT if already gone + try { + fs.unlinkSync(path.resolve(cwd, entry.outPath)); + } catch {} + try { + fs.unlinkSync(path.resolve(cwd, entry.dtsPath)); + } catch {} + delete manifest.entries[key]; + } + } + + save_manifest(manifest_path, manifest); + + return { + shim_files: [shims_path], + svelte_files: emitted + }; +} + +/** + * @param {string} manifest_path + * @returns {Manifest} + */ +function load_manifest(manifest_path) { + try { + const data = JSON.parse(fs.readFileSync(manifest_path, 'utf8')); + if (data.version === MANIFEST_VERSION) return data; + } catch { + // ignore + } + return { version: MANIFEST_VERSION, entries: {} }; +} + +/** + * @param {string} manifest_path + * @param {Manifest} manifest + */ +function save_manifest(manifest_path, manifest) { + fs.writeFileSync(manifest_path, JSON.stringify(manifest, null, '\t')); +} + +// --------------------------------------------------------------------------- +// 2. Generate overlay tsconfig +// --------------------------------------------------------------------------- + +/** + * Write an overlay tsconfig that extends the user's tsconfig, adding + * declaration emit settings and rootDirs so TS resolves the virtual .svelte files. + * + * @param {string} cache_dir + * @param {string} svelte_dir + * @param {string} declarations_dir + * @param {string} input + * @param {string} cwd + * @param {string | undefined} tsconfig + * @param {{ shim_files: string[], svelte_files: string[] }} emit_result + * @param {{ incremental?: boolean, tsgo?: boolean }} options + * @returns {Promise} Path to the overlay tsconfig + */ +async function write_overlay_tsconfig( + cache_dir, + svelte_dir, + declarations_dir, + input, + cwd, + tsconfig, + emit_result, + options +) { + const ts = (await import('typescript')).default; + + // Resolve the user's tsconfig + let config_path = tsconfig; + if (!config_path) { + const ts_path = path.join(cwd, 'tsconfig.json'); + const js_path = path.join(cwd, 'jsconfig.json'); + if (fs.existsSync(ts_path)) config_path = ts_path; + else if (fs.existsSync(js_path)) config_path = js_path; + else { + throw new Error( + 'Failed to locate tsconfig or jsconfig. Incremental declaration emit requires one.' + ); + } + } + + // Read the raw config to extract include/exclude/files/compilerOptions + const { error, config: raw_config } = ts.readConfigFile(config_path, ts.sys.readFile); + if (error) { + throw new Error('Malformed tsconfig\n' + JSON.stringify(error, null, 2)); + } + + const raw_compiler = raw_config.compilerOptions ?? {}; + + // Build overlay compiler options + /** @type {Record} */ + const compiler_options = { + declaration: true, + emitDeclarationOnly: true, + declarationDir: path.relative(cache_dir, declarations_dir), + noEmit: false, + skipLibCheck: true, + // Bundler resolution works with ESNext modules and resolves from node_modules — + // needed because the svelte2tsx output imports from 'svelte' and other packages + moduleResolution: 'bundler', + allowArbitraryExtensions: true, + // Ensure rootDirs includes both the original source dir and the svelte emit dir + // so that TS can resolve .svelte imports via the stubs + rootDirs: [path.relative(cache_dir, input), path.relative(cache_dir, svelte_dir)], + // Carry forward declarationMap and paths from the original config + ...(raw_compiler.declarationMap ? { declarationMap: true } : {}), + ...(raw_compiler.paths ? { paths: raw_compiler.paths } : {}) + }; + + if (options.incremental) { + compiler_options.incremental = true; + compiler_options.tsBuildInfoFile = path.relative( + cache_dir, + path.join(cache_dir, 'tsbuildinfo.json') + ); + } + + // Scope include to just the lib source directory and the svelte emit dir + const rel_input = posixify(path.relative(cache_dir, input)); + const rel_svelte = posixify(path.relative(cache_dir, svelte_dir)); + const include = [`${rel_input}/**/*`, `${rel_svelte}/**/*`]; + + // Exclude node_modules and common output directories + const rel_cwd = posixify(path.relative(cache_dir, cwd)); + const exclude = [`${rel_cwd}/node_modules`, `${rel_cwd}/**/dist`, `${rel_cwd}/**/expected`]; + + // Shim files need to be explicitly listed + const file_list = emit_result.shim_files.map((f) => posixify(path.relative(cache_dir, f))); + + const overlay = { + extends: posixify(path.relative(cache_dir, path.resolve(config_path))), + compilerOptions: compiler_options, + include, + exclude, + files: file_list + }; + + const overlay_path = path.join(cache_dir, 'tsconfig.overlay.json'); + fs.writeFileSync(overlay_path, JSON.stringify(overlay, null, '\t')); + + return overlay_path; +} + +// --------------------------------------------------------------------------- +// 3. Spawn tsc / tsgo +// --------------------------------------------------------------------------- + +/** + * Spawn `tsc` or `tsgo` as a child process to emit `.d.ts` files. + * + * @param {string} tsconfig_path Path to the overlay tsconfig + * @param {string} declarations_dir Where declarations are emitted + * @param {string} cwd Project root (for resolving dependencies) + * @param {{ incremental?: boolean, tsgo?: boolean }} options + * @returns {Promise} + */ +async function run_tsc(tsconfig_path, declarations_dir, cwd, options) { + // tsc is our own dependency; tsgo is the target project's optional dependency + const own_require = createRequire(import.meta.url); + const project_require = createRequire(path.join(cwd, 'package.json')); + + /** @type {string} */ + let compiler_bin; + + if (options.tsgo) { + try { + const tsgo_pkg = project_require.resolve('@typescript/native-preview/package.json'); + const tsgo_dir = path.dirname(tsgo_pkg); + // tsgo exposes its binary via package.json "bin" field + const tsgo_json = JSON.parse(fs.readFileSync(tsgo_pkg, 'utf8')); + const bin_entry = tsgo_json.bin?.tsgo; + if (bin_entry) { + compiler_bin = path.resolve(tsgo_dir, bin_entry); + } else { + // Fallback: look for common locations + const candidates = ['bin/tsgo', 'built/local/tsgo.js', 'tsgo.js']; + const found = candidates + .map((c) => path.resolve(tsgo_dir, c)) + .find((c) => fs.existsSync(c)); + if (!found) { + throw new Error('Could not locate tsgo binary'); + } + compiler_bin = found; + } + } catch (/** @type {any} */ e) { + if (e.code === 'MODULE_NOT_FOUND') { + throw new Error( + '--tsgo requires @typescript/native-preview to be installed.\n' + + 'Install it with: npm install -D @typescript/native-preview', + { cause: e } + ); + } + throw new Error('Failed to resolve tsgo compiler', { cause: e }); + } + } else { + compiler_bin = own_require.resolve('typescript/bin/tsc'); + } + + /** @type {string[]} */ + const args = []; + const is_js_bin = compiler_bin.endsWith('.js'); + + if (is_js_bin) { + // Need to spawn via node + args.push(compiler_bin); + } + + args.push('-p', tsconfig_path, '--pretty', 'true', '--noErrorTruncation'); + + const { stdout, stderr, exit_code } = await new Promise((resolve) => { + const bin = is_js_bin ? process.execPath : compiler_bin; + // Don't pipe output — we parse and filter errors below. + // Only user file errors are surfaced; svelte2tsx ++ file errors are expected. + execFile(bin, args, { maxBuffer: 10 * 1024 * 1024 }, (error, stdout, stderr) => { + resolve({ + stdout: stdout || '', + stderr: stderr || '', + exit_code: error ? /** @type {any} */ (error.code ?? 1) : 0 + }); + }); + }); + + if (exit_code !== 0) { + // Parse tsc errors, separating user errors from expected svelte2tsx dts-mode errors. + // The ++ prefixed files are intermediate svelte2tsx output and may have harmless + // errors (missing locals stripped in dts mode). Only fail on user file errors. + const combined = stdout + '\n' + stderr; + const user_errors = combined + .split('\n') + .filter((line) => /error TS\d+/.test(line) && !line.includes('++')); + + if (user_errors.length > 0) { + throw new Error('Type generation failed:\n' + user_errors.join('\n')); + } + // If only svelte2tsx internal errors, declarations were still emitted — continue + } +} + +// --------------------------------------------------------------------------- +// 4. Collect declarations into output +// --------------------------------------------------------------------------- + +/** + * Walk the declarations output, post-process `.d.ts` files (strip `++` prefix, + * resolve aliases, fix sourcemap paths), and write to the staging directory. + * + * tsc emits declarations preserving the full directory structure from the common root. + * Source files land under `declarations/src/lib/...` and svelte files under + * `declarations/.svelte-kit/__package_types_cache__/svelte/...`. We map both + * back to lib-relative paths. + * + * @param {string} declarations_dir + * @param {string} svelte_dir Absolute path to the svelte emit dir + * @param {string} input + * @param {string} output + * @param {string} final_output + * @param {Record} alias + * @param {import('./types.js').File[]} files + * @param {string} cwd + */ +function collect_declarations( + declarations_dir, + svelte_dir, + input, + output, + final_output, + alias, + files, + cwd +) { + if (!fs.existsSync(declarations_dir)) return; + + const handwritten = new Set(); + for (const file of files) { + if (file.name.endsWith('.d.ts')) { + handwritten.add(file.name); + } + } + + // Compute the prefixes that tsc uses in the declarations output. + // tsc rootDir is auto-computed as the common ancestor of all input files. + // The declarations mirror the source structure relative to that root. + const rel_input = posixify(path.relative(cwd, input)); + const rel_svelte = posixify(path.relative(cwd, svelte_dir)); + + for (const file of walk(declarations_dir)) { + const raw = posixify(file); + + // Skip non-declaration files + if (!raw.endsWith('.d.ts') && !raw.endsWith('.d.ts.map')) { + continue; + } + + // Map the tsc output path to the lib-relative path. + // Source files: "src/lib/index.d.ts" → "index.d.ts" + // Svelte files: ".svelte-kit/__package_types_cache__/svelte/++Test.svelte.d.ts" → "Test.svelte.d.ts" + let lib_relative; + if (raw.startsWith(rel_svelte + '/')) { + lib_relative = raw.slice(rel_svelte.length + 1).replace(/\+\+/g, ''); + } else if (raw.startsWith(rel_input + '/')) { + lib_relative = raw.slice(rel_input.length + 1); + } else { + // Unknown path — skip + continue; + } + + // Skip if hand-written .d.ts exists + if (handwritten.has(lib_relative)) { + console.warn(`Using $lib/${lib_relative} instead of generated .d.ts file`); + continue; + } + + let source = fs.readFileSync(path.join(declarations_dir, file), 'utf8'); + + if (lib_relative.endsWith('.d.ts.map')) { + // Fix source paths in sourcemaps — same logic as emit_dts in typescript.js + const parsed = JSON.parse(source); + if (parsed.sources) { + parsed.sources = /** @type {string[]} */ (parsed.sources).map((/** @type {string} */ src) => + posixify( + path.join( + path.relative( + path.dirname(path.join(final_output, lib_relative)), + path.dirname(path.join(input, lib_relative)) + ), + path.basename(src) + ) + ) + ); + source = JSON.stringify(parsed); + } + } else { + // Resolve $lib and other aliases in .d.ts content + source = resolve_aliases(input, lib_relative, source, alias); + // Clean up any remaining references to ++ prefixed files + source = source.replace(/\+\+/g, ''); + } + + write(path.join(output, lib_relative), source); + } +} diff --git a/packages/package/src/index.js b/packages/package/src/index.js index b91aa92a2b93..67412f577836 100644 --- a/packages/package/src/index.js +++ b/packages/package/src/index.js @@ -15,6 +15,28 @@ import { import { emit_dts, load_tsconfig, transpile_ts } from './typescript.js'; import { create_validator } from './validate.js'; +/** + * Emit .d.ts files, choosing incremental or standard path based on options. + * @param {string} input + * @param {string} output + * @param {string} final_output + * @param {import('./types.js').Options} options + * @param {Record} alias + * @param {import('./types.js').File[]} files + * @param {string | undefined} tsconfig + */ +async function emit_types(input, output, final_output, options, alias, files, tsconfig) { + if (options.incremental || options.tsgo) { + const { emit_dts_incremental } = await import('./emit-dts-incremental.js'); + await emit_dts_incremental(input, output, final_output, options.cwd, alias, files, tsconfig, { + incremental: options.incremental, + tsgo: options.tsgo + }); + } else { + await emit_dts(input, output, final_output, options.cwd, alias, files, tsconfig); + } +} + /** * @param {import('./types.js').Options} options */ @@ -41,7 +63,7 @@ async function do_build(options, analyse_code) { const files = scan(input, extensions); if (options.types) { - await emit_dts(input, temp, output, options.cwd, alias, files, tsconfig); + await emit_types(input, temp, output, options, alias, files, tsconfig); } /** @type {Map} */ @@ -172,7 +194,7 @@ export async function watch(options) { if (!errored && options.types) { try { - await emit_dts(input, output, output, options.cwd, alias, files, tsconfig); + await emit_types(input, output, output, options, alias, files, tsconfig); console.log('Updated .d.ts files'); } catch (e) { errored = true; diff --git a/packages/package/src/types.d.ts b/packages/package/src/types.d.ts index f04ae6744d52..c3879c343ef4 100644 --- a/packages/package/src/types.d.ts +++ b/packages/package/src/types.d.ts @@ -6,6 +6,8 @@ export interface Options { output: string; preserve_output: boolean; types: boolean; + incremental?: boolean; + tsgo?: boolean; tsconfig?: string; config: { extensions?: string[]; diff --git a/packages/package/src/typescript.js b/packages/package/src/typescript.js index 1105f935aa98..d2f72dd2cb41 100644 --- a/packages/package/src/typescript.js +++ b/packages/package/src/typescript.js @@ -7,6 +7,27 @@ import { resolve_aliases, write } from './utils.js'; import { emitDts } from 'svelte2tsx'; import { load_pkg_json } from './config.js'; +/** + * Resolve the correct svelte2tsx shims path based on project's Svelte version. + * @param {string} cwd + * @returns {string} + */ +export function resolve_svelte_shims(cwd) { + const require = createRequire(import.meta.url); + const pkg = load_pkg_json(cwd); + const svelte_dep = pkg.peerDependencies?.svelte || pkg.dependencies?.svelte || '3.0'; + let no_svelte_3; + try { + no_svelte_3 = !semver.intersects(svelte_dep, '^3.0.0'); + } catch { + // Not all version specs are valid semver, e.g. "latest" or "next" or catalog references + no_svelte_3 = true; + } + return no_svelte_3 + ? require.resolve('svelte2tsx/svelte-shims-v4.d.ts') + : require.resolve('svelte2tsx/svelte-shims.d.ts'); +} + /** * Generates d.ts files by invoking TypeScript's "emit d.ts files from input files". * The files are written to a temporary location and those which should be kept @@ -25,21 +46,9 @@ export async function emit_dts(input, output, final_output, cwd, alias, files, t rimraf(tmp); mkdirp(tmp); - const require = createRequire(import.meta.url); - const pkg = load_pkg_json(cwd); - const svelte_dep = pkg.peerDependencies?.svelte || pkg.dependencies?.svelte || '3.0'; - let no_svelte_3; - try { - no_svelte_3 = !semver.intersects(svelte_dep, '^3.0.0'); - } catch { - // Not all version specs are valid semver, e.g. "latest" or "next" or catalog references - no_svelte_3 = true; - } await emitDts({ libRoot: input, - svelteShimsPath: no_svelte_3 - ? require.resolve('svelte2tsx/svelte-shims-v4.d.ts') - : require.resolve('svelte2tsx/svelte-shims.d.ts'), + svelteShimsPath: resolve_svelte_shims(cwd), declarationDir: path.relative(cwd, tmp), tsconfig }); diff --git a/packages/package/test/fixtures/typescript-declaration-map/expected/Test.svelte.d.ts.map b/packages/package/test/fixtures/typescript-declaration-map/expected/Test.svelte.d.ts.map index fd94dc2b8f55..846d01586217 100644 --- a/packages/package/test/fixtures/typescript-declaration-map/expected/Test.svelte.d.ts.map +++ b/packages/package/test/fixtures/typescript-declaration-map/expected/Test.svelte.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Test.svelte.d.ts","sourceRoot":"","sources":["../src/lib/Test.svelte.ts"],"names":[],"mappings":"AAGC,KAAK,gBAAgB,GAAI;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAS1C,QAAA,MAAM,IAAI,sDAAsC,CAAC;AACjD,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC;AACpC,eAAe,IAAI,CAAC"} \ No newline at end of file +{"version":3,"file":"Test.svelte.d.ts","sourceRoot":"","sources":["../src/lib/Test.svelte.ts"],"names":[],"mappings":"AAGC,KAAK,gBAAgB,GAAI;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAS1C,QAAA,MAAM,IAAI,sDAAwC,CAAC;AACnD,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC;AACpC,eAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 498ab85b8944..7a1d3aa25e9d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1365,8 +1365,8 @@ importers: specifier: ^7.5.4 version: 7.7.4 svelte2tsx: - specifier: ~0.7.33 - version: 0.7.33(svelte@5.53.5)(typescript@5.8.3) + specifier: ~0.7.51 + version: 0.7.51(svelte@5.53.5)(typescript@5.8.3) devDependencies: '@sveltejs/vite-plugin-svelte': specifier: 'catalog:' @@ -4734,9 +4734,6 @@ packages: long@5.3.2: resolution: {integrity: sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==} - lower-case@2.0.2: - resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} - lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} @@ -4865,9 +4862,6 @@ packages: netlify-redirector@0.5.0: resolution: {integrity: sha512-4zdzIP+6muqPCuE8avnrgDJ6KW/2+UpHTRcTbMXCIRxiRmyrX+IZ4WSJGZdHPWF3WmQpXpy603XxecZ9iygN7w==} - no-case@3.0.4: - resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} - node-addon-api@7.1.1: resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==} @@ -5038,9 +5032,6 @@ packages: resolution: {integrity: sha512-ybiGyvspI+fAoRQbIPRddCcSTV9/LsJbf0e/S85VLowVGzRmokfneg2kwVW/KU5rOXrPSbF1qAKPMgNTqqROQQ==} engines: {node: '>=18'} - pascal-case@3.1.2: - resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} - path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} @@ -5347,6 +5338,9 @@ packages: sax@1.4.1: resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==} + scule@1.3.0: + resolution: {integrity: sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==} + semiver@1.1.0: resolution: {integrity: sha512-QNI2ChmuioGC1/xjyYwyZYADILWyW6AmS1UH6gDj/SFUUUS4MBAWs/7mxnkRPc/F4iHezDP+O8t0dO8WHiEOdg==} engines: {node: '>=6'} @@ -5556,8 +5550,8 @@ packages: typescript: optional: true - svelte2tsx@0.7.33: - resolution: {integrity: sha512-geogGkzfciwteiKvlbaDBnKOitWuh6e1n2f5KLBBXEfZgui9gy5yRlOBYtNEkdwciO4MC9fTM/EyltsiQrOPNQ==} + svelte2tsx@0.7.51: + resolution: {integrity: sha512-YbVMQi5LtQkVGOMdATTY8v3SMtkNjzYtrVDGaN3Bv+0LQ47tGXu/Oc8ryTkcYuEJWTZFJ8G2+2I8ORcQVGt9Ag==} peerDependencies: svelte: ^3.55 || ^4.0.0-next.0 || ^4.0 || ^5.0.0-next.0 typescript: ^4.9.4 || ^5.0.0 @@ -9398,10 +9392,6 @@ snapshots: long@5.3.2: {} - lower-case@2.0.2: - dependencies: - tslib: 2.8.1 - lru-cache@10.4.3: {} lru-cache@11.2.2: {} @@ -9511,11 +9501,6 @@ snapshots: netlify-redirector@0.5.0: {} - no-case@3.0.4: - dependencies: - lower-case: 2.0.2 - tslib: 2.8.1 - node-addon-api@7.1.1: {} node-domexception@1.0.0: {} @@ -9670,11 +9655,6 @@ snapshots: index-to-position: 1.1.0 type-fest: 4.41.0 - pascal-case@3.1.2: - dependencies: - no-case: 3.0.4 - tslib: 2.8.1 - path-exists@4.0.0: {} path-exists@5.0.0: {} @@ -10012,6 +9992,8 @@ snapshots: sax@1.4.1: {} + scule@1.3.0: {} + semiver@1.1.0: {} semver@7.7.4: {} @@ -10243,10 +10225,10 @@ snapshots: postcss-load-config: 3.1.4(postcss@8.5.6)(ts-node@10.9.2(@types/node@18.19.119)(typescript@5.8.3)) typescript: 5.8.3 - svelte2tsx@0.7.33(svelte@5.53.5)(typescript@5.8.3): + svelte2tsx@0.7.51(svelte@5.53.5)(typescript@5.8.3): dependencies: dedent-js: 1.0.1 - pascal-case: 3.1.2 + scule: 1.3.0 svelte: 5.53.5 typescript: 5.8.3