Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/setup-deno/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ runs:
steps:
- uses: denoland/setup-deno@v2
with:
deno-version: 2.7.1 # Keep in sync with mise.toml
deno-version: 2.7.5 # Keep in sync with mise.toml
26 changes: 26 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,23 @@ To be released.

### @fedify/vocab-runtime

- Updated the preloaded <https://gotosocial.org/ns> JSON-LD context to
match the current [GoToSocial] v0.21+ namespace, adding new type terms
(`LikeRequest`, `LikeAuthorization`, etc.) and property terms
(`automaticApproval`, `manualApproval`, `interactingObject`, etc.) while
retaining deprecated terms (`always`, `approvalRequired`) for backward
compatibility. [[#453], [#622]]

- Added optional `FetchError.response` so callers can inspect the original
failed HTTP response when remote document or key fetches return an HTTP
error (such as `404 Not Found` or `410 Gone`). This enables higher-level
APIs to distinguish transport failures from specific HTTP fetch failures.
[[#611]]

[GoToSocial]: https://gotosocial.org/
[#453]: https://github.com/fedify-dev/fedify/issues/453
[#622]: https://github.com/fedify-dev/fedify/pull/622

### @fedify/cli

- Added `--reverse` option to `fedify lookup` to reverse presentation order
Expand Down Expand Up @@ -81,6 +92,21 @@ To be released.

### @fedify/vocab

- Added [GoToSocial] interaction controls vocabulary for expressing who
can like, reply to, or announce posts and for approving interactions.
[[#453], [#622]]

- Added `InteractionPolicy` and `InteractionRule` typeless value
classes.
- Added `LikeRequest`, `ReplyRequest`, and `AnnounceRequest` activity
types for requesting interaction approval.
- Added `LikeAuthorization`, `ReplyAuthorization`, and
`AnnounceAuthorization` types for proving approved interactions.
- Added `Object.interactionPolicy`, `Object.approvedBy`,
`Object.getLikeAuthorization()`/`Object.likeAuthorizationId`,
`Object.getReplyAuthorization()`/`Object.replyAuthorizationId`, and
`Object.getAnnounceAuthorization()`/`Object.announceAuthorizationId`.

- Fixed `Endpoints.toJsonLd()` to no longer emit invalid
`"type": "as:Endpoints"` in the serialized JSON-LD. The `as:Endpoints`
type does not exist in the ActivityStreams vocabulary, and its presence
Expand Down
3 changes: 3 additions & 0 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion examples/fresh/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"dom.asynciterable",
"dom.iterable",
"deno.ns",
"deno.unstable"
"deno.unstable",
"deno.temporal"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I know, Temporal became stable in Deno version 2.7. Is there a reason why it was added back?

Copy link
Copy Markdown
Contributor

@2chanhaeng 2chanhaeng Mar 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, this is my mistake. I misread it. Sorry!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's because Deno separated their deno.temporal library since Deno 2.7.5.

],
"jsx": "precompile",
"jsxImportSource": "preact",
Expand Down
2 changes: 1 addition & 1 deletion mise.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tools]
bun = "1.2.22"
deno = "2.7.1"
deno = "2.7.5"
node = "22"
pnpm = "10.28.0"

Expand Down
14 changes: 14 additions & 0 deletions packages/fedify/src/federation/handler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ test("handleActor()", async () => {
"https://w3id.org/security/data-integrity/v1",
"https://www.w3.org/ns/did/v1",
"https://w3id.org/security/multikey/v1",
"https://gotosocial.org/ns",
{
alsoKnownAs: {
"@id": "as:alsoKnownAs",
Expand Down Expand Up @@ -236,6 +237,7 @@ test("handleActor()", async () => {
"https://w3id.org/security/data-integrity/v1",
"https://www.w3.org/ns/did/v1",
"https://w3id.org/security/multikey/v1",
"https://gotosocial.org/ns",
{
alsoKnownAs: {
"@id": "as:alsoKnownAs",
Expand Down Expand Up @@ -396,6 +398,7 @@ test("handleObject()", async () => {
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/data-integrity/v1",
"https://gotosocial.org/ns",
{
Emoji: "toot:Emoji",
Hashtag: "as:Hashtag",
Expand Down Expand Up @@ -494,6 +497,7 @@ test("handleObject()", async () => {
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/data-integrity/v1",
"https://gotosocial.org/ns",
{
Emoji: "toot:Emoji",
Hashtag: "as:Hashtag",
Expand Down Expand Up @@ -679,6 +683,7 @@ test("handleCollection()", async () => {
"https://w3id.org/identity/v1",
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/data-integrity/v1",
"https://gotosocial.org/ns",
{
toot: "http://joinmastodon.org/ns#",
misskey: "https://misskey-hub.net/ns#",
Expand All @@ -704,6 +709,7 @@ test("handleCollection()", async () => {
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/data-integrity/v1",
"https://gotosocial.org/ns",
{
toot: "http://joinmastodon.org/ns#",
misskey: "https://misskey-hub.net/ns#",
Expand Down Expand Up @@ -802,6 +808,7 @@ test("handleCollection()", async () => {
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/data-integrity/v1",
"https://gotosocial.org/ns",
{
toot: "http://joinmastodon.org/ns#",
misskey: "https://misskey-hub.net/ns#",
Expand Down Expand Up @@ -871,6 +878,7 @@ test("handleCollection()", async () => {
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/data-integrity/v1",
"https://gotosocial.org/ns",
{
toot: "http://joinmastodon.org/ns#",
misskey: "https://misskey-hub.net/ns#",
Expand Down Expand Up @@ -936,6 +944,7 @@ test("handleCollection()", async () => {
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/data-integrity/v1",
"https://gotosocial.org/ns",
{
toot: "http://joinmastodon.org/ns#",
misskey: "https://misskey-hub.net/ns#",
Expand Down Expand Up @@ -1005,6 +1014,7 @@ test("handleCollection()", async () => {
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/data-integrity/v1",
"https://gotosocial.org/ns",
{
toot: "http://joinmastodon.org/ns#",
misskey: "https://misskey-hub.net/ns#",
Expand Down Expand Up @@ -1254,6 +1264,7 @@ test("respondWithObject()", async () => {
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/data-integrity/v1",
"https://gotosocial.org/ns",
{
Emoji: "toot:Emoji",
Hashtag: "as:Hashtag",
Expand Down Expand Up @@ -1386,6 +1397,7 @@ test("respondWithObjectIfAcceptable", async () => {
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/data-integrity/v1",
"https://gotosocial.org/ns",
{
Emoji: "toot:Emoji",
Hashtag: "as:Hashtag",
Expand Down Expand Up @@ -1565,6 +1577,7 @@ test("handleCustomCollection()", async () => {
"https://w3id.org/identity/v1",
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/data-integrity/v1",
"https://gotosocial.org/ns",
{
toot: "http://joinmastodon.org/ns#",
misskey: "https://misskey-hub.net/ns#",
Expand All @@ -1589,6 +1602,7 @@ test("handleCustomCollection()", async () => {
const CONTEXT = [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/data-integrity/v1",
"https://gotosocial.org/ns",
{
toot: "http://joinmastodon.org/ns#",
misskey: "https://misskey-hub.net/ns#",
Expand Down
4 changes: 2 additions & 2 deletions packages/fedify/src/sig/proof.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ test("createProof()", async () => {
assertEquals(
proof.proofValue,
decodeHex(
"203e6afc5b7c6affe08d2d67ad100cc6cdcf1f5a438063d16766204956aa8fdd" +
"67cc04088ccf69de36225cab19377b5a032542fd2454b9b9dd001ffbdef5aa03",
"860dda2bec0ab493ae9b0223ac4133ee82246d7d75d6505be2d6c53755a34454" +
"dcb05feae02403ac51faf853d2e873d467f32a252d3b15a9f025e3ed0750b90b",
),
);
assertEquals(proof.created, created);
Expand Down
86 changes: 86 additions & 0 deletions packages/fixture/src/fixtures/gotosocial.org/ns.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"@context": {
"xsd": "http://www.w3.org/2001/XMLSchema#",
"gts": "https://gotosocial.org/ns#",
"LikeRequest": "gts:LikeRequest",
"ReplyRequest": "gts:ReplyRequest",
"AnnounceRequest": "gts:AnnounceRequest",
"QuoteRequest": "gts:QuoteRequest",
"LikeAuthorization": "gts:LikeApproval",
"ReplyAuthorization": "gts:ReplyAuthorization",
"AnnounceAuthorization": "gts:AnnounceAuthorization",
Comment thread
dahlia marked this conversation as resolved.
"QuoteAuthorization": "gts:QuoteAuthorization",
"likeAuthorization": {
"@id": "gts:likeAuthorization",
"@type": "@id"
},
"replyAuthorization": {
"@id": "gts:replyAuthorization",
"@type": "@id"
},
"announceAuthorization": {
"@id": "gts:announceAuthorization",
"@type": "@id"
},
"quoteAuthorization": {
"@id": "gts:quoteAuthorization",
"@type": "@id"
},
"interactingObject": {
"@id": "gts:interactingObject",
"@type": "@id"
},
"interactionTarget": {
"@id": "gts:interactionTarget",
"@type": "@id"
},
"interactionPolicy": {
"@id": "gts:interactionPolicy",
"@type": "@id"
},
"canLike": {
"@id": "gts:canLike",
"@type": "@id"
},
"canReply": {
"@id": "gts:canReply",
"@type": "@id"
},
"canAnnounce": {
"@id": "gts:canAnnounce",
"@type": "@id"
},
"canQuote": {
"@id": "gts:canQuote",
"@type": "@id"
},
"automaticApproval": {
"@id": "gts:automaticApproval",
"@type": "@id"
},
"manualApproval": {
"@id": "gts:manualApproval",
"@type": "@id"
},
"hidesToPublicFromUnauthedWeb": {
"@id": "gts:hidesToPublicFromUnauthedWeb",
"@type": "xsd:boolean"
},
"hidesCcPublicFromUnauthedWeb": {
"@id": "gts:hidesCcPublicFromUnauthedWeb",
"@type": "xsd:boolean"
},
"always": {
"@id": "gts:always",
"@type": "@id"
},
"approvalRequired": {
"@id": "gts:approvalRequired",
"@type": "@id"
},
"approvedBy": {
"@id": "gts:approvedBy",
"@type": "@id"
}
}
}
53 changes: 53 additions & 0 deletions packages/vocab-runtime/src/contexts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4247,7 +4247,40 @@ const preloadedContexts: Record<string, unknown> = {
},
"https://gotosocial.org/ns": {
Comment thread
dahlia marked this conversation as resolved.
"@context": {
"xsd": "http://www.w3.org/2001/XMLSchema#",
"gts": "https://gotosocial.org/ns#",
"LikeRequest": "gts:LikeRequest",
"ReplyRequest": "gts:ReplyRequest",
"AnnounceRequest": "gts:AnnounceRequest",
"QuoteRequest": "gts:QuoteRequest",
"LikeAuthorization": "gts:LikeApproval",
"ReplyAuthorization": "gts:ReplyAuthorization",
"AnnounceAuthorization": "gts:AnnounceAuthorization",
Comment thread
dahlia marked this conversation as resolved.
"QuoteAuthorization": "gts:QuoteAuthorization",
"likeAuthorization": {
"@id": "gts:likeAuthorization",
"@type": "@id",
},
"replyAuthorization": {
"@id": "gts:replyAuthorization",
"@type": "@id",
},
"announceAuthorization": {
"@id": "gts:announceAuthorization",
"@type": "@id",
},
"quoteAuthorization": {
"@id": "gts:quoteAuthorization",
"@type": "@id",
},
"interactingObject": {
"@id": "gts:interactingObject",
"@type": "@id",
},
"interactionTarget": {
"@id": "gts:interactionTarget",
"@type": "@id",
},
"interactionPolicy": {
"@id": "gts:interactionPolicy",
"@type": "@id",
Expand All @@ -4264,6 +4297,26 @@ const preloadedContexts: Record<string, unknown> = {
"@id": "gts:canAnnounce",
"@type": "@id",
},
"canQuote": {
"@id": "gts:canQuote",
"@type": "@id",
},
"automaticApproval": {
"@id": "gts:automaticApproval",
"@type": "@id",
},
"manualApproval": {
"@id": "gts:manualApproval",
"@type": "@id",
},
"hidesToPublicFromUnauthedWeb": {
"@id": "gts:hidesToPublicFromUnauthedWeb",
"@type": "xsd:boolean",
},
"hidesCcPublicFromUnauthedWeb": {
"@id": "gts:hidesCcPublicFromUnauthedWeb",
"@type": "xsd:boolean",
},
"always": {
"@id": "gts:always",
"@type": "@id",
Expand Down
Loading
Loading