Skip to content

Commit be63873

Browse files
authored
Merge pull request #593 from 2chanhaeng/main
Add `@fedify/astro`, make an examples and make `@fedify/init` support Astro
2 parents 8225ebc + 8bc7160 commit be63873

72 files changed

Lines changed: 6880 additions & 601 deletions

Some content is hidden

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

AGENTS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,8 @@ The monorepo uses different build processes for different packages:
324324
JSR and npm
325325

326326
3. **Database adapters and integrations**: Use tsdown for TypeScript compilation:
327-
- *packages/amqp/*, *packages/elysia*, *packages/express/*, *packages/h3/*,
327+
- *packages/amqp/*, *packages/astro/*, *packages/elysia*,
328+
*packages/express/*, *packages/h3/*,
328329
*packages/sqlite/*, *packages/postgres/*, *packages/redis/*,
329330
*packages/nestjs/*
330331
- Built to support Node.js and Bun environments

CHANGES.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,28 @@ To be released.
1919
[#473]: https://github.com/fedify-dev/fedify/issues/473
2020
[#589]: https://github.com/fedify-dev/fedify/pull/589
2121

22+
### @fedify/astro
23+
24+
- Added `@fedify/astro` package for integrating Fedify with [Astro].
25+
It provides `fedifyIntegration()` for Vite SSR configuration and
26+
`fedifyMiddleware()` for request handling. [[#50] by Chanhaeng Lee]
27+
28+
[Astro]: https://astro.build/
29+
[#50]: https://github.com/fedify-dev/fedify/issues/50
30+
2231
### @fedify/init
2332

2433
- Changed `fedify init` to add `"temporal"` to `deno.json`'s `"unstable"`
2534
field only when the installed Deno version is earlier than 2.7.0.
2635
On Deno 2.7.0 or later, it is no longer added.
36+
2737
- `fedify init` now omits the `"unstable"` field entirely when no unstable
2838
feature is required for the generated Deno project.
2939

40+
- Supported [Astro] as a web framework option in `fedify init`, with
41+
runtime-specific templates for Deno, Bun, and Node.js environments.
42+
[[#50] by ChanHaeng Lee]
43+
3044
### @fedify/vocab
3145

3246
- Fixed `Endpoints.toJsonLd()` to no longer emit invalid

CONTRIBUTING.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ The repository is organized as a monorepo with the following packages:
335335
- *packages/create/*: Standalone CLI (@fedify/create) for
336336
creating new Fedify projects. Wraps @fedify/init.
337337
- *packages/amqp/*: AMQP/RabbitMQ driver (@fedify/amqp) for Fedify.
338+
- *packages/astro/*: Astro integration (@fedify/astro) for Fedify.
338339
- *packages/cfworkers/*: Cloudflare Workers integration (@fedify/cfworkers) for
339340
Fedify.
340341
- *packages/debugger/*: Embedded ActivityPub debug dashboard (@fedify/debugger)
@@ -508,32 +509,31 @@ with Node.js and Bun. If you followed the setup instructions above using
508509
#### Testing the `init` command
509510

510511
If you want to test some integration packages like `@fedify/hono` or
511-
`@fedify/denokv`, you can test them with `test-init` task. This task runs
512+
`@fedify/denokv`, you can test them with `test:init` task. This task runs
512513
the `fedify init` command with various combinations of web frameworks,
513514
package managers, KvStore implementations, and MessageQueue implementations.
514515

515516
~~~~ bash
516-
# From /packages/cli
517-
deno task test-init
517+
mise test:init
518518
~~~~
519519

520520
You can also specify specific options to test:
521521

522522
~~~~ bash
523523
# Test with specific web framework and package manager
524-
deno task test-init -w hono -p deno
524+
mise test:init -w hono -p deno
525525

526526
# Test with multiple options
527-
deno task test-init -w hono -w express -p deno -p npm -k denokv -m denokv
527+
mise test:init -w hono -w express -p deno -p npm -k denokv -m denokv
528528
~~~~
529529

530530
If some options are not specified, all combinations are tested by default.
531531

532532
You can skip dry run or hydration tests:
533533

534534
~~~~ bash
535-
deno task test-init --no-dry-run # Only run hydration tests
536-
deno task test-init --no-hyd-run # Only run dry-run tests
535+
mise test:init --no-dry-run # Only run hydration tests
536+
mise test:init --no-hyd-run # Only run dry-run tests
537537
~~~~
538538

539539
The test results are stored in `/tmp/fedify-init/<run-id>/`(UNIX).
@@ -556,6 +556,12 @@ mise run test:examples
556556

557557
This command runs the tests for all example projects.
558558

559+
If you want to test specific examples, you can test them by adding arguments:
560+
561+
~~~~ bash
562+
mise run test:examples astro sveltekit-sample
563+
~~~~
564+
559565
### Building the docs
560566

561567
If you want to change the Fedify docs, you would like to preview the changes

deno.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"workspace": [
33
"./packages/amqp",
4+
"./packages/astro",
45
"./packages/cfworkers",
56
"./packages/cli",
67
"./packages/debugger",
@@ -25,8 +26,9 @@
2526
"./packages/vocab-runtime",
2627
"./packages/vocab-tools",
2728
"./packages/webfinger",
28-
"./examples/hono-sample",
29-
"./examples/fresh"
29+
"./examples/astro",
30+
"./examples/fresh",
31+
"./examples/hono-sample"
3032
],
3133
"imports": {
3234
"@cloudflare/workers-types": "npm:@cloudflare/workers-types@^4.20250529.0",
@@ -53,6 +55,7 @@
5355
"@std/yaml": "jsr:@std/yaml@^1.0.8",
5456
"@types/node": "npm:@types/node@^22.16.0",
5557
"amqplib": "npm:amqplib@^0.10.9",
58+
"astro": "npm:astro@^5.17.3",
5659
"byte-encodings": "npm:byte-encodings@^1.0.11",
5760
"chalk": "npm:chalk@^5.6.2",
5861
"es-toolkit": "npm:es-toolkit@^1.43.0",

0 commit comments

Comments
 (0)