rolldown-plugin-dts 0.8.3 → 0.8.5

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.js +4 -2
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -727,7 +727,9 @@ function createGeneratePlugin({ tsconfig, compilerOptions, isolatedDeclarations,
727
727
  meta
728
728
  };
729
729
  }
730
- let resolution = await this.resolve(id, filename_dts_to(importer, "ts"));
730
+ const tsImporter = filename_dts_to(importer, "ts");
731
+ let resolution = await this.resolve(id, tsImporter);
732
+ if (!resolution && !id.endsWith(".d")) resolution = await this.resolve(`${id}.d`, tsImporter);
731
733
  if (RE_NODE_MODULES.test(resolution?.id || id) || !isRelative(resolution?.id || id)) {
732
734
  let shouldResolve;
733
735
  if (typeof resolve === "boolean") shouldResolve = resolve;
@@ -751,7 +753,7 @@ function createGeneratePlugin({ tsconfig, compilerOptions, isolatedDeclarations,
751
753
  if (!resolution) return;
752
754
  dtsId = resolution.id;
753
755
  } else {
754
- dtsId = filename_ts_to_dts(resolution.id);
756
+ dtsId = RE_DTS.test(resolution.id) ? resolution.id : filename_ts_to_dts(resolution.id);
755
757
  if (dtsMap.has(dtsId)) return {
756
758
  id: dtsId,
757
759
  meta
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rolldown-plugin-dts",
3
- "version": "0.8.3",
3
+ "version": "0.8.5",
4
4
  "description": "A Rolldown plugin to bundle dts files",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -38,11 +38,11 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "debug": "^4.4.0",
41
- "dts-resolver": "^1.0.0",
41
+ "dts-resolver": "^1.0.1",
42
42
  "get-tsconfig": "^4.10.0",
43
43
  "magic-string-ast": "^0.9.1",
44
- "oxc-parser": "^0.65.0",
45
- "oxc-transform": "^0.65.0"
44
+ "oxc-parser": "^0.66.0",
45
+ "oxc-transform": "^0.66.0"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@sxzz/eslint-config": "^6.1.2",
@@ -58,7 +58,7 @@
58
58
  "prettier": "^3.5.3",
59
59
  "rolldown": "1.0.0-beta.7-commit.c2596d3",
60
60
  "rollup-plugin-dts": "^6.2.1",
61
- "tsdown": "^0.9.2",
61
+ "tsdown": "^0.9.6",
62
62
  "tsx": "^4.19.3",
63
63
  "typescript": "^5.8.3",
64
64
  "vitest": "^3.1.2"