Skip to content

Commit 82d1a44

Browse files
committed
Merge branch 'main' into next
2 parents 30fe43c + 8402d9f commit 82d1a44

Some content is hidden

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

54 files changed

+2265
-104
lines changed

.github/workflows/build.yaml

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -416,31 +416,40 @@ jobs:
416416
message: |
417417
The latest push to this pull request has been published to JSR and npm as a pre-release:
418418
419-
| Package | Version | JSR | npm |
420-
| ---------------- | --------------------------------------- | --------------------------- | --------------------------- |
421-
| @fedify/fedify | ${{ steps.versioning.outputs.version }} | [JSR][jsr:@fedify/fedify] | [npm][npm:@fedify/fedify] |
422-
| @fedify/cli | ${{ steps.versioning.outputs.version }} | [JSR][jsr:@fedify/cli] | |
423-
| @fedify/amqp | ${{ steps.versioning.outputs.version }} | [JSR][jsr:@fedify/amqp] | [npm][npm:@fedify/amqp] |
424-
| @fedify/elysia | ${{ steps.versioning.outputs.version }} | | [npm][npm:@fedify/elysia] |
425-
| @fedify/express | ${{ steps.versioning.outputs.version }} | [JSR][jsr:@fedify/express] | [npm][npm:@fedify/express] |
426-
| @fedify/h3 | ${{ steps.versioning.outputs.version }} | [JSR][jsr:@fedify/h3] | [npm][npm:@fedify/h3] |
427-
| @fedify/nestjs | ${{ steps.versioning.outputs.version }} | | [npm][npm:@fedify/nestjs] |
428-
| @fedify/next | ${{ steps.versioning.outputs.version }} | | [npm][npm:@fedify/next] |
429-
| @fedify/postgres | ${{ steps.versioning.outputs.version }} | [JSR][jsr:@fedify/postgres] | [npm][npm:@fedify/postgres] |
430-
| @fedify/redis | ${{ steps.versioning.outputs.version }} | [JSR][jsr:@fedify/redis] | [npm][npm:@fedify/redis] |
431-
| @fedify/sqlite | ${{ steps.versioning.outputs.version }} | [JSR][jsr:@fedify/sqlite] | [npm][npm:@fedify/sqlite] |
432-
| @fedify/testing | ${{ steps.versioning.outputs.version }} | [JSR][jsr:@fedify/testing] | [npm][npm:@fedify/testing] |
419+
| Package | Version | JSR | npm |
420+
| ----------------- | --------------------------------------- | ---------------------------- | ---------------------------- |
421+
| @fedify/fedify | ${{ steps.versioning.outputs.version }} | [JSR][jsr:@fedify/fedify] | [npm][npm:@fedify/fedify] |
422+
| @fedify/cli | ${{ steps.versioning.outputs.version }} | [JSR][jsr:@fedify/cli] | |
423+
| @fedify/amqp | ${{ steps.versioning.outputs.version }} | [JSR][jsr:@fedify/amqp] | [npm][npm:@fedify/amqp] |
424+
| @fedify/cfworkers | ${{ steps.versioning.outputs.version }} | [JSR][jsr:@fedify/cfworkers] | [npm][npm:@fedify/cfworkers] |
425+
| @fedify/denokv | ${{ steps.versioning.outputs.version }} | [JSR][jsr:@fedify/denokv] | |
426+
| @fedify/elysia | ${{ steps.versioning.outputs.version }} | | [npm][npm:@fedify/elysia] |
427+
| @fedify/express | ${{ steps.versioning.outputs.version }} | [JSR][jsr:@fedify/express] | [npm][npm:@fedify/express] |
428+
| @fedify/h3 | ${{ steps.versioning.outputs.version }} | [JSR][jsr:@fedify/h3] | [npm][npm:@fedify/h3] |
429+
| @fedify/hono | ${{ steps.versioning.outputs.version }} | [JSR][jsr:@fedify/hono] | [npm][npm:@fedify/hono] |
430+
| @fedify/nestjs | ${{ steps.versioning.outputs.version }} | | [npm][npm:@fedify/nestjs] |
431+
| @fedify/next | ${{ steps.versioning.outputs.version }} | | [npm][npm:@fedify/next] |
432+
| @fedify/postgres | ${{ steps.versioning.outputs.version }} | [JSR][jsr:@fedify/postgres] | [npm][npm:@fedify/postgres] |
433+
| @fedify/redis | ${{ steps.versioning.outputs.version }} | [JSR][jsr:@fedify/redis] | [npm][npm:@fedify/redis] |
434+
| @fedify/sqlite | ${{ steps.versioning.outputs.version }} | [JSR][jsr:@fedify/sqlite] | [npm][npm:@fedify/sqlite] |
435+
| @fedify/sveltekit | ${{ steps.versioning.outputs.version }} | [JSR][jsr:@fedify/sveltekit] | [npm][npm:@fedify/sveltekit] |
436+
| @fedify/testing | ${{ steps.versioning.outputs.version }} | [JSR][jsr:@fedify/testing] | [npm][npm:@fedify/testing] |
433437
434438
[jsr:@fedify/fedify]: https://jsr.io/@fedify/fedify@${{ steps.versioning.outputs.version }}
435439
[npm:@fedify/fedify]: https://www.npmjs.com/package/@fedify/fedify/v/${{ steps.versioning.outputs.short_version }}
436440
[jsr:@fedify/cli]: https://jsr.io/@fedify/cli@${{ steps.versioning.outputs.version }}
437441
[jsr:@fedify/amqp]: https://jsr.io/@fedify/amqp@${{ steps.versioning.outputs.version }}
438442
[npm:@fedify/amqp]: https://www.npmjs.com/package/@fedify/amqp/v/${{ steps.versioning.outputs.short_version }}
443+
[jsr:@fedify/cfworkers]: https://jsr.io/@fedify/cfworkers@${{ steps.versioning.outputs.version }}
444+
[npm:@fedify/cfworkers]: https://www.npmjs.com/package/@fedify/cfworkers/v/${{ steps.versioning.outputs.short_version }}
445+
[jsr:@fedify/denokv]: https://jsr.io/@fedify/denokv@${{ steps.versioning.outputs.version }}
439446
[npm:@fedify/elysia]: https://www.npmjs.com/package/@fedify/elysia/v/${{ steps.versioning.outputs.short_version }}
440447
[jsr:@fedify/express]: https://jsr.io/@fedify/express@${{ steps.versioning.outputs.version }}
441448
[npm:@fedify/express]: https://www.npmjs.com/package/@fedify/express/v/${{ steps.versioning.outputs.short_version }}
442449
[jsr:@fedify/h3]: https://jsr.io/@fedify/h3@${{ steps.versioning.outputs.version }}
443450
[npm:@fedify/h3]: https://www.npmjs.com/package/@fedify/h3/v/${{ steps.versioning.outputs.short_version }}
451+
[jsr:@fedify/hono]: https://jsr.io/@fedify/hono@${{ steps.versioning.outputs.version }}
452+
[npm:@fedify/hono]: https://www.npmjs.com/package/@fedify/hono/v/${{ steps.versioning.outputs.short_version }}
444453
[npm:@fedify/nestjs]: https://www.npmjs.com/package/@fedify/nestjs/v/${{ steps.versioning.outputs.short_version }}
445454
[npm:@fedify/next]: https://www.npmjs.com/package/@fedify/next/v/${{ steps.versioning.outputs.short_version }}
446455
[jsr:@fedify/postgres]: https://jsr.io/@fedify/postgres@${{ steps.versioning.outputs.version }}
@@ -449,6 +458,8 @@ jobs:
449458
[npm:@fedify/redis]: https://www.npmjs.com/package/@fedify/redis/v/${{ steps.versioning.outputs.short_version }}
450459
[jsr:@fedify/sqlite]: https://jsr.io/@fedify/sqlite@${{ steps.versioning.outputs.version }}
451460
[npm:@fedify/sqlite]: https://www.npmjs.com/package/@fedify/sqlite/v/${{ steps.versioning.outputs.short_version }}
461+
[jsr:@fedify/sveltekit]: https://jsr.io/@fedify/sveltekit@${{ steps.versioning.outputs.version }}
462+
[npm:@fedify/sveltekit]: https://www.npmjs.com/package/@fedify/sveltekit/v/${{ steps.versioning.outputs.short_version }}
452463
[jsr:@fedify/testing]: https://jsr.io/@fedify/testing@${{ steps.versioning.outputs.version }}
453464
[npm:@fedify/testing]: https://www.npmjs.com/package/@fedify/testing/v/${{ steps.versioning.outputs.short_version }}
454465
pr-number: ${{ github.event.pull_request.number }}

