Skip to content

Commit ece5910

Browse files
committed
Merge tag '2.1.3'
Fedify 2.1.3
2 parents 7f7a1e9 + b6dcc14 commit ece5910

File tree

8 files changed

+136
-1
lines changed

8 files changed

+136
-1
lines changed

CHANGES.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,29 @@ To be released.
2121
maximum number of redirects followed by `getDocumentLoader()`.
2222

2323

24+
Version 2.1.3
25+
-------------
26+
27+
Released on March 31, 2026.
28+
29+
### @fedify/init
30+
31+
- Restored the npm entrypoint contract for `@fedify/init` after the `tsdown`
32+
upgrade started publishing `dist/*.mjs` files while the package metadata
33+
still exported `dist/*.js` and `dist/*.d.ts`. Node consumers such as
34+
`@fedify/cli` can start again, including `npx -y @fedify/cli --help`.
35+
[[#655]]
36+
37+
[#655]: https://github.com/fedify-dev/fedify/issues/655
38+
39+
### @fedify/create
40+
41+
- Restored the npm CLI entrypoint for `@fedify/create` so the published
42+
`bin` and `exports` paths once again point to generated `dist/mod.js`
43+
output instead of missing `dist/mod.js` files. This prevents the same
44+
packaging regression from breaking `npm init @fedify`. [[#655]]
45+
46+
2447
Version 2.1.2
2548
-------------
2649

@@ -260,6 +283,35 @@ Released on March 24, 2026.
260283
[#599]: https://github.com/fedify-dev/fedify/pull/599
261284

262285

286+
Version 2.0.10
287+
--------------
288+
289+
Released on March 31, 2026.
290+
291+
### @fedify/lint
292+
293+
- Fixed the published ESM output paths for `@fedify/lint` so the package
294+
exports and type declarations point to the actual files generated by
295+
`tsdown`. This restores imports such as
296+
`import fedifyLint from "@fedify/lint"` in documentation examples and other
297+
TypeScript consumers.
298+
299+
### @fedify/init
300+
301+
- Restored the npm entrypoint contract for `@fedify/init` after the `tsdown`
302+
upgrade started publishing `dist/*.mjs` files while the package metadata
303+
still exported `dist/*.js` and `dist/*.d.ts`. Node consumers such as
304+
`@fedify/cli` can start again, including `npx -y @fedify/cli --help`.
305+
[[#655]]
306+
307+
### @fedify/create
308+
309+
- Restored the npm CLI entrypoint for `@fedify/create` so the published
310+
`bin` and `exports` paths once again point to generated `dist/mod.js`
311+
output instead of missing `dist/mod.js` files. This prevents the same
312+
packaging regression from breaking `npm init @fedify`. [[#655]]
313+
314+
263315
Version 2.0.9
264316
-------------
265317

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)