Skip to content

Commit d6e9393

Browse files
committed
Merge tag '2.0.10' into 2.1-maintenance
Fedify 2.0.10
2 parents 8d4a367 + bac30c8 commit d6e9393

8 files changed

Lines changed: 130 additions & 1 deletion

File tree

CHANGES.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,23 @@ Version 2.1.3
88

99
To be released.
1010

11+
### @fedify/init
12+
13+
- Restored the npm entrypoint contract for `@fedify/init` after the `tsdown`
14+
upgrade started publishing `dist/*.mjs` files while the package metadata
15+
still exported `dist/*.js` and `dist/*.d.ts`. Node consumers such as
16+
`@fedify/cli` can start again, including `npx -y @fedify/cli --help`.
17+
[[#655]]
18+
19+
[#655]: https://github.com/fedify-dev/fedify/issues/655
20+
21+
### @fedify/create
22+
23+
- Restored the npm CLI entrypoint for `@fedify/create` so the published
24+
`bin` and `exports` paths once again point to generated `dist/mod.js`
25+
output instead of missing `dist/mod.js` files. This prevents the same
26+
packaging regression from breaking `npm init @fedify`. [[#655]]
27+
1128

1229
Version 2.1.2
1330
-------------
@@ -248,6 +265,35 @@ Released on March 24, 2026.
248265
[#599]: https://github.com/fedify-dev/fedify/pull/599
249266

250267

268+
Version 2.0.10
269+
--------------
270+
271+
Released on March 31, 2026.
272+
273+
### @fedify/lint
274+
275+
- Fixed the published ESM output paths for `@fedify/lint` so the package
276+
exports and type declarations point to the actual files generated by
277+
`tsdown`. This restores imports such as
278+
`import fedifyLint from "@fedify/lint"` in documentation examples and other
279+
TypeScript consumers.
280+
281+
### @fedify/init
282+
283+
- Restored the npm entrypoint contract for `@fedify/init` after the `tsdown`
284+
upgrade started publishing `dist/*.mjs` files while the package metadata
285+
still exported `dist/*.js` and `dist/*.d.ts`. Node consumers such as
286+
`@fedify/cli` can start again, including `npx -y @fedify/cli --help`.
287+
[[#655]]
288+
289+
### @fedify/create
290+
291+
- Restored the npm CLI entrypoint for `@fedify/create` so the published
292+
`bin` and `exports` paths once again point to generated `dist/mod.js`
293+
output instead of missing `dist/mod.js` files. This prevents the same
294+
packaging regression from breaking `npm init @fedify`. [[#655]]
295+
296+
251297
Version 2.0.9
252298
-------------
253299

packages/cli/src/startup.test.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { match } from "node:assert/strict";
2+
import { access, readFile } from "node:fs/promises";
3+
import { dirname, resolve } from "node:path";
4+
import test from "node:test";
5+
import { fileURLToPath } from "node:url";
6+
7+
const packageDir = resolve(dirname(fileURLToPath(import.meta.url)), "..");
8+
test("CLI build keeps the init bridge entrypoint", async () => {
9+
const entrypoint = resolve(packageDir, "dist/mod.js");
10+
const initBridge = resolve(packageDir, "dist/init/mod.js");
11+
await access(entrypoint);
12+
await access(initBridge);
13+
14+
const bridgeSource = await readFile(initBridge, "utf8");
15+
match(bridgeSource, /@fedify\/init/);
16+
});

packages/create/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@
5757
"build:self": "tsdown",
5858
"build": "pnpm --filter @fedify/create... run build:self",
5959
"prepack": "pnpm build",
60-
"prepublish": "pnpm build"
60+
"prepublish": "pnpm build",
61+
"pretest": "pnpm build",
62+
"test": "node --test --experimental-transform-types 'src/**/*.test.ts'"
6163
}
6264
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { strictEqual } from "node:assert/strict";
2+
import { access, readFile } from "node:fs/promises";
3+
import { dirname, resolve } from "node:path";
4+
import test from "node:test";
5+
import { fileURLToPath } from "node:url";
6+
7+
const packageDir = resolve(dirname(fileURLToPath(import.meta.url)), "..");
8+
9+
test(
10+
"package.json entrypoints match built create CLI",
11+
async () => {
12+
const packageJson = JSON.parse(
13+
await readFile(resolve(packageDir, "package.json"), "utf8"),
14+
);
15+
const binTarget = packageJson.bin["@fedify/create"] as string;
16+
const exportTarget = packageJson.exports as string;
17+
strictEqual(binTarget, "./dist/mod.js");
18+
strictEqual(exportTarget, "./dist/mod.js");
19+
await access(resolve(packageDir, binTarget));
20+
await access(resolve(packageDir, exportTarget));
21+
},
22+
);

packages/create/tsdown.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@ export default defineConfig({
44
entry: ["src/mod.ts"],
55
platform: "node",
66
unbundle: true,
7+
outExtensions() {
8+
return { js: ".js", dts: ".d.ts" };
9+
},
710
external: [/^node:/],
811
});

packages/init/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@
6767
"build": "pnpm --filter @fedify/init... run build:self",
6868
"prepack": "pnpm build",
6969
"prepublish": "pnpm build",
70+
"pretest": "pnpm build",
71+
"test": "node --test --experimental-transform-types 'src/**/*.test.ts'",
7072
"test-init": "deno task test-init"
7173
}
7274
}

packages/init/src/package.test.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { strictEqual } from "node:assert/strict";
2+
import { access, readFile } from "node:fs/promises";
3+
import { dirname, resolve } from "node:path";
4+
import test from "node:test";
5+
import { fileURLToPath } from "node:url";
6+
7+
const packageDir = resolve(dirname(fileURLToPath(import.meta.url)), "..");
8+
9+
async function assertTargetExists(path: string): Promise<void> {
10+
await access(resolve(packageDir, path));
11+
}
12+
13+
test(
14+
"package.json entrypoints match built init files",
15+
async () => {
16+
const packageJson = JSON.parse(
17+
await readFile(resolve(packageDir, "package.json"), "utf8"),
18+
);
19+
const exportMap = packageJson.exports["."];
20+
const targets = [
21+
packageJson.main,
22+
packageJson.types,
23+
exportMap.import,
24+
exportMap.types,
25+
] as string[];
26+
strictEqual(packageJson.main, "./dist/mod.js");
27+
strictEqual(packageJson.types, "./dist/mod.d.ts");
28+
strictEqual(exportMap.import, "./dist/mod.js");
29+
strictEqual(exportMap.types, "./dist/mod.d.ts");
30+
31+
for (const target of new Set(targets)) {
32+
await assertTargetExists(target);
33+
}
34+
},
35+
);

packages/init/tsdown.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ export default defineConfig({
66
entry: ["src/mod.ts", "src/test/mod.ts"],
77
platform: "node",
88
unbundle: true,
9+
outExtensions() {
10+
return { js: ".js", dts: ".d.ts" };
11+
},
912
external: [/^node:/],
1013
hooks: {
1114
"build:done": async (ctx) => {

0 commit comments

Comments
 (0)