Roadmap: non-Deno compatibility #24
Replies: 6 comments
-
Progress report, March 29, 2024. Work on Node.js compatibility is currently being done in the dnt branch (the branch name may not be appropriate, but I like it because it's short). I've added the dnt.ts script in the root of the repository. It's not working yet—I'm getting the error below, and I'm trying to figure out a solution:
I added I haven't implemented an adapter for Deno KV yet, so it is not usable in Fedify. Implementing the adapters for it itself isn't hard, it's the packaging that's the problem. Anyway, this regression is only temporary during development and will go away in the general release. It was pre-released to JSR as version 0.5.0-dev.79+562c62cf, and you can test it out. |
Beta Was this translation helpful? Give feedback.
-
Progress report, March 30, 2024. I tried CommonJS packaging, but it turned out to be quite challenging, so I decided to support ESM only. I got Fedify packaged into npm using dnt, but it hasn't been published to npm yet. I've made the entire unit test pass in Node.js now. It was pre-released to JSR as version 0.5.0-dev.86+31d077e4, and you can test it out. |
Beta Was this translation helpful? Give feedback.
-
I did a quick test without expectations, and found that Fedify works great with Bun as well! The version I tested was 0.5.0-dev.95+46f77429. import {
type Context,
Federation,
MemoryKvStore,
Person,
} from "@fedify/fedify";
const federation = new Federation<void>({
kv: new MemoryKvStore(),
});
federation.setActorDispatcher(
"/users/{handle}",
(context: Context<void>, handle: string) => {
if (handle !== "hong") return null;
return new Person({
id: context.getActorUri(handle),
preferredUsername: handle,
});
},
);
Bun.serve({
port: 3000,
fetch(request: Request) {
return federation.handle(request, { contextData: undefined });
},
}); |
Beta Was this translation helpful? Give feedback.
-
Progress Report, March 31, 2024. The dnt branch has finally been merged into the main branch, and all future development will take place on the main branch. Fedify is now available on npm. The package name is @fedify/fedify, exactly the same as the JSR. Added Deno KV adapters: Fixed a few places in the docs to match the changed API. I did a quick test in Node.js and Bun and found it works well. It was pre-released to npm as version 0.5.0-dev.95+46f77429, and you can test it out. |
Beta Was this translation helpful? Give feedback.
-
Today Fedify 0.5.0 was released, and with this version, it comes support for Node.js and Bun! It's available on both JSR and npm: deno add @fedify/fedify@0.5.0
npm add @fedify/fedify@0.5.0
bun add @fedify/fedify@^0.5.0 |
Beta Was this translation helpful? Give feedback.
-
I was impressed with the result of this survey:
… and am going to work on the non-Deno compatibility of Fedify for the time being. Here's a rough roadmap:
All of this is likely to take a week at the earliest and a month at the latest, but I've already started some of the work. I'll try to release interim progress as often as possible.
However, Fedify will still be developed in Deno first for the foreseeable future. This is because Deno is, in my opinion, the TypeScript toolchain with the best development experience.
If you have any questions or feedback, feel free to ask here or in the Fedify community on Matrix.
Beta Was this translation helpful? Give feedback.
All reactions