Skip to content

Commit b4d238a

Browse files
committed
Merge tag '2.0.6'
Fedify 2.0.6
2 parents e09fd1b + 137332e commit b4d238a

28 files changed

Lines changed: 178 additions & 131 deletions

File tree

.github/actions/setup-deno/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ runs:
66
steps:
77
- uses: denoland/setup-deno@v2
88
with:
9-
deno-version: 2.7.5 # Keep in sync with mise.toml
9+
deno-version: 2.7.6 # Keep in sync with mise.toml

CHANGES.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,34 @@ To be released.
172172
[#599]: https://github.com/fedify-dev/fedify/pull/599
173173

174174

175+
Version 2.0.6
176+
-------------
177+
178+
Released on March 19, 2026.
179+
180+
### @fedify/init
181+
182+
- Fixed `fedify init` crashing when `@fedify/cli` or `@fedify/init` is
183+
executed through the JSR/Deno distribution. `import.meta.dirname` is
184+
`undefined` for remote JSR modules, so the template loading and
185+
repository-relative path logic has been made safe for published JSR
186+
execution. [[#624], [#633]]
187+
188+
[#624]: https://github.com/fedify-dev/fedify/issues/624
189+
[#633]: https://github.com/fedify-dev/fedify/pull/633
190+
191+
### @fedify/vocab-runtime
192+
193+
- Added <http://joinmastodon.org/ns> to preloaded JSON-LD contexts.
194+
This URL has never served a real JSON-LD context document (Mastodon
195+
has always inlined the term definitions), but some ActivityPub
196+
implementations put it as a bare URL in their `@context`, causing
197+
JSON-LD processors to fail with a 404. [[#630], [#631]]
198+
199+
[#630]: https://github.com/fedify-dev/fedify/issues/630
200+
[#631]: https://github.com/fedify-dev/fedify/pull/631
201+
202+
175203
Version 2.0.5
176204
-------------
177205

docs/cli.md

Lines changed: 17 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,11 @@ fedify init my-fedify-project
227227
The above command will start the interactive prompt to initialize a new Fedify
228228
project. It will ask you a few questions to set up the project:
229229

230-
- Package manager: [Deno], [Bun], [npm], [pnpm], or [Yarn]
231230
- Web framework: [Hono], [Elysia], [Express], [Nitro], [Next.js], or [Astro]
232-
- key–value store: In-memory, [Redis], [PostgreSQL], or [Deno KV] (if Deno)
233-
- Message queue: In-memory, [Redis], [PostgreSQL], [AMQP] (e.g., [RabbitMQ]),
231+
- Package manager: [Deno], [Bun], [npm], [pnpm], or [Yarn]
232+
- Message queue: [Redis], [PostgreSQL], [AMQP] (e.g., [RabbitMQ]),
234233
or [Deno KV] (if Deno)
234+
- Key–value store: [Redis], [PostgreSQL], or [Deno KV] (if Deno)
235235

236236
> [!TIP]
237237
> Projects created with `fedify init` automatically include [`@fedify/lint`]
@@ -249,59 +249,45 @@ project. It will ask you a few questions to set up the project:
249249
Alternatively, you can specify the options in the command line to skip some of
250250
interactive prompts:
251251

252-
[npm]: https://www.npmjs.com/
253-
[pnpm]: https://pnpm.io/
254-
[Yarn]: https://yarnpkg.com/
255252
[Hono]: https://hono.dev/
256253
[Elysia]: https://elysiajs.com/
257254
[Express]: https://expressjs.com/
258255
[Nitro]: https://nitro.unjs.io/
259256
[Next.js]: https://nextjs.org/
260257
[Astro]: https://astro.build/
258+
[npm]: https://www.npmjs.com/
259+
[pnpm]: https://pnpm.io/
260+
[Yarn]: https://yarnpkg.com/
261261
[Redis]: https://redis.io/
262262
[PostgreSQL]: https://www.postgresql.org/
263-
[Deno KV]: https://deno.com/kv
264263
[AMQP]: https://www.amqp.org/
265264
[RabbitMQ]: https://www.rabbitmq.com/
265+
[Deno KV]: https://deno.com/kv
266266
[`@fedify/lint`]: /manual/lint
267267
[`@fedify/create`]: https://www.npmjs.com/package/@fedify/create
268268

269-
### `-r`/`--runtime`: JavaScript runtime
269+
### `-p`/`--package-manager`: Package manager
270270

271-
You can specify the JavaScript runtime by using the `-r`/`--runtime` option.
272-
The available options are:
271+
You can specify the package manager by using the `-p`/`--package-manager`
272+
option. The available options are:
273273

274274
- `deno`: [Deno]
275-
- `bun`: [Bun]
276-
- `node`: [Node.js]
277-
278-
### `-p`/`--package-manager`: Node.js package manager
279-
280-
If you choose Node.js as the JavaScript runtime, you can specify the package
281-
manager by using the `-p`/`--package-manager` option. The available options
282-
are:
283-
284-
- `npm`: [npm]
285275
- `pnpm`: [pnpm]
276+
- `bun`: [Bun]
286277
- `yarn`: [Yarn]
287-
288-
It's ignored if you choose Deno or Bun as the JavaScript runtime.
278+
- `npm`: [npm]
289279

290280
### `-w`/`--web-framework`: Web framework
291281

292282
You can specify the web framework to integrate with Fedify by using
293283
the `-w`/`--web-framework` option. The available options are:
294284

295-
- `fresh`: [Fresh] (if Deno)
296285
- `hono`: [Hono]
297-
- `express`: [Express] (unless Deno)
298-
- `nitro`: [Nitro] (unless Deno)
286+
- `nitro`: [Nitro]
287+
- `next`: [Next.js]
299288
- `elysia`: [Elysia]
300289
- `astro`: [Astro]
301-
302-
If it's omitted, no web framework will be integrated.
303-
304-
[Fresh]: https://fresh.deno.dev/
290+
- `express`: [Express]
305291

306292
### `-k`/`--kv-store`: key–value store
307293

@@ -312,22 +298,16 @@ option. The available options are:
312298
- `postgres`: [PostgreSQL]
313299
- `denokv`: [Deno KV] (if Deno)
314300

315-
If it's omitted, the in-memory key–value store (which is for development
316-
purpose) will be used.
301+
### `-m`/`--message-queue`: Message queue
317302

318-
### `-q`/`--message-queue`: Message queue
319-
320-
You can specify the message queue to use by using the `-q`/`--message-queue`
303+
You can specify the message queue to use by using the `-m`/`--message-queue`
321304
option. The available options are:
322305

323306
- `redis`: [Redis]
324307
- `postgres`: [PostgreSQL]
325308
- `amqp`: [AMQP] (e.g., [RabbitMQ])
326309
- `denokv`: [Deno KV] (if Deno)
327310

328-
If it's omitted, the in-process message queue (which is for development purpose)
329-
will be used.
330-
331311
### `--dry-run`: Preview without creating files
332312

333313
*This option is available since Fedify 1.8.0.*

examples/fresh/deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"dom.iterable",
3333
"deno.ns",
3434
"deno.unstable",
35-
"deno.temporal"
35+
"esnext.temporal"
3636
],
3737
"jsx": "precompile",
3838
"jsxImportSource": "preact",

mise.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tools]
22
bun = "1.2.22"
3-
deno = "2.7.5"
3+
deno = "2.7.6"
44
node = "22"
55
pnpm = "10.28.0"
66

packages/fedify/tsdown.config.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,15 @@ export default [
4040
...(await Array.fromAsync(glob(`src/**/*.test.ts`)))
4141
.map((f) => f.replace(sep, "/")),
4242
],
43-
external: [/^node:/],
43+
external: [/^node:/, "@fedify/fixture"],
44+
// Bundle @fedify/fixture back in for src/testing/ files (needed for
45+
// cfworkers), while keeping it external for test files so that
46+
// pnpm pack --recursive does not try to resolve the private package:
47+
noExternal: (id: string, importer: string | undefined) => {
48+
if (id !== "@fedify/fixture") return false;
49+
const normalized = importer?.replaceAll(sep, "/");
50+
return normalized?.includes("/src/testing/") ?? false;
51+
},
4452
inputOptions: {
4553
onwarn(warning, defaultHandler) {
4654
if (

packages/init/src/action/configs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import vscodeSettings from "../json/vscode-settings.json" with {
3232
};
3333
import type { InitCommandData } from "../types.ts";
3434
import { merge } from "../utils.ts";
35-
import { PACKAGES_PATH } from "./const.ts";
35+
import { getPackagesPath } from "./const.ts";
3636
import { getDependencies, getDevDependencies, joinDepsReg } from "./deps.ts";
3737

3838
const logger = getLogger(["fedify", "init", "action", "configs"]);
@@ -128,7 +128,7 @@ const getLinks = <
128128
keys as (obj: object) => Iterable<string>,
129129
filter((dep) => dep.includes("@fedify/")),
130130
map((dep) => dep.replace("@fedify/", "")),
131-
map((dep) => joinPath(PACKAGES_PATH, dep)),
131+
map((dep) => joinPath(getPackagesPath(), dep)),
132132
map(realpathSync as (path: string) => string),
133133
map((realAbsolutePath) => relative(realpathSync(dir), realAbsolutePath)),
134134
toArray,

packages/init/src/action/const.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import { join as joinPath } from "node:path";
44
* Absolute path to the monorepo *packages/* directory.
55
* Used in test mode to resolve local `@fedify/*` package paths.
66
*/
7-
export const PACKAGES_PATH = joinPath(
8-
import.meta.dirname!, // action
9-
"..", // src
10-
"..", // init
11-
"..", // packages
12-
);
7+
export const getPackagesPath = (): string =>
8+
joinPath(
9+
import.meta.dirname!, // action
10+
"..", // src
11+
"..", // init
12+
"..", // packages
13+
);

packages/init/src/action/deps.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { join as joinPath } from "node:path";
1111
import { PACKAGE_VERSION } from "../lib.ts";
1212
import type { InitCommandData, PackageManager } from "../types.ts";
1313
import { merge, replace } from "../utils.ts";
14-
import { PACKAGES_PATH } from "./const.ts";
14+
import { getPackagesPath } from "./const.ts";
1515
import { isDeno } from "./utils.ts";
1616

1717
type Deps = Record<string, string>;
@@ -71,7 +71,7 @@ const convertFedifyToLocal = (name: string): string =>
7171
pipe(
7272
name,
7373
replace("@fedify/", ""),
74-
(pkg) => joinPath(PACKAGES_PATH, pkg),
74+
(pkg) => joinPath(getPackagesPath(), pkg),
7575
);
7676

7777
/** Gathers all devDependencies required for the project based on the

packages/init/src/action/patch.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ export const recommendPatchFiles = (data: InitCommandData) =>
5252
* @param data - The initialization command data
5353
* @returns A record of file paths to their string content
5454
*/
55-
const getFiles = <
55+
const getFiles = async <
5656
T extends InitCommandData,
5757
>(data: T) => ({
58-
[data.initializer.federationFile]: loadFederation({
58+
[data.initializer.federationFile]: await loadFederation({
5959
imports: getImports(data),
6060
...data,
6161
}),
62-
[data.initializer.loggingFile]: loadLogging(data),
62+
[data.initializer.loggingFile]: await loadLogging(data),
6363
".env": stringifyEnvs(data.env),
6464
...data.initializer.files,
6565
});

0 commit comments

Comments
 (0)