AGENTS.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,21 @@ The repository is organized as a monorepo with the following packages:
6161
- *src/testing/*: Testing utilities
6262
- *src/vocab/*: ActivityPub vocabulary implementation
6363
- *src/webfinger/*: WebFinger protocol implementation
64-
- *src/x/*: Framework integrations
64+
- ~~src/x/: Framework integrations~~ **Don't use.** This directory will be removed in version 2.0.0. Use packages from the `@fedify` scope, which are located in the `packages/` directory (e.g., `@fedify/hono` is in `packages/hono/`).
6565
- *packages/cli/*: Fedify CLI implementation (@fedify/cli, built with Deno)
6666
- *packages/amqp/*: AMQP/RabbitMQ driver (@fedify/amqp)
67+
- *packages/cfworkers/*: Cloudflare Workers integration (@fedify/cfworkers)
68+
- *packages/denokv/*: Deno KV integration (@fedify/denokv)
6769
- *packages/elysia/*: Elysia integration (@fedify/elysia)
6870
- *packages/express/*: Express.js integration (@fedify/express)
6971
- *packages/h3/*: h3 framework integration (@fedify/h3)
72+
- *packages/hono/*: Hono integration (@fedify/hono)
7073
- *packages/postgres/*: PostgreSQL drivers (@fedify/postgres)
7174
- *packages/redis/*: Redis drivers (@fedify/redis)
7275
- *packages/nestjs/*: NestJS integration (@fedify/nestjs)
7376
- *packages/next/*: Next.js integration (@fedify/next)
7477
- *packages/sqlite/*: SQLite driver (@fedify/sqlite)
78+
- *packages/sveltekit/*: SvelteKit integration (@fedify/sveltekit)
7579
- *packages/testing/*: Testing utilities (@fedify/testing)
7680
- *docs/*: Documentation built with Node.js and VitePress
7781
- *examples/*: Example projects demonstrating Fedify usage
@@ -143,10 +147,10 @@ Common Tasks
143147

144148
### Implementing Framework Integrations
145149

146-
1. Add new integrations in the *packages/fedify/src/x/* directory
147-
2. Follow pattern from existing integrations (hono.ts, sveltekit.ts)
150+
1. Create a new package in *packages/* directory for new integrations
151+
2. Follow pattern from existing integration packages (*packages/hono/*, *packages/sveltekit/*)
148152
3. Use standard request/response interfaces for compatibility
149-
4. Consider creating a dedicated package for substantial integrations
153+
4. Consider creating example applications in *examples/* that demonstrate usage
150154

151155
### Creating Database Adapters
152156

CHANGES.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,21 @@ To be released.
4747
- Changed how `parseSoftware()` function handles non-Semantic Versioning
4848
number strings on `tryBestEffort` mode. [[#353], [#365] by Hyeonseo Kim]]
4949

50+
- Separated modules from `@fedify/fedify/x` into dedicated packages to
51+
improve modularity and reduce bundle size. The existing integration
52+
functions in `@fedify/fedify/x` are now deprecated and will be removed in
53+
version 2.0.0. [[#375] by Chanhaeng Lee]
54+
55+
- Deprecated `@fedify/fedify/x/cfworkers` in favor of `@fedify/cfworkers`.
56+
- Deprecated `@fedify/fedify/x/denokv` in favor of `@fedify/denokv`.
57+
- Deprecated `@fedify/fedify/x/hono` in favor of `@fedify/hono`.
58+
- Deprecated `@fedify/fedify/x/sveltekit` in favor of `@fedify/sveltekit`.
59+
5060
[FEP-5711]: https://w3id.org/fep/5711
5161
[#353]: https://github.com/fedify-dev/fedify/issues/353
5262
[#365]: https://github.com/fedify-dev/fedify/pull/365
5363
[#373]: https://github.com/fedify-dev/fedify/issues/373
64+
[#375]: https://github.com/fedify-dev/fedify/issues/375
5465
[#381]: https://github.com/fedify-dev/fedify/pull/381
5566

5667
### @fedify/cli
@@ -73,6 +84,24 @@ To be released.
7384
[#353]: https://github.com/fedify-dev/fedify/issues/353
7485
[#365]: https://github.com/fedify-dev/fedify/pull/365
7586

87+
### @fedify/cfworkers
88+
89+
- Created Cloudflare Workers integration as the *@fedify/cfworkers* package.
90+
Separated from `@fedify/fedify/x/cfworkers` to improve modularity and
91+
reduce bundle size. [[#375] by Chanhaeng Lee]
92+
93+
### @fedify/denokv
94+
95+
- Created Deno KV integration as the *@fedify/denokv* package.
96+
Separated from `@fedify/fedify/x/denokv` to improve modularity and
97+
reduce bundle size. [[#375] by Chanhaeng Lee]
98+
99+
### @fedify/hono
100+
101+
- Created Hono integration as the *@fedify/hono* package.
102+
Separated from `@fedify/fedify/x/hono` to improve modularity and
103+
reduce bundle size. [[#375] by Chanhaeng Lee]
104+
76105
### @fedify/next
77106

78107
- Created [Next.js] integration as the *@fedify/next* package.
@@ -88,6 +117,12 @@ To be released.
88117

89118
[#368]: https://github.com/fedify-dev/fedify/pull/368
90119

120+
### @fedify/sveltekit
121+
122+
- Created SvelteKit integration as the *@fedify/sveltekit* package.
123+
Separated from `@fedify/fedify/x/sveltekit` to improve modularity and
124+
reduce bundle size. [[#375] by Chanhaeng Lee]
125+
91126

92127
Version 1.8.8
93128
-------------

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,18 @@ The repository is organized as a monorepo with the following packages:
191191
- *packages/cli/*: The Fedify CLI (@fedify/cli). The CLI is built with
192192
[Deno].
193193
- *packages/amqp/*: AMQP/RabbitMQ driver (@fedify/amqp) for Fedify.
194+
- *packages/cfworkers/*: Cloudflare Workers integration (@fedify/cfworkers) for Fedify.
195+
- *packages/denokv/*: Deno KV integration (@fedify/denokv) for Fedify.
194196
- *packages/elysia/*: Elysia integration (@fedify/elysia) for Fedify.
195197
- *packages/express/*: Express integration (@fedify/express) for Fedify.
196198
- *packages/h3/*: h3 framework integration (@fedify/h3) for Fedify.
199+
- *packages/hono/*: Hono integration (@fedify/hono) for Fedify.
197200
- *packages/postgres/*: PostgreSQL drivers (@fedify/postgres) for Fedify.
198201
- *packages/redis/*: Redis drivers (@fedify/redis) for Fedify.
199202
- *packages/nestjs/*: NestJS integration (@fedify/nestjs) for Fedify.
200203
- *packages/next/*: Next.js integration (@fedify/next) for Fedify.
201204
- *packages/sqlite/*: SQLite driver (@fedify/sqlite) for Fedify.
205+
- *packages/sveltekit/*: SvelteKit integration (@fedify/sveltekit) for Fedify.
202206
- *packages/testing/*: Testing utilities (@fedify/testing) for Fedify.
203207
- *docs/*: The Fedify docs. The docs are built with [Node.js] and
204208
[VitePress].

cspell.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"docloader",
2828
"draft-cavage",
2929
"eddsa",
30+
"elysia",
3031
"fanout",
3132
"federatable",
3233
"Federatable",
@@ -100,6 +101,7 @@
100101
"unfollows",
101102
"urlpattern",
102103
"uuidv7",
104+
"Vinxi",
103105
"vitepress",
104106
"vtsls",
105107
"webfinger",

deno.json

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@
33
"./packages/fedify",
44
"./packages/cli",
55
"./packages/amqp",
6-
"./packages/elysia",
6+
"./packages/cfworkers",
7+
"./packages/denokv",
78
"./packages/express",
89
"./packages/h3",
10+
"./packages/hono",
911
"./packages/postgres",
1012
"./packages/redis",
1113
"./packages/sqlite",
14+
"./packages/sveltekit",
1215
"./packages/testing",
1316
"./examples/blog",
14-
"./examples/cloudflare-workers",
1517
"./examples/hono-sample"
1618
],
1719
"imports": {
@@ -26,6 +28,7 @@
2628
"@std/path": "jsr:@std/path@^1.0.6",
2729
"@std/yaml": "jsr:@std/yaml@^1.0.8",
2830
"amqplib": "npm:amqplib@^0.10.8",
31+
"es-toolkit": "npm:es-toolkit@^1.30.0",
2932
"h3": "npm:h3@^1.15.0",
3033
"@nestjs/common": "npm:@nestjs/common@^11.0.1",
3134
"ioredis": "npm:ioredis@^5.6.1",
@@ -41,19 +44,28 @@
4144
"temporal"
4245
],
4346
"exclude": [
44-
"**/*.md",
4547
"**/pnpm-lock.yaml",
4648
".github/",
4749
"docs/",
4850
"pnpm-lock.yaml",
4951
"pnpm-workspace.yaml"
5052
],
53+
"lint": {
54+
"exclude": [
55+
"examples/cloudflare-workers/worker-configuration.d.ts"
56+
]
57+
},
58+
"fmt": {
59+
"exclude": [
60+
"**/*.md"
61+
]
62+
},
5163
"nodeModulesDir": "none",
5264
"tasks": {
5365
"codegen": "deno task -f @fedify/cli codegen",
5466
"check-versions": "deno run --allow-read --allow-write scripts/check_versions.ts",
5567
"check-all": {
56-
"command": "deno task --recursive check",
68+
"command": "deno fmt --check && deno lint && echo deno check --unstable-temporal $(deno eval 'import m from \"./deno.json\" with { type: \"json\" }; for (let p of m.workspace) console.log(p)')",
5769
"dependencies": [
5870
"check-versions",
5971
"codegen"

docs/manual/deploy.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ type Env = {
231231
import { Person } from "@fedify/fedify";
232232
// ---cut-before---
233233
import { createFederationBuilder } from "@fedify/fedify";
234-
import { WorkersKvStore, WorkersMessageQueue } from "@fedify/fedify/x/cfworkers";
234+
import { WorkersKvStore, WorkersMessageQueue } from "@fedify/cfworkers";
235235

236236
const builder = createFederationBuilder<Env>();
237237

@@ -266,7 +266,7 @@ must manually connect queue handlers:
266266
~~~~ typescript twoslash
267267
// @noErrors: 2345
268268
import { createFederationBuilder, Person, type Message } from "@fedify/fedify";
269-
import { WorkersKvStore, WorkersMessageQueue } from "@fedify/fedify/x/cfworkers";
269+
import { WorkersKvStore, WorkersMessageQueue } from "@fedify/cfworkers";
270270

271271
type Env = {
272272
KV_NAMESPACE: KVNamespace<string>;
@@ -323,7 +323,7 @@ as well:
323323

324324
~~~~ typescript
325325
import { createFederation } from "@fedify/fedify";
326-
import { DenoKvStore, DenoKvMessageQueue } from "@fedify/fedify/x/deno";
326+
import { DenoKvStore, DenoKvMessageQueue } from "@fedify/denokv";
327327

328328
// Open Deno KV (automatically available on Deno Deploy)
329329
const kv = await Deno.openKv();

docs/manual/federation.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,16 @@ testing and development purposes, and the `DenoKvStore` class is Deno KV-backed
5151
implementation for production use (as you can guess from the name, it is only
5252
available in Deno runtime).
5353

54-
As separate packages, [@fedify/redis] provides [`RedisKvStore`] class, which is
55-
a Redis-backed implementation for production use, and [@fedify/postgres]
54+
As separate packages, [`@fedify/redis`] provides [`RedisKvStore`] class, which
55+
is a Redis-backed implementation for production use, and [`@fedify/postgres`]
5656
provides [`PostgresKvStore`] class, which is a PostgreSQL-backed implementation
5757
for production use.
5858

5959
Further details are explained in the [*Key–value store* section](./kv.md).
6060

61-
[@fedify/redis]: https://github.com/fedify-dev/redis
61+
[`@fedify/redis`]: https://github.com/fedify-dev/fedify/tree/main/packages/redis
6262
[`RedisKvStore`]: https://jsr.io/@fedify/redis/doc/kv/~/RedisKvStore
63-
[@fedify/postgres]: https://github.com/fedify-dev/postgres
63+
[`@fedify/postgres`]: https://github.com/fedify-dev/fedify/tree/main/packages/postgres
6464
[`PostgresKvStore`]: https://jsr.io/@fedify/postgres/doc/kv/~/PostgresKvStore
6565

6666
### `kvPrefixes`
@@ -110,12 +110,12 @@ and the `DenoKvMessageQueue` class is a Deno KV-backed implementation for
110110
production use (as you can guess from the name, it is only available in Deno
111111
runtime).
112112

113-
As separate packages, [@fedify/redis] provides [`RedisMessageQueue`] class,
113+
As separate packages, [`@fedify/redis`] provides [`RedisMessageQueue`] class,
114114
which is a Redis-backed implementation for production use,
115-
and [@fedify/postgres] provides [`PostgresMessageQueue`] class, which is a
116-
PostgreSQL-backed implementation for production use, and [@fedify/amqp] provides
117-
[`AmqpMessageQueue`] class, which is an AMQP broker-backed implementation for
118-
production use.
115+
and [`@fedify/postgres`] provides [`PostgresMessageQueue`] class, which is a
116+
PostgreSQL-backed implementation for production use, and [`@fedify/amqp`]
117+
provides [`AmqpMessageQueue`] class, which is an AMQP broker-backed
118+
implementation for production use.
119119

120120
Further details are explained in the [*Message queue* section](./mq.md).
121121

@@ -184,7 +184,7 @@ Further details are explained in the [*Message queue* section](./mq.md).
184184
185185
[`RedisMessageQueue`]: https://jsr.io/@fedify/redis/doc/mq/~/RedisMessageQueue
186186
[`PostgresMessageQueue`]: https://jsr.io/@fedify/postgres/doc/mq/~/PostgresMessageQueue
187-
[@fedify/amqp]: https://github.com/fedify-dev/amqp
187+
[`@fedify/amqp`]: https://github.com/fedify-dev/fedify/tree/main/packages/amqp
188188
[`AmqpMessageQueue`]: https://jsr.io/@fedify/amqp/doc/mq/~/AmqpMessageQueue
189189
190190
### `manuallyStartQueue`
@@ -305,8 +305,8 @@ an object for options.
305305
> [!CAUTION]
306306
>
307307
> This settings do not affect the `User-Agent` header of the HTTP requests
308-
> that `lookupWebFinger()`, `lookupObject()`, and `getNodeInfo()` functions make,
309-
> since they do not depend on the `Federation` object.
308+
> that `lookupWebFinger()`, `lookupObject()`, and `getNodeInfo()` functions
309+
> make, since they do not depend on the `Federation` object.
310310
>
311311
> However, `Context.lookupObject()` method is affected by this settings.
312312

0 commit comments

Comments
 (0)