rolldown-plugin-dts 0.27.2 → 0.27.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +4 -4
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1110,10 +1110,6 @@ function collectJsonExports(code) {
1110
1110
  //#region src/options.ts
1111
1111
  let warnedTsgo = false;
1112
1112
  function resolveOptions({ entry, cwd = process.cwd(), dtsInput = false, emitDtsOnly = false, tsconfig, tsconfigRaw: overriddenTsconfigRaw = {}, compilerOptions = {}, sourcemap, resolver = "oxc", cjsDefault = false, sideEffects = false, build = false, incremental = false, vue = false, tsMacro = false, parallel = false, eager = false, newContext = false, emitJs, oxc, tsgo }) {
1113
- if (tsgo == null) tsgo = isTsgo() && !vue && !tsMacro && !oxc;
1114
- if (tsgo === true) tsgo = {};
1115
- else if (typeof tsgo === "object" && tsgo.enabled === false) tsgo = false;
1116
- if (!tsgo && isTsgo()) throw new Error("[rolldown-plugin-dts] TypeScript 7.0 is installed, but the `tsgo` option is disabled. Please enable it to use TypeScript 7.0 features.");
1117
1113
  let resolvedTsconfig;
1118
1114
  if (tsconfig === true || tsconfig == null) {
1119
1115
  const { config, path } = getTsconfig(cwd) || {};
@@ -1135,12 +1131,16 @@ function resolveOptions({ entry, cwd = process.cwd(), dtsInput = false, emitDtsO
1135
1131
  ...overriddenTsconfigRaw,
1136
1132
  compilerOptions
1137
1133
  };
1134
+ if (typeof tsgo === "object" && tsgo.enabled === false) tsgo = false;
1138
1135
  oxc ??= !!(compilerOptions?.isolatedDeclarations && !vue && !tsgo && !tsMacro);
1139
1136
  if (oxc === true) oxc = {};
1140
1137
  if (oxc) {
1141
1138
  oxc.stripInternal ??= !!compilerOptions?.stripInternal;
1142
1139
  oxc.sourcemap = !!compilerOptions.declarationMap;
1143
1140
  }
1141
+ if (tsgo == null) tsgo = isTsgo() && !vue && !tsMacro && !oxc;
1142
+ if (tsgo === true) tsgo = {};
1143
+ if (!tsgo && isTsgo()) throw new Error("[rolldown-plugin-dts] TypeScript 7.0 is installed, but the `tsgo` option is disabled. Please enable it to use TypeScript 7.0 features.");
1144
1144
  emitJs ??= !!(compilerOptions.checkJs || compilerOptions.allowJs);
1145
1145
  if (tsgo) {
1146
1146
  if (vue) throw new Error("[rolldown-plugin-dts] The `tsgo` option is not compatible with the `vue` option. Please disable one of them.");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rolldown-plugin-dts",
3
3
  "type": "module",
4
- "version": "0.27.2",
4
+ "version": "0.27.3",
5
5
  "description": "A Rolldown plugin to generate and bundle dts files.",
6
6
  "author": "Kevin Deng <sxzz@sxzz.moe>",
7
7
  "license": "MIT",