Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
7087835
feat(deps): upgrade to the Vite 8.4 beta and Rolldown 1.3
fengmk2 Nov 20, 2026
1be1c7f
fix(deps): align the declaration compiler and scope the Rolldown lint…
fengmk2 Nov 20, 2026
f04ff05
test(cli): record prerelease peer rules and the Vite profile filename
fengmk2 Nov 20, 2026
a777683
fix(rolldown): preserve missing source-map entries and compile upstre…
fengmk2 Nov 20, 2026
c50352c
test(cli): verify npm prerelease recovery and Bun catalog reuse
fengmk2 Nov 20, 2026
a6cb7a2
fix(pack): keep native-preview declaration builds working with tsdown
fengmk2 Nov 20, 2026
95a25db
fix(core): accept the native TypeScript prerelease in frozen installs
fengmk2 Nov 20, 2026
3723dd3
chore(lint): ignore Git object IDs in patch index lines
fengmk2 Nov 20, 2026
d1887c4
chore(core): use 8.4.0 for the Vite beta compatibility trial
fengmk2 Nov 21, 2026
c58abff
fix(prompts): keep the tsdown config type portable
fengmk2 Nov 21, 2026
f054405
feat(migrate): upgrade native-preview declaration builds to TypeScript 7
fengmk2 Nov 21, 2026
5cfb83e
test(pack): normalize the tsdown deprecation warning in snapshots
fengmk2 Nov 22, 2026
4d5c00f
fix(deps): align beta upgrade with updated workspace tooling
fengmk2 Nov 25, 2026
faec181
test(ecosystem): use the Vite client config for vinext stack frames
fengmk2 Nov 25, 2026
978a874
feat(deps): upgrade to Vite 8.4.0-beta.2
fengmk2 Nov 25, 2026
0403422
test(ecosystem): accept the raw loader watch file in vinext
fengmk2 Nov 25, 2026
22bfcc0
test(ecosystem): drop the vinext Vite 8.4 patch
fengmk2 Nov 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/clone/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ runs:

# oxc-node compiles into the native binding, and Cargo.lock records the
# patched manifest, so patch it before any cargo command reads it.
- name: Patch vendored oxc-node
- name: Patch vendored sources
shell: bash
run: node packages/tools/src/patch-oxc-node.ts
run: node packages/tools/src/patch-vendored-sources.ts

