Skip to content

Commit 6c1f6e6

Browse files
committed
Merge tag '2.0.7'
Fedify 2.0.7
2 parents f312d11 + 74d30b2 commit 6c1f6e6

44 files changed

Lines changed: 488 additions & 172 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.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.6 # Keep in sync with mise.toml
9+
deno-version: 2.7.7 # Keep in sync with mise.toml

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
.pnpm-store/
44
.vocab-codegen.lock/
55
dist/
6+
dist-tests/
67
node_modules/
78
package-lock.json
89
repomix-output.xml

CHANGES.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,48 @@ To be released.
184184
[#599]: https://github.com/fedify-dev/fedify/pull/599
185185

186186

187+
Version 2.0.7
188+
-------------
189+
190+
Released on March 22, 2026.
191+
192+
### @fedify/fedify
193+
194+
- Switched Fedify's source-based JSON-LD loading to the new
195+
`@fedify/vocab-runtime/jsonld` subpath so generated vocabulary code and
196+
Linked Data signature support no longer have to evaluate `jsonld` through
197+
a CommonJS-sensitive package root in Fresh 2, Deno, and other ESM-first
198+
runtimes. Fresh 2 development mode has been verified on Deno 2.7.7
199+
after an upstream Deno 2.7.6 dev server regression was fixed.
200+
[[#621], [#639]]
201+
202+
[#621]: https://github.com/fedify-dev/fedify/issues/621
203+
[#639]: https://github.com/fedify-dev/fedify/pull/639
204+
205+
### @fedify/vocab-runtime
206+
207+
- Fixed multibase public key handling to stop relying on the deprecated
208+
CommonJS-only `multicodec` package. This removes the Vite SSR crash that
209+
prevented Fresh 2 applications from importing `@fedify/fedify` with
210+
`TypeError: varint.encode is not a function`. Fresh 2 no longer needs a
211+
Vite externalization workaround for Fedify. [[#621], [#639]]
212+
213+
- Added the new `@fedify/vocab-runtime/jsonld` subpath export so generated
214+
vocabulary code and other Fedify runtime code can share a JSR-safe wrapper
215+
around `jsonld`'s ESM entrypoint instead of depending on fragile relative
216+
shims or the package-root import path. [[#621], [#639]]
217+
218+
### @fedify/init
219+
220+
- Revived removed `fedify init` options. [[#632], [#638] by ChanHaeng Lee]
221+
- `bare-bones` option for web framework.
222+
- `in-memory` option for key-value store.
223+
- `in-process` option for message queue.
224+
225+
[#632]: https://github.com/fedify-dev/fedify/issues/632
226+
[#638]: https://github.com/fedify-dev/fedify/pull/638
227+
228+
187229
Version 2.0.6
188230
-------------
189231

deno.lock

Lines changed: 3 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/cli.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ description: >-
55
features of the fedify command.
66
---
77

8+
<!-- deno-fmt-ignore-file -->
9+
810
`fedify`: CLI toolchain
911
=======================
1012

@@ -227,11 +229,12 @@ fedify init my-fedify-project
227229
The above command will start the interactive prompt to initialize a new Fedify
228230
project. It will ask you a few questions to set up the project:
229231

230-
- Web framework: [Hono], [Elysia], [Express], [Nitro], [Next.js], or [Astro]
232+
- Web framework: Bare-bones, [Hono], [Elysia], [Express], [Nitro], [Next.js],
233+
or [Astro]
231234
- Package manager: [Deno], [Bun], [npm], [pnpm], or [Yarn]
232-
- Message queue: [Redis], [PostgreSQL], [AMQP] (e.g., [RabbitMQ]),
235+
- Message queue: In-Process, [Redis], [PostgreSQL], [AMQP] (e.g., [RabbitMQ]),
233236
or [Deno KV] (if Deno)
234-
- Key–value store: [Redis], [PostgreSQL], or [Deno KV] (if Deno)
237+
- Key–value store: In-Memory, [Redis], [PostgreSQL], or [Deno KV] (if Deno)
235238

236239
> [!TIP]
237240
> Projects created with `fedify init` automatically include [`@fedify/lint`]
@@ -282,6 +285,8 @@ option. The available options are:
282285
You can specify the web framework to integrate with Fedify by using
283286
the `-w`/`--web-framework` option. The available options are:
284287

288+
- `bare-bones`: A minimal setup without any web framework integration, but in
289+
Node.js, [Hono] is used for a simple adapter for a lightweight experience.
285290
- `hono`: [Hono]
286291
- `nitro`: [Nitro]
287292
- `next`: [Next.js]
@@ -294,6 +299,8 @@ the `-w`/`--web-framework` option. The available options are:
294299
You can specify the key–value store to use by using the `-k`/`--kv-store`
295300
option. The available options are:
296301

302+
- `in-memory`: An in-memory key–value store that does not persist data across
303+
restarts. This is useful for testing and development purposes.
297304
- `redis`: [Redis]
298305
- `postgres`: [PostgreSQL]
299306
- `denokv`: [Deno KV] (if Deno)
@@ -303,6 +310,8 @@ option. The available options are:
303310
You can specify the message queue to use by using the `-m`/`--message-queue`
304311
option. The available options are:
305312

313+
- `in-process`: An in-process message queue that does not persist messages
314+
across restarts. This is useful for testing and development purposes.
306315
- `redis`: [Redis]
307316
- `postgres`: [PostgreSQL]
308317
- `amqp`: [AMQP] (e.g., [RabbitMQ])

docs/manual/integration.md

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -888,30 +888,10 @@ deno add jsr:@fedify/fresh
888888
> [!NOTE]
889889
> The `@fedify/fresh` package only supports Fresh 2.x.
890890
891-
> [!WARNING]
892-
> Due to `@fedify/fedify`'s `multicodec` dependency CJS issue, you should
893-
> externalize `@fedify/fedify` in `vite.config.ts`.
894-
>
895-
> ~~~~ typescript
896-
> import { fresh } from "@fresh/plugin-vite";
897-
> import { defineConfig } from "vite";
898-
>
899-
> export default defineConfig({
900-
> plugins: [fresh()],
901-
> ssr: {
902-
> external: [
903-
> "@fedify/fedify",
904-
> ],
905-
> },
906-
> build: {
907-
> rollupOptions: {
908-
> external: [
909-
> "@fedify/fedify",
910-
> ],
911-
> },
912-
> },
913-
> });
914-
> ~~~~
891+
> [!NOTE]
892+
> Fresh 2 development mode has been verified with Deno 2.7.7. Deno 2.7.6 had
893+
> an upstream Vite/esbuild regression that caused
894+
> `Callback called multiple times` before Fedify code could run.
915895
916896
> [!WARNING]
917897
> Due to `@fedify/fedify` use `Temporal` inside, you should add `deno.unstable`

examples/fresh/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ Fedify–Fresh integration example
44
This is a simple example of how to integrate Fedify into an [Fresh]
55
application.
66

7+
Use Deno 2.7.7 or later. Deno 2.7.6 had an upstream Fresh/Vite dev-server
8+
regression that caused `Callback called multiple times` errors before Fedify
9+
code could run.
10+
711
[Fresh]: https://fresh.deno.dev/
812

913

@@ -26,7 +30,7 @@ Running the example
2630
3. Move to example folder
2731

2832
~~~~ sh
29-
cd ../../examples/fresh
33+
cd examples/fresh
3034
~~~~
3135

3236
4. Start the server:

examples/fresh/federation.ts

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,35 @@
11
import { createFederation, MemoryKvStore } from "@fedify/fedify";
2+
import { Person } from "@fedify/vocab";
23

34
// Create the federation instance
45
export const federation = createFederation<void>({
56
kv: new MemoryKvStore(),
67
});
78

89
// Set up a NodeInfo dispatcher for the federation instance
9-
federation
10-
.setNodeInfoDispatcher("/nodeinfo/2.1", () => {
11-
return {
12-
software: {
13-
name: "fresh-example", // Lowercase, digits, and hyphens only.
14-
version: "1.0.0",
15-
homepage: new URL("https://your-software.com/"),
16-
},
17-
protocols: ["activitypub"],
18-
usage: {
19-
// Usage statistics is hard-coded here for demonstration purposes.
20-
// You should replace these with real statistics:
21-
users: { total: 100, activeHalfyear: 50, activeMonth: 20 },
22-
localPosts: 1000,
23-
localComments: 2000,
24-
},
25-
};
10+
federation.setNodeInfoDispatcher("/nodeinfo/2.1", () => {
11+
return {
12+
software: {
13+
name: "fresh-example", // Lowercase, digits, and hyphens only.
14+
version: "1.0.0",
15+
homepage: new URL("https://your-software.com/"),
16+
},
17+
protocols: ["activitypub"],
18+
usage: {
19+
// Usage statistics is hard-coded here for demonstration purposes.
20+
// You should replace these with real statistics:
21+
users: { total: 100, activeHalfyear: 50, activeMonth: 20 },
22+
localPosts: 1000,
23+
localComments: 2000,
24+
},
25+
};
26+
});
27+
28+
federation.setActorDispatcher("/users/{identifier}", (ctx, identifier) => {
29+
if (identifier !== "sample") return null;
30+
return new Person({
31+
id: ctx.getActorUri(identifier),
32+
name: "Sample",
33+
preferredUsername: identifier,
2634
});
35+
});

examples/fresh/vite.config.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,4 @@ import { defineConfig } from "vite";
33

44
export default defineConfig({
55
plugins: [fresh()],
6-
ssr: {
7-
external: [
8-
"@fedify/fedify",
9-
],
10-
},
11-
build: {
12-
rollupOptions: {
13-
external: [
14-
"@fedify/fedify",
15-
],
16-
},
17-
},
186
});

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.6"
3+
deno = "2.7.7"
44
node = "22"
55
pnpm = "10.28.0"
66

0 commit comments

Comments
 (0)