diff --git a/.github/workflows/docs-preview-create.yml b/.github/workflows/docs-preview-create.yml index 4f6f5a283..7b1074558 100644 --- a/.github/workflows/docs-preview-create.yml +++ b/.github/workflows/docs-preview-create.yml @@ -47,7 +47,7 @@ jobs: - uses: pnpm/action-setup@v4 - uses: actions/setup-node@v4 with: - node-version: 22 + node-version: 24 cache: pnpm - run: pnpm install --frozen-lockfile diff --git a/.github/workflows/sync-docs.yml b/.github/workflows/sync-docs.yml index 79b5a9727..01f683a62 100644 --- a/.github/workflows/sync-docs.yml +++ b/.github/workflows/sync-docs.yml @@ -20,7 +20,7 @@ jobs: - uses: pnpm/action-setup@v4 - uses: actions/setup-node@v4 with: - node-version: 22 + node-version: 24 cache: pnpm - run: pnpm install --frozen-lockfile diff --git a/apps/svelte.dev/package.json b/apps/svelte.dev/package.json index c64e02ec2..04e9eca6a 100644 --- a/apps/svelte.dev/package.json +++ b/apps/svelte.dev/package.json @@ -13,7 +13,7 @@ "check": "node scripts/update.js && svelte-kit sync && svelte-check", "format": "prettier --write .", "lint": "prettier --check .", - "sync-docs": "tsx scripts/sync-docs/index.ts", + "sync-docs": "node scripts/sync-docs/index.ts", "sync-packages": "node scripts/sync-packages/index.ts" }, "dependencies": { @@ -79,7 +79,6 @@ "svelte-check": "^4.3.1", "svelte-preprocess": "^6.0.3", "tiny-glob": "^0.2.9", - "tsx": "^4.19.0", "typescript": "^5.5.4", "valibot": "^1.1.0", "vite": "^7.0.4", diff --git a/apps/svelte.dev/scripts/sync-docs/index.ts b/apps/svelte.dev/scripts/sync-docs/index.ts index 91d024f64..b271dc21a 100644 --- a/apps/svelte.dev/scripts/sync-docs/index.ts +++ b/apps/svelte.dev/scripts/sync-docs/index.ts @@ -3,6 +3,7 @@ import { preprocess } from '@sveltejs/site-kit/markdown/preprocess'; import path from 'node:path'; import fs from 'node:fs'; import { parseArgs } from 'node:util'; +import process from 'node:process'; import ts from 'typescript'; import glob from 'tiny-glob/sync.js'; import chokidar from 'chokidar'; diff --git a/apps/svelte.dev/tsconfig.json b/apps/svelte.dev/tsconfig.json index fc93cbd94..c58b41a43 100644 --- a/apps/svelte.dev/tsconfig.json +++ b/apps/svelte.dev/tsconfig.json @@ -9,7 +9,8 @@ "skipLibCheck": true, "sourceMap": true, "strict": true, - "moduleResolution": "bundler" + "moduleResolution": "bundler", + "rewriteRelativeImportExtensions": true } // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias // except $lib which is handled by https://kit.svelte.dev/docs/configuration#files diff --git a/packages/site-kit/src/lib/markdown/index.ts b/packages/site-kit/src/lib/markdown/index.ts index eca67cde7..a523e1d60 100644 --- a/packages/site-kit/src/lib/markdown/index.ts +++ b/packages/site-kit/src/lib/markdown/index.ts @@ -1,6 +1,6 @@ -export { render_content_markdown } from './renderer'; +export { render_content_markdown } from './renderer.ts'; -export { transform, slugify, clean, strip_origin } from './utils'; +export { transform, slugify, clean, strip_origin } from './utils.ts'; // TODO none of these really belong here export type Modules = Array<{ diff --git a/packages/site-kit/src/lib/markdown/preprocess.ts b/packages/site-kit/src/lib/markdown/preprocess.ts index 4d9eded6c..740c1dd8b 100644 --- a/packages/site-kit/src/lib/markdown/preprocess.ts +++ b/packages/site-kit/src/lib/markdown/preprocess.ts @@ -1,7 +1,7 @@ import fs from 'node:fs'; import path from 'node:path'; -import { SHIKI_LANGUAGE_MAP, strip_origin } from './utils'; -import type { Declaration, TypeElement, Modules } from './index'; +import { SHIKI_LANGUAGE_MAP, strip_origin } from './utils.ts'; +import type { Declaration, TypeElement, Modules } from './index.ts'; /** * Replace module/export placeholders during `sync-docs` diff --git a/packages/site-kit/src/lib/markdown/renderer.ts b/packages/site-kit/src/lib/markdown/renderer.ts index aaafcdfbe..e8e678fc5 100644 --- a/packages/site-kit/src/lib/markdown/renderer.ts +++ b/packages/site-kit/src/lib/markdown/renderer.ts @@ -9,7 +9,7 @@ import { createHighlighterCore } from 'shiki/core'; import { createOnigurumaEngine } from 'shiki/engine/oniguruma'; import { createCssVariablesTheme } from 'shiki'; import { transformerTwoslash } from '@shikijs/twoslash'; -import { SHIKI_LANGUAGE_MAP, slugify, smart_quotes, transform } from './utils'; +import { SHIKI_LANGUAGE_MAP, slugify, smart_quotes, transform } from './utils.ts'; interface SnippetOptions { file: string | null; diff --git a/packages/site-kit/tsconfig.json b/packages/site-kit/tsconfig.json index 2c3ab4f38..36b910f51 100644 --- a/packages/site-kit/tsconfig.json +++ b/packages/site-kit/tsconfig.json @@ -11,7 +11,8 @@ "moduleResolution": "bundler", "module": "esnext", "target": "esnext", - "skipLibCheck": true // TODO remove once vite-plugin-svelte exposes PluginOptions + "skipLibCheck": true, // TODO remove once vite-plugin-svelte exposes PluginOptions + "rewriteRelativeImportExtensions": true }, "include": ["./src/**/*.js", "./src/**/*.ts", "./src/**/*.svelte"] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a263045fa..8a4f24e6e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -195,9 +195,6 @@ importers: tiny-glob: specifier: ^0.2.9 version: 0.2.9 - tsx: - specifier: ^4.19.0 - version: 4.20.4 typescript: specifier: ^5.5.4 version: 5.8.2 @@ -4713,6 +4710,7 @@ snapshots: get-tsconfig@4.10.1: dependencies: resolve-pkg-maps: 1.0.0 + optional: true gifwrap@0.10.1: dependencies: @@ -5231,7 +5229,8 @@ snapshots: resolve-from@5.0.0: {} - resolve-pkg-maps@1.0.0: {} + resolve-pkg-maps@1.0.0: + optional: true resolve.exports@2.0.2: {} @@ -5549,6 +5548,7 @@ snapshots: get-tsconfig: 4.10.1 optionalDependencies: fsevents: 2.3.3 + optional: true twoslash-protocol@0.3.1: {}