Skip to content

Commit c6292c3

Browse files
jycouetRich-Harris
andauthored
chore: remove tsx (#1711)
* remove tsx & CI using node 24 * rewriteRelativeImportExtensions --------- Co-authored-by: Rich Harris <[email protected]>
1 parent 31b33af commit c6292c3

File tree

10 files changed

+17
-15
lines changed

10 files changed

+17
-15
lines changed

.github/workflows/docs-preview-create.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- uses: pnpm/action-setup@v4
4848
- uses: actions/setup-node@v4
4949
with:
50-
node-version: 22
50+
node-version: 24
5151
cache: pnpm
5252
- run: pnpm install --frozen-lockfile
5353

.github/workflows/sync-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- uses: pnpm/action-setup@v4
2121
- uses: actions/setup-node@v4
2222
with:
23-
node-version: 22
23+
node-version: 24
2424
cache: pnpm
2525
- run: pnpm install --frozen-lockfile
2626

apps/svelte.dev/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"check": "node scripts/update.js && svelte-kit sync && svelte-check",
1414
"format": "prettier --write .",
1515
"lint": "prettier --check .",
16-
"sync-docs": "tsx scripts/sync-docs/index.ts",
16+
"sync-docs": "node scripts/sync-docs/index.ts",
1717
"sync-packages": "node scripts/sync-packages/index.ts"
1818
},
1919
"dependencies": {
@@ -79,7 +79,6 @@
7979
"svelte-check": "^4.3.1",
8080
"svelte-preprocess": "^6.0.3",
8181
"tiny-glob": "^0.2.9",
82-
"tsx": "^4.19.0",
8382
"typescript": "^5.5.4",
8483
"valibot": "^1.1.0",
8584
"vite": "^7.0.4",

apps/svelte.dev/scripts/sync-docs/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { preprocess } from '@sveltejs/site-kit/markdown/preprocess';
33
import path from 'node:path';
44
import fs from 'node:fs';
55
import { parseArgs } from 'node:util';
6+
import process from 'node:process';
67
import ts from 'typescript';
78
import glob from 'tiny-glob/sync.js';
89
import chokidar from 'chokidar';

apps/svelte.dev/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"skipLibCheck": true,
1010
"sourceMap": true,
1111
"strict": true,
12-
"moduleResolution": "bundler"
12+
"moduleResolution": "bundler",
13+
"rewriteRelativeImportExtensions": true
1314
}
1415
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
1516
// except $lib which is handled by https://kit.svelte.dev/docs/configuration#files

packages/site-kit/src/lib/markdown/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
export { render_content_markdown } from './renderer';
1+
export { render_content_markdown } from './renderer.ts';
22

3-
export { transform, slugify, clean, strip_origin } from './utils';
3+
export { transform, slugify, clean, strip_origin } from './utils.ts';
44

55
// TODO none of these really belong here
66
export type Modules = Array<{

packages/site-kit/src/lib/markdown/preprocess.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import fs from 'node:fs';
22
import path from 'node:path';
3-
import { SHIKI_LANGUAGE_MAP, strip_origin } from './utils';
4-
import type { Declaration, TypeElement, Modules } from './index';
3+
import { SHIKI_LANGUAGE_MAP, strip_origin } from './utils.ts';
4+
import type { Declaration, TypeElement, Modules } from './index.ts';
55

66
/**
77
* Replace module/export placeholders during `sync-docs`

packages/site-kit/src/lib/markdown/renderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { createHighlighterCore } from 'shiki/core';
99
import { createOnigurumaEngine } from 'shiki/engine/oniguruma';
1010
import { createCssVariablesTheme } from 'shiki';
1111
import { transformerTwoslash } from '@shikijs/twoslash';
12-
import { SHIKI_LANGUAGE_MAP, slugify, smart_quotes, transform } from './utils';
12+
import { SHIKI_LANGUAGE_MAP, slugify, smart_quotes, transform } from './utils.ts';
1313

1414
interface SnippetOptions {
1515
file: string | null;

packages/site-kit/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"moduleResolution": "bundler",
1212
"module": "esnext",
1313
"target": "esnext",
14-
"skipLibCheck": true // TODO remove once vite-plugin-svelte exposes PluginOptions
14+
"skipLibCheck": true, // TODO remove once vite-plugin-svelte exposes PluginOptions
15+
"rewriteRelativeImportExtensions": true
1516
},
1617
"include": ["./src/**/*.js", "./src/**/*.ts", "./src/**/*.svelte"]
1718
}

pnpm-lock.yaml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)