Skip to content

Commit 2ee1d61

Browse files
committed
Merge tag '1.4.12' into 1.5-maintenance
Fedify 1.4.12
2 parents 832ba4c + 09c4185 commit 2ee1d61

File tree

10 files changed

+98
-13
lines changed

10 files changed

+98
-13
lines changed

CHANGES.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ Version 1.5.4
88

99
To be released.
1010

11+
- Fixed JSON-LD serialization of the `Question.voters` property to correctly
12+
serialize as a plain number (e.g., `"votersCount": 123`) instead of as a
13+
typed literal object (e.g., `"votersCount":{"type":"xsd:nonNegativeInteger",
14+
"@value":123}`).
15+
1116

1217
Version 1.5.3
1318
-------------
@@ -172,6 +177,17 @@ Released on March 28, 2025.
172177
[multibase]: https://github.com/multiformats/js-multibase
173178

174179

180+
Version 1.4.12
181+
--------------
182+
183+
Released on June 30, 2025.
184+
185+
- Fixed JSON-LD serialization of the `Question.voters` property to correctly
186+
serialize as a plain number (e.g., `"votersCount": 123`) instead of as a
187+
typed literal object (e.g., `"votersCount":{"type":"xsd:nonNegativeInteger",
188+
"@value":123}`).
189+
190+
175191
Version 1.4.11
176192
--------------
177193

