@fedify/fedify 1.3.1 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGES.md CHANGED
@@ -3,6 +3,24 @@
3
3
  Fedify changelog
4
4
  ================
5
5
 
6
+ Version 1.3.3
7
+ -------------
8
+
9
+ Released on December 30, 2024.
10
+
11
+ - The `fetchDocumentLoader()` function now preloads the following JSON-LD
12
+ context: <https://gotosocial.org/ns>.
13
+
14
+
15
+ Version 1.3.2
16
+ -------------
17
+
18
+ Released on December 18, 2024.
19
+
20
+ - Fixed the default document loader to handle the `Link` header with
21
+ incorrect syntax. [[#196]]
22
+
23
+
6
24
  Version 1.3.1
7
25
  -------------
8
26
 
@@ -129,6 +147,15 @@ Released on November 30, 2024.
129
147
  [#193]: https://github.com/dahlia/fedify/issues/193
130
148
 
131
149
 
150
+ Version 1.2.10
151
+ --------------
152
+
153
+ Released on December 18, 2024.
154
+
155
+ - Fixed the default document loader to handle the `Link` header with
156
+ incorrect syntax. [[#196]]
157
+
158
+
132
159
  Version 1.2.9
133
160
  -------------
134
161
 
@@ -344,6 +371,15 @@ Released on October 31, 2024.
344
371
  [#118]: https://github.com/dahlia/fedify/issues/118
345
372
 
346
373
 
374
+ Version 1.1.10
375
+ --------------
376
+
377
+ Released on December 18, 2024.
378
+
379
+ - Fixed the default document loader to handle the `Link` header with
380
+ incorrect syntax. [[#196]]
381
+
382
+
347
383
  Version 1.1.9
348
384
  -------------
349
385
 
@@ -600,6 +636,17 @@ Released on October 20, 2024.
600
636
  [#150]: https://github.com/dahlia/fedify/issues/150
601
637
 
602
638
 
639
+ Version 1.0.13
640
+ --------------
641
+
642
+ Released on December 18, 2024.
643
+
644
+ - Fixed the default document loader to handle the `Link` header with
645
+ incorrect syntax. [[#196]]
646
+
647
+ [#196]: https://github.com/dahlia/fedify/issues/196
648
+
649
+
603
650
  Version 1.0.12
604
651
  --------------
605
652
 
package/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "@fedify/fedify",
3
- "version": "1.3.1",
3
+ "version": "1.3.3",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./mod.ts",
@@ -1,5 +1,5 @@
1
1
  import * as dntShim from "../_dnt.shims.js";
2
- import { encodeHex } from "../deps/jsr.io/@std/encoding/1.0.5/hex.js";
2
+ import { encodeHex } from "../deps/jsr.io/@std/encoding/1.0.6/hex.js";
3
3
  /**
4
4
  * Calculates the [partial follower collection digest][1].
5
5
  *
@@ -4154,5 +4154,38 @@ const preloadedContexts = {
4154
4154
  "yield": { "@id": "schema:yield" },
4155
4155
  },
4156
4156
  },
4157
+ "https://gotosocial.org/ns": {
4158
+ "@context": {
4159
+ "gts": "https://gotosocial.org/ns#",
4160
+ "interactionPolicy": {
4161
+ "@id": "gts:interactionPolicy",
4162
+ "@type": "@id",
4163
+ },
4164
+ "canLike": {
4165
+ "@id": "gts:canLike",
4166
+ "@type": "@id",
4167
+ },
4168
+ "canReply": {
4169
+ "@id": "gts:canReply",
4170
+ "@type": "@id",
4171
+ },
4172
+ "canAnnounce": {
4173
+ "@id": "gts:canAnnounce",
4174
+ "@type": "@id",
4175
+ },
4176
+ "always": {
4177
+ "@id": "gts:always",
4178
+ "@type": "@id",
4179
+ },
4180
+ "approvalRequired": {
4181
+ "@id": "gts:approvalRequired",
4182
+ "@type": "@id",
4183
+ },
4184
+ "approvedBy": {
4185
+ "@id": "gts:approvedBy",
4186
+ "@type": "@id",
4187
+ },
4188
+ },
4189
+ },
4157
4190
  };
4158
4191
  export default preloadedContexts;
@@ -66,7 +66,18 @@ async function getRemoteDocument(url, response, fetch) {
66
66
  const linkHeader = response.headers.get("Link");
67
67
  let contextUrl = null;
68
68
  if (linkHeader != null) {
69
- const link = new HTTPHeaderLink(linkHeader);
69
+ let link;
70
+ try {
71
+ link = new HTTPHeaderLink(linkHeader);
72
+ }
73
+ catch (e) {
74
+ if (e instanceof SyntaxError) {
75
+ link = new HTTPHeaderLink();
76
+ }
77
+ else {
78
+ throw e;
79
+ }
80
+ }
70
81
  if (jsonLd) {
71
82
  const entries = link.getByRel("http://www.w3.org/ns/json-ld#context");
72
83
  for (const [uri, params] of entries) {
@@ -1,9 +1,9 @@
1
1
  import * as dntShim from "../_dnt.shims.js";
2
2
  import { createPublicKey } from "node:crypto";
3
3
  import { concat } from "../deps/jsr.io/@std/bytes/1.0.4/concat.js";
4
- import { decodeBase64, encodeBase64 } from "../deps/jsr.io/@std/encoding/1.0.5/base64.js";
5
- import { decodeBase64Url } from "../deps/jsr.io/@std/encoding/1.0.5/base64url.js";
6
- import { decodeHex } from "../deps/jsr.io/@std/encoding/1.0.5/hex.js";
4
+ import { decodeBase64, encodeBase64 } from "../deps/jsr.io/@std/encoding/1.0.6/base64.js";
5
+ import { decodeBase64Url } from "../deps/jsr.io/@std/encoding/1.0.6/base64url.js";
6
+ import { decodeHex } from "../deps/jsr.io/@std/encoding/1.0.6/hex.js";
7
7
  import { Integer, Sequence } from "asn1js";
8
8
  import { decode, encode } from "multibase";
9
9
  import { addPrefix, getCodeFromData, rmPrefix } from "multicodec";
package/esm/sig/http.js CHANGED
@@ -3,8 +3,8 @@ import { getLogger } from "@logtape/logtape";
3
3
  import { SpanStatusCode, trace, } from "@opentelemetry/api";
4
4
  import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_URL_FULL, } from "@opentelemetry/semantic-conventions";
5
5
  import { equals } from "../deps/jsr.io/@std/bytes/1.0.4/mod.js";
6
- import { decodeBase64, encodeBase64 } from "../deps/jsr.io/@std/encoding/1.0.5/base64.js";
7
- import { encodeHex } from "../deps/jsr.io/@std/encoding/1.0.5/hex.js";
6
+ import { decodeBase64, encodeBase64 } from "../deps/jsr.io/@std/encoding/1.0.6/base64.js";
7
+ import { encodeHex } from "../deps/jsr.io/@std/encoding/1.0.6/hex.js";
8
8
  import metadata from "../deno.js";
9
9
  import { CryptographicKey } from "../vocab/vocab.js";
10
10
  import { fetchKey, validateCryptoKey } from "./key.js";
package/esm/sig/ld.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as dntShim from "../_dnt.shims.js";
2
2
  import { getLogger } from "@logtape/logtape";
3
3
  import { SpanStatusCode, trace } from "@opentelemetry/api";
4
- import { decodeBase64, encodeBase64 } from "../deps/jsr.io/@std/encoding/1.0.5/base64.js";
5
- import { encodeHex } from "../deps/jsr.io/@std/encoding/1.0.5/hex.js";
4
+ import { decodeBase64, encodeBase64 } from "../deps/jsr.io/@std/encoding/1.0.6/base64.js";
5
+ import { encodeHex } from "../deps/jsr.io/@std/encoding/1.0.6/hex.js";
6
6
  // @ts-ignore TS7016
7
7
  import jsonld from "jsonld";
8
8
  import metadata from "../deno.js";
package/esm/sig/proof.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as dntShim from "../_dnt.shims.js";
2
2
  import { getLogger } from "@logtape/logtape";
3
3
  import { SpanStatusCode, trace } from "@opentelemetry/api";
4
- import { encodeHex } from "../deps/jsr.io/@std/encoding/1.0.5/hex.js";
4
+ import { encodeHex } from "../deps/jsr.io/@std/encoding/1.0.6/hex.js";
5
5
  // @ts-ignore: json-canon is not typed
6
6
  import serialize from "json-canon";
7
7
  import metadata from "../deno.js";