Skip to content

Commit 0344c4f

Browse files
sxzzsxzzbot
andauthored
fix: downgrade rolldown-plugin-dts to 0.28 to restore TypeScript 7.0 support (#1107)
Co-authored-by: Kevin Bot <gh-bot@sxzz.moe>
1 parent 3c0c854 commit 0344c4f

4 files changed

Lines changed: 127 additions & 144 deletions

File tree

‎pnpm-lock.yaml‎

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

‎pnpm-workspace.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ catalogs:
8383
picomatch: ^4.0.7
8484
postcss-load-config: ^6.0.1
8585
rolldown: ~1.2.15
86-
rolldown-plugin-dts: ^0.29.0-beta.2
86+
rolldown-plugin-dts: ^0.28.8
8787
tinyexec: ^1.3.1
8888
tinyglobby: ^0.2.17
8989
tree-kill: ^1.2.2

‎schema.json‎

Lines changed: 115 additions & 135 deletions
Original file line numberDiff line numberDiff line change
@@ -3564,7 +3564,66 @@
35643564
"required": ["dts"],
35653565
"additionalProperties": false
35663566
},
3567-
"Generator": {},
3567+
"Omit_e1330183": {
3568+
"type": "object",
3569+
"properties": {
3570+
"stripInternal": {
3571+
"anyOf": [{ "const": false }, { "const": true }],
3572+
"description": "Do not emit declarations for code that has an"
3573+
}
3574+
},
3575+
"required": [],
3576+
"additionalProperties": false
3577+
},
3578+
"TsgoOptions": {
3579+
"type": "object",
3580+
"properties": {
3581+
"path": {
3582+
"type": "string",
3583+
"description": "Path to a custom `tsgo` executable."
3584+
}
3585+
},
3586+
"required": [],
3587+
"additionalProperties": false
3588+
},
3589+
"FileExtensionInfo": {
3590+
"type": "object",
3591+
"properties": {
3592+
"extension": { "type": "string" },
3593+
"isMixedContent": { "anyOf": [{ "const": false }, { "const": true }] },
3594+
"scriptKind": {
3595+
"anyOf": [
3596+
{ "const": 0 },
3597+
{ "const": 1 },
3598+
{ "const": 2 },
3599+
{ "const": 3 },
3600+
{ "const": 4 },
3601+
{ "const": 5 },
3602+
{ "const": 6 },
3603+
{ "const": 7 }
3604+
]
3605+
}
3606+
},
3607+
"required": ["extension", "isMixedContent"],
3608+
"additionalProperties": false
3609+
},
3610+
"CustomLanguage": {
3611+
"type": "object",
3612+
"properties": {
3613+
"extensionPatterns": {
3614+
"type": "array",
3615+
"items": {},
3616+
"description": "Patterns that identify files written in this language."
3617+
},
3618+
"tsFileExtensionInfos": {
3619+
"type": "array",
3620+
"items": { "$ref": "#/$defs/FileExtensionInfo" },
3621+
"description": "Extra file extensions passed to the TypeScript compiler."
3622+
}
3623+
},
3624+
"required": ["extensionPatterns"],
3625+
"additionalProperties": false
3626+
},
35683627
"WatchOptions": {
35693628
"type": "object",
35703629
"properties": {
@@ -4640,7 +4699,14 @@
46404699
"type": "object",
46414700
"properties": {},
46424701
"required": [],
4643-
"additionalProperties": { "anyOf": [{}, {}, {}, {}] }
4702+
"additionalProperties": {
4703+
"anyOf": [
4704+
{ "const": false },
4705+
{ "const": true },
4706+
{ "$ref": "#/$defs/Record_519c04ca" },
4707+
{ "type": "array", "items": { "$ref": "#/$defs/Record_519c04ca" } }
4708+
]
4709+
}
46444710
},
46454711
"Record_ab245659": {
46464712
"type": "object",
@@ -4785,131 +4851,29 @@
47854851
"required": [],
47864852
"additionalProperties": false
47874853
},
4788-
"TscOptions": {
4789-
"type": "object",
4790-
"properties": {
4791-
"vue": {
4792-
"anyOf": [
4793-
{ "const": false },
4794-
{ "const": true },
4795-
{ "$ref": "#/$defs/VueLanguageOptions" }
4796-
],
4797-
"description": "Registers the built-in Vue language integration using `vue-tsc`.\n\nThis is a shortcut for a preconfigured {@link Options.customLanguages}\nentry and requires the `tsc` generator.",
4798-
"default": false
4799-
},
4800-
"build": {
4801-
"anyOf": [{ "const": false }, { "const": true }],
4802-
"description": "Uses TypeScript build mode (`tsc -b`) and follows project references.",
4803-
"default": false
4804-
},
4805-
"incremental": {
4806-
"anyOf": [{ "const": false }, { "const": true }],
4807-
"description": "Persists build-mode outputs, including `.tsbuildinfo`, to disk for reuse.\nWhen disabled, build outputs stay in memory."
4808-
},
4809-
"parallel": {
4810-
"anyOf": [{ "const": false }, { "const": true }],
4811-
"description": "Runs `tsc` or `vue-tsc` in a separate process.\nCustom languages supplied through {@link Options.customLanguages} are not\nsupported in the worker process.",
4812-
"default": false
4813-
},
4814-
"eager": {
4815-
"anyOf": [{ "const": false }, { "const": true }],
4816-
"description": "Loads every file listed by `tsconfig.json` into the TypeScript program.\n\nUseful when one config covers multiple packages or entry points.",
4817-
"default": false
4818-
},
4819-
"newContext": {
4820-
"anyOf": [{ "const": false }, { "const": true }],
4821-
"description": "Uses an isolated TypeScript cache instead of the shared global context.",
4822-
"default": false
4823-
}
4824-
},
4825-
"required": [],
4826-
"additionalProperties": false
4827-
},
4828-
"Omit_e1330183": {
4829-
"type": "object",
4830-
"properties": {
4831-
"stripInternal": {
4832-
"anyOf": [{ "const": false }, { "const": true }],
4833-
"description": "Do not emit declarations for code that has an"
4834-
}
4835-
},
4836-
"required": [],
4837-
"additionalProperties": false
4838-
},
4839-
"TsgoOptions": {
4854+
"Options": {
48404855
"type": "object",
48414856
"properties": {
4842-
"runExternalCode": {
4843-
"anyOf": [{ "const": false }, { "const": true }],
4844-
"description": "Allows TypeScript to execute content mappers configured in tsconfig.\nCannot be combined with `tsgo.vfs` when content mappers are configured.",
4845-
"default": false
4846-
},
4847-
"moduleUrl": {
4848-
"type": "string",
4849-
"description": "A `file://` URL of the TypeScript module that provides the TypeScript Go API.\n\nUse `import.meta.resolve()` to select an npm alias or another compatible\nTypeScript module."
4857+
"oxc": {
4858+
"$ref": "#/$defs/Omit_e1330183",
4859+
"description": "Options for the `oxc` generator.\n\nThe top-level {@link GeneralOptions.sourcemapsourcemap} option controls\ndeclaration maps."
48504860
},
4851-
"path": {
4852-
"type": "string",
4853-
"description": "Path passed to the TypeScript Go API as `tsserverPath`."
4861+
"tsgo": {
4862+
"$ref": "#/$defs/TsgoOptions",
4863+
"description": "**[Experimental]** Options for the `tsgo` generator.\n\nUsed when {@link GeneralOptions.generatorgenerator} is `'tsgo'` or\nTypeScript 7 is detected."
48544864
},
4855-
"vfs": {
4856-
"anyOf": [{ "const": false }, { "const": true }],
4857-
"description": "Supplies Rolldown-transformed source code to the `tsgo` API through a\nvirtual filesystem.",
4858-
"default": false
4859-
}
4860-
},
4861-
"required": [],
4862-
"additionalProperties": false
4863-
},
4864-
"FileExtensionInfo": {
4865-
"type": "object",
4866-
"properties": {
4867-
"extension": { "type": "string" },
4868-
"isMixedContent": { "anyOf": [{ "const": false }, { "const": true }] },
4869-
"scriptKind": {
4870-
"anyOf": [
4871-
{ "const": 0 },
4872-
{ "const": 1 },
4873-
{ "const": 2 },
4874-
{ "const": 3 },
4875-
{ "const": 4 },
4876-
{ "const": 5 },
4877-
{ "const": 6 },
4878-
{ "const": 7 }
4879-
]
4880-
}
4881-
},
4882-
"required": ["extension", "isMixedContent"],
4883-
"additionalProperties": false
4884-
},
4885-
"CustomLanguage": {
4886-
"type": "object",
4887-
"properties": {
4888-
"extensionPatterns": {
4865+
"customLanguages": {
48894866
"type": "array",
4890-
"items": {},
4891-
"description": "Patterns that identify files written in this language."
4867+
"items": { "$ref": "#/$defs/CustomLanguage" },
4868+
"description": "Registers non-standard source languages such as Vue or Astro.\n\nIf a language is supported via {@link https://volarjs.dev Volar},\n{@link CustomLanguage.volarTypeScript} and\n{@link CustomLanguage.createVolarPlugins} are both required. Volar\nlanguages require `tsc`; `tsgo` does not support custom languages."
48924869
},
4893-
"tsFileExtensionInfos": {
4894-
"type": "array",
4895-
"items": { "$ref": "#/$defs/FileExtensionInfo" },
4896-
"description": "Extra file extensions passed to the TypeScript compiler."
4897-
}
4898-
},
4899-
"required": ["extensionPatterns"],
4900-
"additionalProperties": false
4901-
},
4902-
"Options": {
4903-
"type": "object",
4904-
"properties": {
49054870
"generator": {
49064871
"anyOf": [
49074872
{ "const": "tsc" },
49084873
{ "const": "oxc" },
4909-
{ "const": "tsgo" },
4910-
{ "$ref": "#/$defs/Generator" }
4874+
{ "const": "tsgo" }
49114875
],
4912-
"description": "The generator used to produce declaration files.\n\n- `'tsc'` supports the full TypeScript type system.\n- `'oxc'` is faster but requires code compatible with\n [`isolatedDeclarations`](https://www.typescriptlang.org/tsconfig/#isolatedDeclarations).\n- `'tsgo'` uses the experimental TypeScript Go API.\n- A custom {@link Generator} implementation can be provided directly.\n\nWhen omitted, the plugin selects `'oxc'` for `isolatedDeclarations`,\n`'tsgo'` when TypeScript exposes the declaration emit API, and `'tsc'`\notherwise. Volar-based custom languages require `'tsc'`."
4876+
"description": "The generator used to produce declaration files.\n\n- `'tsc'` supports the full TypeScript type system.\n- `'oxc'` is faster but requires code compatible with\n [`isolatedDeclarations`](https://www.typescriptlang.org/tsconfig/#isolatedDeclarations).\n- `'tsgo'` uses the experimental TypeScript Go compiler.\n\nWhen omitted, the plugin selects `'oxc'` for `isolatedDeclarations`,\n`'tsgo'` for TypeScript 7, and `'tsc'` otherwise. Volar-based custom\nlanguages require `'tsc'`."
49134877
},
49144878
"entry": {
49154879
"anyOf": [
@@ -4938,19 +4902,19 @@
49384902
{ "const": false },
49394903
{ "const": true }
49404904
],
4941-
"description": "A `tsconfig.json` path, resolved relative to {@link cwd}.\n\nWhen omitted or `true`, the nearest config is discovered from {@link cwd}.\nSet to `false` to disable config loading. The `tsgo` generator requires a\nconfig file."
4905+
"description": "A `tsconfig.json` path, resolved relative to {@link cwd}.\n\nWhen omitted or `true`, the nearest config is discovered from {@link cwd}.\nSet to `false` to disable config loading."
49424906
},
49434907
"tsconfigRaw": {
49444908
"$ref": "#/$defs/Omit_89a7186e",
4945-
"description": "Raw `tsconfig.json` values merged over the loaded config.\nThe plugin's current `tsgo` implementation does not apply these overrides\nto the TypeScript program."
4909+
"description": "Raw `tsconfig.json` values merged over the loaded config."
49464910
},
49474911
"compilerOptions": {
49484912
"$ref": "#/$defs/CompilerOptions",
4949-
"description": "Compiler options merged over those loaded from `tsconfig.json`.\nIn the plugin's current `tsgo` implementation, these affect plugin behavior\nbut do not override the program's compiler options. Set those options in\nthe config file instead."
4913+
"description": "Compiler options merged over those loaded from `tsconfig.json`."
49504914
},
49514915
"sourcemap": {
49524916
"anyOf": [{ "const": false }, { "const": true }],
4953-
"description": "Emits declaration maps (`.d.ts.map`).\nWith `tsgo`, source mappings also require `compilerOptions.declarationMap`\nto be enabled in the on-disk config; `sourcemap: true` alone is insufficient."
4917+
"description": "Emits declaration maps (`.d.ts.map`)."
49544918
},
49554919
"resolver": {
49564920
"anyOf": [{ "const": "tsc" }, { "const": "oxc" }],
@@ -4971,26 +4935,42 @@
49714935
"$ref": "#/$defs/Logger",
49724936
"description": "Logger used for plugin messages."
49734937
},
4974-
"emitJs": {
4938+
"build": {
49754939
"anyOf": [{ "const": false }, { "const": true }],
4976-
"description": "Generates declarations for JavaScript files with JSDoc types."
4940+
"description": "Uses TypeScript build mode (`tsc -b`) and follows project references.",
4941+
"default": false
49774942
},
4978-
"tsc": {
4979-
"$ref": "#/$defs/TscOptions",
4980-
"description": "Options for the built-in `tsc` generator."
4943+
"incremental": {
4944+
"anyOf": [{ "const": false }, { "const": true }],
4945+
"description": "Persists build-mode outputs, including `.tsbuildinfo`, to disk for reuse.\nWhen disabled, build outputs stay in memory."
49814946
},
4982-
"oxc": {
4983-
"$ref": "#/$defs/Omit_e1330183",
4984-
"description": "Options for the `oxc` generator.\n\nThe top-level {@link Options.sourcemapsourcemap} option controls\ndeclaration maps."
4947+
"vue": {
4948+
"anyOf": [
4949+
{ "const": false },
4950+
{ "const": true },
4951+
{ "$ref": "#/$defs/VueLanguageOptions" }
4952+
],
4953+
"description": "Registers the built-in Vue language integration using `vue-tsc`.\n\nThis is a shortcut for a preconfigured {@link Options.customLanguages}\nentry and requires the `tsc` generator.",
4954+
"default": false
49854955
},
4986-
"tsgo": {
4987-
"$ref": "#/$defs/TsgoOptions",
4988-
"description": "**[Experimental]** Options for the TypeScript Go generator."
4956+
"parallel": {
4957+
"anyOf": [{ "const": false }, { "const": true }],
4958+
"description": "Runs `tsc` or `vue-tsc` in a separate process.",
4959+
"default": false
49894960
},
4990-
"customLanguages": {
4991-
"type": "array",
4992-
"items": { "$ref": "#/$defs/CustomLanguage" },
4993-
"description": "Registers non-standard source languages such as Vue or Astro.\n\nIf a language is supported via {@link https://volarjs.dev Volar},\n{@link CustomLanguage.volarTypeScript} and\n{@link CustomLanguage.createVolarPlugins} are both required. Volar\nlanguages require `tsc`. Non-Volar languages can use `tsgo` together\nwith {@link TsgoOptions.vfs`tsgo.vfs`}."
4961+
"eager": {
4962+
"anyOf": [{ "const": false }, { "const": true }],
4963+
"description": "Loads every file listed by `tsconfig.json` into the TypeScript program.\n\nUseful when one config covers multiple packages or entry points.",
4964+
"default": false
4965+
},
4966+
"newContext": {
4967+
"anyOf": [{ "const": false }, { "const": true }],
4968+
"description": "Uses an isolated TypeScript cache instead of the shared global context.",
4969+
"default": false
4970+
},
4971+
"emitJs": {
4972+
"anyOf": [{ "const": false }, { "const": true }],
4973+
"description": "Generates declarations for JavaScript files with JSDoc types."
49944974
}
49954975
},
49964976
"required": [],

‎tests/issues.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ describe('issues', () => {
9696
entry: ['src/dom/dom.ts', 'src/node/node.ts'],
9797
tsconfig: 'tsconfig.json',
9898
dts: {
99-
tsc: { build: true },
99+
build: true,
100100
},
101101
},
102102
})

0 commit comments

Comments
 (0)