# Match the manifests used by sync-remote when it generated the root lockfile.
# The later dependency installation uses --frozen-lockfile, so alignment must run first.
Expand Down
2 changes: 2 additions & 0 deletions .github/actions/compute-native-cache-input-hash/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ runs:
${{
hashFiles(
'packages/tools/.upstream-versions.json',
'packages/tools/patches/*.patch',
'packages/tools/src/patch-vendored-sources.ts',
'packages/tools/src/patch-oxc-node.ts',
'packages/tools/src/cargo-toml.ts',
'rust-toolchain.toml',
Expand Down
9 changes: 5 additions & 4 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@
"vite",
"vitest",
"vitest-dev",
"yuku-parser"
"yuku"
],
"enabled": false
},
{
"description": "Core's postcss and fsevents ranges follow the bundled Vite version through upgrade-deps.ts --sync-bundled-deps.",
"description": "Core's postcss and optional native dependency ranges follow the bundled Vite version through upgrade-deps.ts --sync-bundled-deps.",
"matchManagers": ["npm"],
"matchFileNames": ["packages/core/package.json"],
"matchPackageNames": ["postcss", "fsevents"],
"matchPackageNames": ["postcss", "fsevents", "napi-windows-process-start-time"],
"matchDepTypes": ["dependencies", "optionalDependencies"],
"enabled": false
},
Expand Down Expand Up @@ -164,7 +164,6 @@
"append-only-vec",
"arcstr",
"async-channel",
"async-scoped",
"base-encode",
"base64-simd",
"bitflags",
Expand Down Expand Up @@ -212,6 +211,7 @@
"rolldown-ariadne",
"rolldown-notify",
"rolldown-notify-debouncer-full",
"rolldown-notify-napi",
"rustc-hash",
"schemars",
"self_cell",
Expand All @@ -222,6 +222,7 @@
"smallvec",
"sugar_path",
"supports-color",
"tempfile",
"terminal_size",
"tokio",
"tracing",
Expand Down
90 changes: 41 additions & 49 deletions .github/scripts/__tests__/upgrade-deps.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test.each([false, true])(
'runs the upgrade pipeline and retains metadata (install fails: %s)',
async (failInstall) => {
const root = resolve(import.meta.dirname, '../../..');
const { root: tempDir, metaDir, corePath, pluginPath, parserPath } = createSyncFixture();
const { root: tempDir, metaDir, corePath, pluginPath, yukuPath } = createSyncFixture();
onTestFinished(() => {
vi.mocked(execFileSync).mockReset();
vi.restoreAllMocks();
Expand Down Expand Up @@ -138,7 +138,7 @@ test.each([false, true])(
throw new Error(`Unexpected request: ${url}`);
});
const commands: Array<Array<string>> = [];
let parserAtFinalInstall;
let yukuAtFinalInstall;
vi.mocked(execFileSync).mockImplementation((command, args) => {
expect(command).toBe('pnpm');
if (!Array.isArray(args)) {
Expand All @@ -151,14 +151,12 @@ test.each([false, true])(
if (args?.[0] === 'dedupe') {
// The actual bundled plugin can change during dependency deduplication.
writeJson(pluginPath, {
dependencies: { 'yuku-codegen': '^0.11.0', 'yuku-parser': '^0.11.0' },
dependencies: { yuku: '^0.29.0' },
});
writeJson(parserPath, { version: '0.11.2' });
writeJson(yukuPath, { version: '0.29.2' });
}
if (commands.length === 4) {
parserAtFinalInstall = requireJsonObject(readJson(corePath).dependencies, corePath)[
'yuku-parser'
];
yukuAtFinalInstall = requireJsonObject(readJson(corePath).dependencies, corePath).yuku;
}
return Buffer.from('');
});
Expand All @@ -180,10 +178,10 @@ test.each([false, true])(
],
);
expect(compareUrls).toEqual([expect.stringContaining(`/compare/${pinnedOxcNode}...`)]);
expect(parserAtFinalInstall).toBe(failInstall ? undefined : '0.11.2');
expect(yukuAtFinalInstall).toBe(failInstall ? undefined : '0.29.2');
expect(readJson(corePath)).toHaveProperty(
['dependencies', 'yuku-parser'],
failInstall ? '^0.9.3' : '0.11.2',
['dependencies', 'yuku'],
failInstall ? '^0.27.0' : '0.29.2',
);

expect(readFileSync(workspacePath, 'utf8')).toContain('\n lint-staged: ^17.5.1\n');
Expand Down Expand Up @@ -225,9 +223,7 @@ test.each([false, true])(
? { old: pinnedOxcNode, new: pinnedOxcNode }
: { old: pinnedOxcNode, new: 'a'.repeat(40), tag: 'v1.2.3' },
);
expect(versions['yuku-parser']).toEqual(
failInstall ? undefined : { old: '^0.9.3', new: '0.11.2' },
);
expect(versions.yuku).toEqual(failInstall ? undefined : { old: '^0.27.0', new: '0.29.2' });
expect(readFileSync(join(metaDir, 'commit-message.txt'), 'utf8')).toContain(
'- lint-staged: 16.2.6 -> 17.5.1',
);
Expand All @@ -250,29 +246,25 @@ function createSyncFixture() {
onTestFinished(() => rmSync(root, { recursive: true, force: true }));
const corePath = join(root, 'packages/core/package.json');
const pluginPath = join(root, 'store/tsdown/node_modules/rolldown-plugin-dts/package.json');
const parserPath = join(dirname(pluginPath), 'node_modules/yuku-parser/package.json');
const yukuPath = join(dirname(pluginPath), 'node_modules/yuku/package.json');
const vitePath = join(root, 'vite/packages/vite/package.json');
const metaDir = join(root, 'meta');
const versionsPath = join(metaDir, 'versions.json');
writeJson(corePath, {
version: '8.3.5001',
dependencies: { 'yuku-parser': '^0.9.3', postcss: '^8.5.6' },
optionalDependencies: { fsevents: '~2.3.3' },
dependencies: { yuku: '^0.27.0', postcss: '^8.5.6' },
optionalDependencies: { fsevents: '~2.3.3', 'napi-windows-process-start-time': '^0.1.0' },
devDependencies: { 'rolldown-plugin-dts': '^0.28.0' },
bundledVersions: { vite: '8.3.5' },
});
writeJson(join(root, 'store/tsdown/package.json'), { name: 'tsdown', version: '0.23.0' });
writeJson(pluginPath, {
dependencies: {
'yuku-ast': '^0.10.1',
'yuku-codegen': '^0.10.1',
'yuku-parser': '~0.10.2',
},
dependencies: { yuku: '~0.28.0' },
});
writeJson(parserPath, { version: '0.10.3' });
// Core's existing parser is not the version used by the bundled plugin.
writeJson(join(root, 'packages/core/node_modules/yuku-parser/package.json'), {
version: '0.9.3',
writeJson(yukuPath, { version: '0.28.1' });
// Core's existing Yuku dependency is not the version used by the bundled plugin.
writeJson(join(root, 'packages/core/node_modules/yuku/package.json'), {
version: '0.27.0',
});
// A pnpm-style symlink ensures resolution starts at the real tsdown package.
mkdirSync(join(root, 'packages/core/node_modules'), { recursive: true });
Expand All @@ -282,12 +274,12 @@ function createSyncFixture() {
'junction',
);
writeJson(join(root, 'packages/core/node_modules/rolldown-plugin-dts/package.json'), {
dependencies: { 'yuku-codegen': '^0.8.1', 'yuku-parser': '^0.8.1' },
dependencies: { yuku: '^0.26.1' },
});
writeJson(vitePath, {
version: '8.3.5',
dependencies: { postcss: '^8.5.28' },
optionalDependencies: { fsevents: '~2.4.0' },
optionalDependencies: { fsevents: '~2.4.0', 'napi-windows-process-start-time': '^0.1.1' },
});
writeJson(versionsPath, { oxlint: { old: '1.86.0', new: '1.87.0' } });
const run = () =>
Expand All @@ -301,43 +293,42 @@ function createSyncFixture() {
stdio: 'pipe',
},
);
return { root, corePath, pluginPath, parserPath, vitePath, metaDir, versionsPath, run };
return { root, corePath, pluginPath, yukuPath, vitePath, metaDir, versionsPath, run };
}

test('pins the bundled parser, syncs Vite ranges, and preserves upgrade metadata', () => {
test('pins Yuku, syncs Vite ranges, and preserves upgrade metadata', () => {
const fixture = createSyncFixture();
const { corePath, versionsPath, metaDir, run } = fixture;
run();
expect(readJson(corePath)).toEqual({
// The bundled Vite did not change, so the release counter stays.
version: '8.3.5001',
dependencies: { 'yuku-parser': '0.10.3', postcss: '^8.5.28' },
optionalDependencies: { fsevents: '~2.4.0' },
dependencies: { yuku: '0.28.1', postcss: '^8.5.28' },
optionalDependencies: { fsevents: '~2.4.0', 'napi-windows-process-start-time': '^0.1.1' },
devDependencies: { 'rolldown-plugin-dts': '^0.28.0' },
bundledVersions: { vite: '8.3.5' },
});
expect(readJson(versionsPath)).toEqual({
oxlint: { old: '1.86.0', new: '1.87.0' },
'yuku-parser': { old: '^0.9.3', new: '0.10.3' },
yuku: { old: '^0.27.0', new: '0.28.1' },
postcss: { old: '^8.5.6', new: '^8.5.28' },
fsevents: { old: '~2.3.3', new: '~2.4.0' },
'napi-windows-process-start-time': { old: '^0.1.0', new: '^0.1.1' },
});
expect(readFileSync(join(metaDir, 'pr-body.md'), 'utf8')).toContain(
'| `yuku-parser` | `^0.9.3` | `0.10.3` |',
'| `yuku` | `^0.27.0` | `0.28.1` |',
);

// A second pass after lockfile deduplication must retain the original ranges.
writeJson(fixture.pluginPath, {
dependencies: { 'yuku-codegen': '^0.11.0', 'yuku-parser': '^0.11.0' },
dependencies: { yuku: '^0.29.0' },
});
writeJson(fixture.parserPath, { version: '0.11.2' });
writeJson(fixture.yukuPath, { version: '0.29.2' });
run();
expect(readJson(corePath).dependencies).not.toHaveProperty('yuku-ast');
expect(readJson(corePath).dependencies).not.toHaveProperty('yuku-codegen');
expect(readJson(corePath)).toHaveProperty(['dependencies', 'yuku-parser'], '0.11.2');
expect(readJson(versionsPath)['yuku-parser']).toEqual({ old: '^0.9.3', new: '0.11.2' });
expect(readJson(corePath)).toHaveProperty(['dependencies', 'yuku'], '0.29.2');
expect(readJson(versionsPath).yuku).toEqual({ old: '^0.27.0', new: '0.29.2' });
expect(readFileSync(join(metaDir, 'commit-message.txt'), 'utf8')).toContain(
'- yuku-parser: ^0.9.3 -> 0.11.2',
'- yuku: ^0.27.0 -> 0.29.2',
);
const before = readFileSync(corePath, 'utf8');
run();
Expand Down Expand Up @@ -385,20 +376,20 @@ test('fails without writing core when the Vite source has no version', () => {
expect(readFileSync(fixture.corePath, 'utf8')).toBe(before);
});

test('updates the parser pin when its installed version changes within the same range', () => {
const { corePath, parserPath, versionsPath, run } = createSyncFixture();
test('updates the Yuku pin when its installed version changes within the same range', () => {
const { corePath, yukuPath, versionsPath, run } = createSyncFixture();
run();
writeJson(parserPath, { version: '0.10.4' });
writeJson(yukuPath, { version: '0.28.2' });
run();
expect(readJson(corePath)).toHaveProperty(['dependencies', 'yuku-parser'], '0.10.4');
expect(readJson(versionsPath)['yuku-parser']).toEqual({ old: '^0.9.3', new: '0.10.4' });
expect(readJson(corePath)).toHaveProperty(['dependencies', 'yuku'], '0.28.2');
expect(readJson(versionsPath).yuku).toEqual({ old: '^0.27.0', new: '0.28.2' });
});

test.each([undefined, '', ' '])(
'fails without writing core for an invalid parser version: %s',
'fails without writing core for an invalid Yuku version: %s',
(version) => {
const { corePath, parserPath, versionsPath, run } = createSyncFixture();
writeJson(parserPath, { version });
const { corePath, yukuPath, versionsPath, run } = createSyncFixture();
writeJson(yukuPath, { version });
const before = readFileSync(corePath, 'utf8');
expect(run).toThrow('Missing version');
expect(readFileSync(corePath, 'utf8')).toBe(before);
Expand All @@ -409,9 +400,10 @@ test.each([undefined, '', ' '])(
);

test.each([
{ source: 'pluginPath', field: 'dependencies', name: 'yuku-parser' },
{ source: 'pluginPath', field: 'dependencies', name: 'yuku' },
{ source: 'vitePath', field: 'dependencies', name: 'postcss' },
{ source: 'vitePath', field: 'optionalDependencies', name: 'fsevents' },
{ source: 'vitePath', field: 'optionalDependencies', name: 'napi-windows-process-start-time' },
] as const)('fails without writing core when upstream removes $name', ({ source, field, name }) => {
const fixture = createSyncFixture();
const pkg = readJson(fixture[source]);
Expand Down
13 changes: 7 additions & 6 deletions .github/scripts/upgrade-deps-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,23 @@ export function getBundledDependencyRanges(
// These packages stay external in packages/core/build.ts. Follow their
// bundled consumers rather than independently selecting the latest releases.
const sources: Array<{ path: string; field: DependencyField; name: string }> = [
{ path: pluginPath, field: 'dependencies', name: 'yuku-parser' },
{ path: pluginPath, field: 'dependencies', name: 'yuku' },
{ path: vitePath, field: 'dependencies', name: 'postcss' },
{ path: vitePath, field: 'optionalDependencies', name: 'fsevents' },
{ path: vitePath, field: 'optionalDependencies', name: 'napi-windows-process-start-time' },
];
return sources.map(({ path, field, name }) => {
const dependencies = readJsonObject(path)[field];
let range = isObjectValue(dependencies) ? dependencies[name] : undefined;
if (typeof range !== 'string' || range.trim() === '') {
throw new Error(`Missing ${field}.${name} in ${path}; review core's externals`);
}
if (name === 'yuku-parser') {
// Pin the runtime parser to the exact version resolved by the bundled plugin.
const parserPath = createRequire(path).resolve('yuku-parser/package.json');
const { version } = readJsonObject(parserPath);
if (name === 'yuku') {
// Pin the native compiler to the exact version resolved by the bundled plugin.
const yukuPath = createRequire(path).resolve('yuku/package.json');
const { version } = readJsonObject(yukuPath);
if (typeof version !== 'string' || version.trim() === '') {
throw new Error(`Missing version in ${parserPath}; review core's externals`);
throw new Error(`Missing version in ${yukuPath}; review core's externals`);
}
range = version;
}
Expand Down
7 changes: 5 additions & 2 deletions .github/scripts/upgrade-deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -574,10 +574,13 @@ function syncCoreVersion(pkg: JsonObject) {
}
pkg.bundledVersions.vite = viteVersion;
const current = typeof pkg.version === 'string' ? pkg.version : undefined;
if (current !== undefined && tryDecodeCoreVersion(current)?.vite === viteVersion) {
const next = initialCoreVersion(viteVersion);
if (
current === next ||
(current !== undefined && tryDecodeCoreVersion(current)?.vite === viteVersion)
) {
return;
}
const next = initialCoreVersion(viteVersion);
recordChange(CORE_PACKAGE_NAME, changes.get(CORE_PACKAGE_NAME)?.old ?? current, next);
pkg.version = next;
}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ jobs:
node-version-file: .node-version
package-manager-cache: false

- name: Patch vendored oxc-node
- name: Patch vendored sources
shell: bash
run: node packages/tools/src/patch-oxc-node.ts
run: node packages/tools/src/patch-vendored-sources.ts

- name: Clear git origin for nested checkout
shell: bash
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/upgrade-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,10 @@ jobs:
follow the pinned upstream requirements.
- After changing tsdown or rolldown-plugin-dts, run
`node .github/scripts/upgrade-deps.ts --sync-bundled-deps`, then
`pnpm install --no-frozen-lockfile`. Core's external `yuku-parser` must
`pnpm install --no-frozen-lockfile`. Core's external `yuku` package must
use the exact installed version resolved by the plugin bundled through
tsdown, so it stays aligned with the bundled Yuku code. Do not replace
this pin with a version range. The sync command also
copies Vite's postcss and optional fsevents ranges into core and
tsdown. The sync command also copies Vite's `postcss`,
`fsevents`, and `napi-windows-process-start-time` ranges into core and
updates the upgrade metadata. `@oxlint/plugins` shares Oxlint's release
version and must use the exact same version selected by the upgrade script.

Expand Down
5 changes: 5 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ pn = "pn" # pnpm short alias
Jod = "Jod" # Node.js v22 LTS codename
flate = "flate" # flate2 crate name (gzip/deflate compression)

[type.patch]
extend-glob = ["*.patch"]
# Git writes object IDs on patch index lines.
extend-ignore-re = ['(?m)^index [0-9a-f]+\.\.[0-9a-f]+(?: [0-7]+)?$']

[files]
extend-exclude = [
# Vendored PGP key/signature blobs: base64 armor trips the spell checker.
Expand Down
Loading
Loading