Skip to content

Commit 7f0ed10

Browse files
committed
Fix lint package module outputs
Align the @fedify/lint package metadata with the files produced by tsdown. This makes the ESM build emit .js and .d.ts files instead of .mjs and .d.mts, and updates package.json to point at the correct type entry points.
1 parent 767193e commit 7f0ed10

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

CHANGES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ Version 2.0.10
88

99
To be released.
1010

11+
### @fedify/lint
12+
13+
- Fixed the published ESM output paths for `@fedify/lint` so the package
14+
exports and type declarations point to the actual files generated by
15+
`tsdown`. This restores imports such as `import fedifyLint from
16+
"@fedify/lint"` in documentation examples and other TypeScript consumers.
17+
1118

1219
Version 2.0.9
1320
-------------

packages/lint/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,14 @@
3232
"type": "module",
3333
"main": "./dist/index.cjs",
3434
"module": "./dist/index.js",
35-
"types": "./dist/index.d.cts",
35+
"types": "./dist/index.d.ts",
3636
"exports": {
3737
".": {
38+
"types": {
39+
"import": "./dist/index.d.ts",
40+
"require": "./dist/index.d.cts",
41+
"default": "./dist/index.d.ts"
42+
},
3843
"import": "./dist/index.js",
3944
"require": "./dist/index.cjs"
4045
},

packages/lint/tsdown.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@ export default defineConfig({
55
dts: { compilerOptions: { isolatedDeclarations: true, declaration: true } },
66
format: ["esm", "cjs"],
77
platform: "node",
8+
outExtensions({ format }) {
9+
if (format === "cjs") return { js: ".cjs", dts: ".d.cts" };
10+
return { js: ".js", dts: ".d.ts" };
11+
},
812
});

0 commit comments

Comments
 (0)