@@ -410,6 +426,17 @@ Released on February 5, 2025.
410426
[#195]: https://github.com/fedify-dev/fedify/issues/195
411427

412428

429+
Version 1.3.19
430+
--------------
431+
432+
Released on June 30, 2025.
433+
434+
- Fixed JSON-LD serialization of the `Question.voters` property to correctly
435+
serialize as a plain number (e.g., `"votersCount": 123`) instead of as a
436+
typed literal object (e.g., `"votersCount":{"type":"xsd:nonNegativeInteger",
437+
"@value":123}`).
438+
439+
413440
Version 1.3.18
414441
--------------
415442

@@ -764,6 +791,17 @@ Released on November 30, 2024.
764791
[#193]: https://github.com/fedify-dev/fedify/issues/193
765792

766793

794+
Version 1.2.23
795+
--------------
796+
797+
Released on June 30, 2025.
798+
799+
- Fixed JSON-LD serialization of the `Question.voters` property to correctly
800+
serialize as a plain number (e.g., `"votersCount": 123`) instead of as a
801+
typed literal object (e.g., `"votersCount":{"type":"xsd:nonNegativeInteger",
802+
"@value":123}`).
803+
804+
767805
Version 1.2.22
768806
--------------
769807

@@ -1166,6 +1204,17 @@ Released on October 31, 2024.
11661204
[#118]: https://github.com/fedify-dev/fedify/issues/118
11671205

11681206

1207+
Version 1.1.23
1208+
--------------
1209+
1210+
Released on June 30, 2025.
1211+
1212+
- Fixed JSON-LD serialization of the `Question.voters` property to correctly
1213+
serialize as a plain number (e.g., `"votersCount": 123`) instead of as a
1214+
typed literal object (e.g., `"votersCount":{"type":"xsd:nonNegativeInteger",
1215+
"@value":123}`).
1216+
1217+
11691218
Version 1.1.22
11701219
--------------
11711220

@@ -1609,6 +1658,17 @@ Released on October 20, 2024.
16091658
[#150]: https://github.com/fedify-dev/fedify/issues/150
16101659

16111660

1661+
Version 1.0.26
1662+
--------------
1663+
1664+
Released on June 30, 2025.
1665+
1666+
- Fixed JSON-LD serialization of the `Question.voters` property to correctly
1667+
serialize as a plain number (e.g., `"votersCount": 123`) instead of as a
1668+
typed literal object (e.g., `"votersCount":{"type":"xsd:nonNegativeInteger",
1669+
"@value":123}`).
1670+
1671+
16121672
Version 1.0.25
16131673
--------------
16141674

src/codegen/__snapshots__/class.test.ts.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17937,7 +17937,7 @@ instruments?: (Object | URL)[];}
1793717937
);
1793817938
}
1793917939
const docContext = options.context ??
17940-
[\\"https://w3id.org/identity/v1\\",\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/data-integrity/v1\\",{\\"toot\\":\\"http://joinmastodon.org/ns#\\",\\"misskey\\":\\"https://misskey-hub.net/ns#\\",\\"fedibird\\":\\"http://fedibird.com/ns#\\",\\"sensitive\\":\\"as:sensitive\\",\\"votersCount\\":\\"toot:votersCount\\",\\"Emoji\\":\\"toot:Emoji\\",\\"Hashtag\\":\\"as:Hashtag\\",\\"quoteUrl\\":\\"as:quoteUrl\\",\\"_misskey_quote\\":\\"misskey:_misskey_quote\\",\\"quoteUri\\":\\"fedibird:quoteUri\\",\\"emojiReactions\\":{\\"@id\\":\\"fedibird:emojiReactions\\",\\"@type\\":\\"@id\\"}}];
17940+
[\\"https://w3id.org/identity/v1\\",\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/data-integrity/v1\\",{\\"toot\\":\\"http://joinmastodon.org/ns#\\",\\"misskey\\":\\"https://misskey-hub.net/ns#\\",\\"fedibird\\":\\"http://fedibird.com/ns#\\",\\"sensitive\\":\\"as:sensitive\\",\\"votersCount\\":{\\"@id\\":\\"toot:votersCount\\",\\"@type\\":\\"http://www.w3.org/2001/XMLSchema#nonNegativeInteger\\"},\\"Emoji\\":\\"toot:Emoji\\",\\"Hashtag\\":\\"as:Hashtag\\",\\"quoteUrl\\":\\"as:quoteUrl\\",\\"_misskey_quote\\":\\"misskey:_misskey_quote\\",\\"quoteUri\\":\\"fedibird:quoteUri\\",\\"emojiReactions\\":{\\"@id\\":\\"fedibird:emojiReactions\\",\\"@type\\":\\"@id\\"}}];
1794117941
const compacted = await jsonld.compact(
1794217942
values,
1794317943
docContext,
@@ -29245,7 +29245,7 @@ instruments?: (Object | URL)[];}
2924529245
);
2924629246
}
2924729247
const docContext = options.context ??
29248-
[\\"https://w3id.org/identity/v1\\",\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/data-integrity/v1\\",{\\"toot\\":\\"http://joinmastodon.org/ns#\\",\\"misskey\\":\\"https://misskey-hub.net/ns#\\",\\"fedibird\\":\\"http://fedibird.com/ns#\\",\\"sensitive\\":\\"as:sensitive\\",\\"votersCount\\":\\"toot:votersCount\\",\\"Emoji\\":\\"toot:Emoji\\",\\"Hashtag\\":\\"as:Hashtag\\",\\"ChatMessage\\":\\"http://litepub.social/ns#ChatMessage\\",\\"quoteUrl\\":\\"as:quoteUrl\\",\\"_misskey_quote\\":\\"misskey:_misskey_quote\\",\\"quoteUri\\":\\"fedibird:quoteUri\\",\\"emojiReactions\\":{\\"@id\\":\\"fedibird:emojiReactions\\",\\"@type\\":\\"@id\\"}}];
29248+
[\\"https://w3id.org/identity/v1\\",\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/data-integrity/v1\\",{\\"toot\\":\\"http://joinmastodon.org/ns#\\",\\"misskey\\":\\"https://misskey-hub.net/ns#\\",\\"fedibird\\":\\"http://fedibird.com/ns#\\",\\"sensitive\\":\\"as:sensitive\\",\\"votersCount\\":{\\"@id\\":\\"toot:votersCount\\",\\"@type\\":\\"http://www.w3.org/2001/XMLSchema#nonNegativeInteger\\"},\\"Emoji\\":\\"toot:Emoji\\",\\"Hashtag\\":\\"as:Hashtag\\",\\"ChatMessage\\":\\"http://litepub.social/ns#ChatMessage\\",\\"quoteUrl\\":\\"as:quoteUrl\\",\\"_misskey_quote\\":\\"misskey:_misskey_quote\\",\\"quoteUri\\":\\"fedibird:quoteUri\\",\\"emojiReactions\\":{\\"@id\\":\\"fedibird:emojiReactions\\",\\"@type\\":\\"@id\\"}}];
2924929249
const compacted = await jsonld.compact(
2925029250
values,
2925129251
docContext,
@@ -29570,7 +29570,7 @@ instruments?: (Object | URL)[];}
2957029570
);
2957129571
}
2957229572
const docContext = options.context ??
29573-
[\\"https://w3id.org/identity/v1\\",\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/data-integrity/v1\\",{\\"toot\\":\\"http://joinmastodon.org/ns#\\",\\"misskey\\":\\"https://misskey-hub.net/ns#\\",\\"fedibird\\":\\"http://fedibird.com/ns#\\",\\"sensitive\\":\\"as:sensitive\\",\\"votersCount\\":\\"toot:votersCount\\",\\"Emoji\\":\\"toot:Emoji\\",\\"Hashtag\\":\\"as:Hashtag\\",\\"ChatMessage\\":\\"http://litepub.social/ns#ChatMessage\\",\\"quoteUrl\\":\\"as:quoteUrl\\",\\"_misskey_quote\\":\\"misskey:_misskey_quote\\",\\"quoteUri\\":\\"fedibird:quoteUri\\"}];
29573+
[\\"https://w3id.org/identity/v1\\",\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/data-integrity/v1\\",{\\"toot\\":\\"http://joinmastodon.org/ns#\\",\\"misskey\\":\\"https://misskey-hub.net/ns#\\",\\"fedibird\\":\\"http://fedibird.com/ns#\\",\\"sensitive\\":\\"as:sensitive\\",\\"votersCount\\":{\\"@id\\":\\"toot:votersCount\\",\\"@type\\":\\"http://www.w3.org/2001/XMLSchema#nonNegativeInteger\\"},\\"Emoji\\":\\"toot:Emoji\\",\\"Hashtag\\":\\"as:Hashtag\\",\\"ChatMessage\\":\\"http://litepub.social/ns#ChatMessage\\",\\"quoteUrl\\":\\"as:quoteUrl\\",\\"_misskey_quote\\":\\"misskey:_misskey_quote\\",\\"quoteUri\\":\\"fedibird:quoteUri\\"}];
2957429574
const compacted = await jsonld.compact(
2957529575
values,
2957629576
docContext,
@@ -58109,7 +58109,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti
5810958109
);
5811058110
}
5811158111
const docContext = options.context ??
58112-
[\\"https://w3id.org/identity/v1\\",\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/data-integrity/v1\\",{\\"toot\\":\\"http://joinmastodon.org/ns#\\",\\"misskey\\":\\"https://misskey-hub.net/ns#\\",\\"fedibird\\":\\"http://fedibird.com/ns#\\",\\"sensitive\\":\\"as:sensitive\\",\\"votersCount\\":\\"toot:votersCount\\",\\"Emoji\\":\\"toot:Emoji\\",\\"Hashtag\\":\\"as:Hashtag\\",\\"quoteUrl\\":\\"as:quoteUrl\\",\\"_misskey_quote\\":\\"misskey:_misskey_quote\\",\\"quoteUri\\":\\"fedibird:quoteUri\\",\\"emojiReactions\\":{\\"@id\\":\\"fedibird:emojiReactions\\",\\"@type\\":\\"@id\\"}}];
58112+
[\\"https://w3id.org/identity/v1\\",\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/data-integrity/v1\\",{\\"toot\\":\\"http://joinmastodon.org/ns#\\",\\"misskey\\":\\"https://misskey-hub.net/ns#\\",\\"fedibird\\":\\"http://fedibird.com/ns#\\",\\"sensitive\\":\\"as:sensitive\\",\\"votersCount\\":{\\"@id\\":\\"toot:votersCount\\",\\"@type\\":\\"http://www.w3.org/2001/XMLSchema#nonNegativeInteger\\"},\\"Emoji\\":\\"toot:Emoji\\",\\"Hashtag\\":\\"as:Hashtag\\",\\"quoteUrl\\":\\"as:quoteUrl\\",\\"_misskey_quote\\":\\"misskey:_misskey_quote\\",\\"quoteUri\\":\\"fedibird:quoteUri\\",\\"emojiReactions\\":{\\"@id\\":\\"fedibird:emojiReactions\\",\\"@type\\":\\"@id\\"}}];
5811358113
const compacted = await jsonld.compact(
5811458114
values,
5811558115
docContext,
@@ -69006,7 +69006,7 @@ instruments?: (Object | URL)[];}
6900669006
);
6900769007
}
6900869008
const docContext = options.context ??
69009-
[\\"https://w3id.org/identity/v1\\",\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/v1\\",\\"https://w3id.org/security/data-integrity/v1\\",\\"https://www.w3.org/ns/did/v1\\",\\"https://w3id.org/security/multikey/v1\\",{\\"alsoKnownAs\\":{\\"@id\\":\\"as:alsoKnownAs\\",\\"@type\\":\\"@id\\"},\\"manuallyApprovesFollowers\\":\\"as:manuallyApprovesFollowers\\",\\"sensitive\\":\\"as:sensitive\\",\\"movedTo\\":{\\"@id\\":\\"as:movedTo\\",\\"@type\\":\\"@id\\"},\\"quoteUrl\\":\\"as:quoteUrl\\",\\"toot\\":\\"http://joinmastodon.org/ns#\\",\\"featured\\":{\\"@id\\":\\"toot:featured\\",\\"@type\\":\\"@id\\"},\\"featuredTags\\":{\\"@id\\":\\"toot:featuredTags\\",\\"@type\\":\\"@id\\"},\\"discoverable\\":\\"toot:discoverable\\",\\"suspended\\":\\"toot:suspended\\",\\"memorial\\":\\"toot:memorial\\",\\"indexable\\":\\"toot:indexable\\",\\"votersCount\\":\\"toot:votersCount\\",\\"Emoji\\":\\"toot:Emoji\\",\\"Hashtag\\":\\"as:Hashtag\\",\\"schema\\":\\"http://schema.org#\\",\\"PropertyValue\\":\\"schema:PropertyValue\\",\\"value\\":\\"schema:value\\",\\"ChatMessage\\":\\"http://litepub.social/ns#ChatMessage\\",\\"fedibird\\":\\"http://fedibird.com/ns#\\",\\"quoteUri\\":\\"fedibird:quoteUri\\",\\"misskey\\":\\"https://misskey-hub.net/ns#\\",\\"_misskey_quote\\":\\"misskey:_misskey_quote\\",\\"_misskey_followedMessage\\":\\"misskey:_misskey_followedMessage\\",\\"isCat\\":\\"misskey:isCat\\",\\"emojiReactions\\":{\\"@id\\":\\"fedibird:emojiReactions\\",\\"@type\\":\\"@id\\"}}];
69009+
[\\"https://w3id.org/identity/v1\\",\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/v1\\",\\"https://w3id.org/security/data-integrity/v1\\",\\"https://www.w3.org/ns/did/v1\\",\\"https://w3id.org/security/multikey/v1\\",{\\"alsoKnownAs\\":{\\"@id\\":\\"as:alsoKnownAs\\",\\"@type\\":\\"@id\\"},\\"manuallyApprovesFollowers\\":\\"as:manuallyApprovesFollowers\\",\\"sensitive\\":\\"as:sensitive\\",\\"movedTo\\":{\\"@id\\":\\"as:movedTo\\",\\"@type\\":\\"@id\\"},\\"quoteUrl\\":\\"as:quoteUrl\\",\\"toot\\":\\"http://joinmastodon.org/ns#\\",\\"featured\\":{\\"@id\\":\\"toot:featured\\",\\"@type\\":\\"@id\\"},\\"featuredTags\\":{\\"@id\\":\\"toot:featuredTags\\",\\"@type\\":\\"@id\\"},\\"discoverable\\":\\"toot:discoverable\\",\\"suspended\\":\\"toot:suspended\\",\\"memorial\\":\\"toot:memorial\\",\\"indexable\\":\\"toot:indexable\\",\\"votersCount\\":{\\"@id\\":\\"toot:votersCount\\",\\"@type\\":\\"http://www.w3.org/2001/XMLSchema#nonNegativeInteger\\"},\\"Emoji\\":\\"toot:Emoji\\",\\"Hashtag\\":\\"as:Hashtag\\",\\"schema\\":\\"http://schema.org#\\",\\"PropertyValue\\":\\"schema:PropertyValue\\",\\"value\\":\\"schema:value\\",\\"ChatMessage\\":\\"http://litepub.social/ns#ChatMessage\\",\\"fedibird\\":\\"http://fedibird.com/ns#\\",\\"quoteUri\\":\\"fedibird:quoteUri\\",\\"misskey\\":\\"https://misskey-hub.net/ns#\\",\\"_misskey_quote\\":\\"misskey:_misskey_quote\\",\\"_misskey_followedMessage\\":\\"misskey:_misskey_followedMessage\\",\\"isCat\\":\\"misskey:isCat\\",\\"emojiReactions\\":{\\"@id\\":\\"fedibird:emojiReactions\\",\\"@type\\":\\"@id\\"}}];
6901069010
const compacted = await jsonld.compact(
6901169011
values,
6901269012
docContext,

src/federation/handler.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,10 @@ test("handleCollection()", async () => {
772772
Emoji: "toot:Emoji",
773773
Hashtag: "as:Hashtag",
774774
sensitive: "as:sensitive",
775-
votersCount: "toot:votersCount",
775+
votersCount: {
776+
"@id": "toot:votersCount",
777+
"@type": "http://www.w3.org/2001/XMLSchema#nonNegativeInteger",
778+
},
776779
_misskey_quote: "misskey:_misskey_quote",
777780
quoteUri: "fedibird:quoteUri",
778781
quoteUrl: "as:quoteUrl",

src/sig/proof.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ test("createProof()", async () => {
8484
assertEquals(
8585
proof.proofValue,
8686
decodeHex(
87-
"938622eea473de8223c31cd59f941251e620cd4e1fca9fcda7f37fcd7d27cf8f" +
88-
"9b0f7f381938829d0fa4bb27095919ac8bc86a04e3013c6c3a10d6b73b8a300e",
87+
"203e6afc5b7c6affe08d2d67ad100cc6cdcf1f5a438063d16766204956aa8fdd" +
88+
"67cc04088ccf69de36225cab19377b5a032542fd2454b9b9dd001ffbdef5aa03",
8989
),
9090
);
9191
assertEquals(proof.created, created);

src/vocab/announce.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ defaultContext:
1616
misskey: "https://misskey-hub.net/ns#"
1717
fedibird: "http://fedibird.com/ns#"
1818
sensitive: "as:sensitive"
19-
votersCount: "toot:votersCount"
19+
votersCount:
20+
"@id": "toot:votersCount"
21+
"@type": "http://www.w3.org/2001/XMLSchema#nonNegativeInteger"
2022
Emoji: "toot:Emoji"
2123
Hashtag: "as:Hashtag"
2224
quoteUrl: "as:quoteUrl"

src/vocab/create.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ defaultContext:
1313
misskey: "https://misskey-hub.net/ns#"
1414
fedibird: "http://fedibird.com/ns#"
1515
sensitive: "as:sensitive"
16-
votersCount: "toot:votersCount"
16+
votersCount:
17+
"@id": "toot:votersCount"
18+
"@type": "http://www.w3.org/2001/XMLSchema#nonNegativeInteger"
1719
Emoji: "toot:Emoji"
1820
Hashtag: "as:Hashtag"
1921
ChatMessage: "http://litepub.social/ns#ChatMessage"

src/vocab/delete.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ defaultContext:
1515
misskey: "https://misskey-hub.net/ns#"
1616
fedibird: "http://fedibird.com/ns#"
1717
sensitive: "as:sensitive"
18-
votersCount: "toot:votersCount"
18+
votersCount:
19+
"@id": "toot:votersCount"
20+
"@type": "http://www.w3.org/2001/XMLSchema#nonNegativeInteger"
1921
Emoji: "toot:Emoji"
2022
Hashtag: "as:Hashtag"
2123
ChatMessage: "http://litepub.social/ns#ChatMessage"

src/vocab/question.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ defaultContext:
2121
misskey: "https://misskey-hub.net/ns#"
2222
fedibird: "http://fedibird.com/ns#"
2323
sensitive: "as:sensitive"
24-
votersCount: "toot:votersCount"
24+
votersCount:
25+
"@id": "toot:votersCount"
26+
"@type": "http://www.w3.org/2001/XMLSchema#nonNegativeInteger"
2527
Emoji: "toot:Emoji"
2628
Hashtag: "as:Hashtag"
2729
quoteUrl: "as:quoteUrl"

src/vocab/update.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ defaultContext:
3737
suspended: "toot:suspended"
3838
memorial: "toot:memorial"
3939
indexable: "toot:indexable"
40-
votersCount: "toot:votersCount"
40+
votersCount:
41+
"@id": "toot:votersCount"
42+
"@type": "http://www.w3.org/2001/XMLSchema#nonNegativeInteger"
4143
Emoji: "toot:Emoji"
4244
Hashtag: "as:Hashtag"
4345
schema: "http://schema.org#"

src/vocab/vocab.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { isDeno } from "@david/which-runtime";
22
import { toArray } from "@hongminhee/aitertools";
33
import { parseLanguageTag } from "@phensley/language-tag";
44
import {
5+
assert,
56
assertEquals,
67
assertFalse,
78
assertInstanceOf,
@@ -36,6 +37,7 @@ import {
3637
OrderedCollectionPage,
3738
Person,
3839
Place,
40+
Question,
3941
Source,
4042
} from "./vocab.ts";
4143

@@ -504,6 +506,16 @@ test("Activity.clone()", async () => {
504506
);
505507
});
506508

509+
test("Question.voters", async () => {
510+
const question = new Question({
511+
voters: 123,
512+
});
513+
const json = await question.toJsonLd({ format: "compact" });
514+
assert(typeof json === "object" && json != null);
515+
assert("votersCount" in json);
516+
assertEquals(json["votersCount"], 123);
517+
});
518+
507519
test("Deno.inspect(Object)", () => {
508520
const obj = new Object({
509521
id: new URL("https://example.com/"),

0 commit comments

Comments
 (0)