Skip to content

Commit

Permalink
Merge branch 'dnt'
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlia committed Mar 31, 2024
2 parents 20aa825 + c2c879a commit 1538bfd
Show file tree
Hide file tree
Showing 48 changed files with 1,726 additions and 243 deletions.
45 changes: 39 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ jobs:

lint:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
Expand All @@ -53,10 +50,27 @@ jobs:
- run: deno task check
- run: deno task check
working-directory: ${{ github.workspace }}/examples/blog/

release-test:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- uses: actions/setup-node@v4
with:
node-version: lts/*
- run: deno task publish --dry-run
- run: deno task dnt
- run: npm publish --dry-run
working-directory: ${{ github.workspace }}/npm/

publish-jsr:
needs: [test, lint]
publish:
needs: [test, lint, release-test]
runs-on: ubuntu-latest
permissions:
id-token: write
Expand All @@ -67,6 +81,9 @@ jobs:
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- uses: actions/setup-node@v4
with:
node-version: lts/*
- if: github.ref_type == 'branch'
run: |
jq \
Expand All @@ -83,6 +100,9 @@ jobs:
# Don't know why, but the .gitignore list is not overriden by include list
# in deno.json:
- run: rm vocab/.gitignore
- run: 'deno task dnt "$(jq -r .version deno.json)"'
- run: npm pack
working-directory: ${{ github.workspace }}/npm/
- id: extract-changelog
uses: dahlia/submark@5a5ff0a58382fb812616a5801402f5aef00f90ce
with:
Expand All @@ -99,10 +119,23 @@ jobs:
with:
body_path: ${{ steps.extract-changelog.outputs.output-file }}
name: Fedify ${{ github.ref_name }}
files: npm/*.tgz
generate_release_notes: false
discussion_category_name: Announcements
- if: github.event_name == 'push'
run: deno task publish --allow-dirty
- if: github.event_name == 'push'
run: |
set -ex
npm config set //registry.npmjs.org/:_authToken "$NPM_AUTH_TOKEN"
if [[ "$GITHUB_REF_TYPE" = "tag" ]]; then
npm publish --provenance --access public *.tgz
else
npm publish --provenance --access public --tag dev *.tgz
fi
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
working-directory: ${{ github.workspace }}/npm/

publish-examples-blog:
if: github.event_name == 'push'
Expand All @@ -124,7 +157,7 @@ jobs:
root: .

publish-docs:
needs: [publish-jsr]
needs: [publish]
runs-on: ubuntu-latest
permissions:
id-token: write
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
apidoc/
coverage/
deno.lock
npm/
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@
},
"cSpell.words": [
"activitypub",
"aitertools",
"apidoc",
"bccs",
"btos",
"callouts",
"cfworker",
"codegen",
"Deno",
"denokv",
"dereferenceable",
"discoverability",
"docloader",
Expand Down Expand Up @@ -63,6 +65,7 @@
"superproperty",
"unfollow",
"unfollowing",
"urlpattern",
"webfinger"
]
}
34 changes: 34 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,45 @@ Version 0.5.0

To be released.

- Fedify is now available on npm: [@fedify/fedify]. [[#24]]

- Abstract key-value store for caching.

- Added `KvStore` interface.
- Added `KvStoreSetOptions` interface.
- Added `KvKey` type.
- Added `DenoKvStore` class.
- `KvCacheParameters.kv` option now accepts a `KvStore` instead of
`Deno.Kv`.
- `KvCacheParameters.prefix` option now accepts a `KvKey` instead of
`Deno.KvKey`.
- `FederationParameters.kv` option now accepts a `KvStore` instead of
`Deno.Kv`.
- `FederationKvPrefixes.activityIdempotence` option now accepts a `KvKey`
instead of `Deno.KvKey`.
- `FederationKvPrefixes.remoteDocument` option now accepts a `KvKey`
instead of `Deno.KvKey`.

- Abstract message queue for outgoing activities.

- Added `MessageQueue` interface.
- Added `MessageQueueEnqueueOptions` interface.
- Added `InProcessMessageQueue` class.
- Added `FederationParameters.queue` option.

- Added `@fedify/fedify/x/denokv` module for adapting `Deno.Kv` to `KvStore`
and `MessageQueue`. It is only available in Deno runtime.

- Added `DenoKvStore` class.
- Added `DenoKvMessageQueue` class.

- Removed dependency on *jose*.

- Added `exportSpki()` function.
- Added `importSpki()` function.

[@fedify/fedify]: https://www.npmjs.com/package/@fedify/fedify
[#24]: https://github.com/dahlia/fedify/discussions/24

Version 0.4.0
-------------
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ Fedify: an ActivityPub server framework
=======================================

[![JSR][JSR badge]][JSR]
[![JSR score][JSR score badge]][JSR score]
[![npm][npm badge]][npm]
[![GitHub Actions][GitHub Actions badge]][GitHub Actions]
[![Matrix][Matrix badge]][Matrix]
[![Follow @hongminhee@todon.eu][@hongminhee.todon.eu badge]][@hongminhee.todon.eu]

> [!NOTE]
> Looking for a quick demo? Here it is: [Fedify Demo] on Deno Playground.
Fedify is a [Deno]/TypeScript library for building federated server apps
Fedify is a TypeScript library for building federated server apps
powered by [ActivityPub] and other standards, so-called [fediverse].[^1]
It aims to eliminate the complexity and redundant boilerplate code when
building a federated server app, so that you can focus on your business logic
Expand Down Expand Up @@ -51,17 +51,16 @@ join our [Matrix chat space][Matrix] or [GitHub Discussions].
[Mastodon], [Lemmy], [Pixelfed], [PeerTube], and so on.

[JSR]: https://jsr.io/@fedify/fedify
[JSR badge]: https://jsr.io/badges/@fedify/fedify
[JSR score]: https://jsr.io/@fedify/fedify/score
[JSR score badge]: https://jsr.io/badges/@fedify/fedify/score
[JSR badge]: https://jsr.io/badges/@fedify/fedify?
[npm]: https://www.npmjs.com/package/@fedify/fedify
[npm badge]: https://img.shields.io/npm/v/@fedify/fedify?logo=npm
[GitHub Actions]: https://github.com/dahlia/fedify/actions/workflows/build.yaml
[GitHub Actions badge]: https://github.com/dahlia/fedify/actions/workflows/build.yaml/badge.svg
[Matrix]: https://matrix.to/#/#fedify:matrix.org
[Matrix badge]: https://img.shields.io/matrix/fedify%3Amatrix.org
[@hongminhee.todon.eu badge]: https://fedi-badge.deno.dev/@[email protected]/followers.svg
[@hongminhee.todon.eu]: https://todon.eu/@hongminhee
[Fedify Demo]: https://dash.deno.com/playground/fedify-demo
[Deno]: https://deno.com/
[ActivityPub]: https://www.w3.org/TR/activitypub/
[fediverse]: https://en.wikipedia.org/wiki/Fediverse
[Activity Vocabulary]: https://www.w3.org/TR/activitystreams-vocabulary/
Expand Down Expand Up @@ -94,3 +93,5 @@ Or you can directly import it in your code using `jsr:` specifier:
~~~~ typescript
import { Federation } from "jsr:@fedify/fedify";
~~~~

[Deno]: https://deno.com/
Loading

0 comments on commit 1538bfd

Please sign in to comment.