@fedify/vocab-runtime 2.0.31-dev.2308 → 2.0.31-dev.2316

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/deno.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/vocab-runtime",
3
- "version": "2.0.31-dev.2308+34090b3a",
3
+ "version": "2.0.31-dev.2316+06462f7c",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./src/mod.ts",
@@ -34,6 +34,6 @@
34
34
  },
35
35
  "tasks": {
36
36
  "check": "deno fmt --check && deno lint && deno check src/*.ts",
37
- "test": "deno test"
37
+ "test": "deno test --allow-net --allow-env=LOG"
38
38
  }
39
39
  }
package/dist/mod.cjs CHANGED
@@ -4496,7 +4496,7 @@ const preloadedContexts = {
4496
4496
  "suspended": "toot:suspended",
4497
4497
  "attributionDomains": {
4498
4498
  "@id": "toot:attributionDomains",
4499
- "@type": "@id"
4499
+ "@container": "@set"
4500
4500
  }
4501
4501
  } },
4502
4502
  "https://purl.archive.org/miscellany": miscellany_default
@@ -4504,7 +4504,7 @@ const preloadedContexts = {
4504
4504
  //#endregion
4505
4505
  //#region deno.json
4506
4506
  var name = "@fedify/vocab-runtime";
4507
- var version = "2.0.31-dev.2308+34090b3a";
4507
+ var version = "2.0.31-dev.2316+06462f7c";
4508
4508
  //#endregion
4509
4509
  //#region src/request.ts
4510
4510
  /**
package/dist/mod.js CHANGED
@@ -4491,7 +4491,7 @@ const preloadedContexts = {
4491
4491
  "suspended": "toot:suspended",
4492
4492
  "attributionDomains": {
4493
4493
  "@id": "toot:attributionDomains",
4494
- "@type": "@id"
4494
+ "@container": "@set"
4495
4495
  }
4496
4496
  } },
4497
4497
  "https://purl.archive.org/miscellany": miscellany_default
@@ -4499,7 +4499,7 @@ const preloadedContexts = {
4499
4499
  //#endregion
4500
4500
  //#region deno.json
4501
4501
  var name = "@fedify/vocab-runtime";
4502
- var version = "2.0.31-dev.2308+34090b3a";
4502
+ var version = "2.0.31-dev.2316+06462f7c";
4503
4503
  //#endregion
4504
4504
  //#region src/request.ts
4505
4505
  /**
@@ -1,5 +1,5 @@
1
1
  require("./chunk-Do9eywBl.cjs");
2
- const require_request = require("./request-Ban3HXuI.cjs");
2
+ const require_request = require("./request-BdKDFsbY.cjs");
3
3
  let _logtape_logtape = require("@logtape/logtape");
4
4
  //#region src/body.ts
5
5
  /** Decoded JSON body limit: 16 MiB. @internal */
@@ -1,4 +1,4 @@
1
- import { t as FetchError } from "./request-BV7yaWdl.mjs";
1
+ import { t as FetchError } from "./request-BD0HpfwZ.mjs";
2
2
  import { getLogger } from "@logtape/logtape";
3
3
  //#region src/body.ts
4
4
  /** Decoded JSON body limit: 16 MiB. @internal */
@@ -1,5 +1,5 @@
1
1
  require("./chunk-Do9eywBl.cjs");
2
- const require_body = require("./body-DGmcZ1Kz.cjs");
2
+ const require_body = require("./body-BLtrczC8.cjs");
3
3
  let node_assert_strict = require("node:assert/strict");
4
4
  let node_test = require("node:test");
5
5
  let node_zlib = require("node:zlib");
@@ -1,4 +1,4 @@
1
- import { r as readBoundedText, t as BodyTooLargeError } from "./body-Bx6-vXo_.mjs";
1
+ import { r as readBoundedText, t as BodyTooLargeError } from "./body-PONsC2hg.mjs";
2
2
  import { deepStrictEqual, ok, rejects } from "node:assert/strict";
3
3
  import { test } from "node:test";
4
4
  import { gunzipSync, gzipSync } from "node:zlib";
@@ -1,14 +1,14 @@
1
1
  const require_chunk = require("./chunk-Do9eywBl.cjs");
2
- const require_request = require("./request-Ban3HXuI.cjs");
3
- const require_body = require("./body-DGmcZ1Kz.cjs");
2
+ const require_request = require("./request-BdKDFsbY.cjs");
3
+ const require_body = require("./body-BLtrczC8.cjs");
4
4
  const require_link = require("./link-FguCydMA.cjs");
5
5
  const require_url = require("./url-Qk1svKZU.cjs");
6
- let node_test = require("node:test");
7
6
  let node_zlib = require("node:zlib");
8
7
  let _logtape_logtape = require("@logtape/logtape");
9
8
  let node_assert = require("node:assert");
10
9
  let node_dns_promises = require("node:dns/promises");
11
10
  node_dns_promises = require_chunk.__toESM(node_dns_promises);
11
+ let _fedify_fixture = require("@fedify/fixture");
12
12
  let node_http = require("node:http");
13
13
  let _opentelemetry_api = require("@opentelemetry/api");
14
14
  let jsonld_dist_jsonld_esm_js = require("jsonld/dist/jsonld.esm.js");
@@ -5695,7 +5695,7 @@ const preloadedContexts = {
5695
5695
  "suspended": "toot:suspended",
5696
5696
  "attributionDomains": {
5697
5697
  "@id": "toot:attributionDomains",
5698
- "@type": "@id"
5698
+ "@container": "@set"
5699
5699
  }
5700
5700
  } },
5701
5701
  "https://purl.archive.org/miscellany": miscellany_default
@@ -5906,7 +5906,7 @@ function getDocumentLoader({ allowPrivateAddress, skipPreloadedContexts, userAge
5906
5906
  var jsonld_default = jsonld_dist_jsonld_esm_js.default;
5907
5907
  //#endregion
5908
5908
  //#region src/docloader.test.ts
5909
- (0, node_test.test)("new FetchError()", () => {
5909
+ (0, _fedify_fixture.test)("new FetchError()", () => {
5910
5910
  const e = new require_request.FetchError("https://example.com/", "An error message.");
5911
5911
  (0, node_assert.deepStrictEqual)(e.name, "FetchError");
5912
5912
  (0, node_assert.deepStrictEqual)(e.url, new URL("https://example.com/"));
@@ -5915,7 +5915,7 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
5915
5915
  (0, node_assert.deepStrictEqual)(e2.url, new URL("https://example.org/"));
5916
5916
  (0, node_assert.deepStrictEqual)(e2.message, "https://example.org/");
5917
5917
  });
5918
- (0, node_test.test)("getDocumentLoader()", async (t) => {
5918
+ (0, _fedify_fixture.test)("getDocumentLoader()", async (t) => {
5919
5919
  const fetchDocumentLoader = getDocumentLoader();
5920
5920
  esm_default.spyGlobal();
5921
5921
  esm_default.get("https://example.com/object", { body: {
@@ -5924,7 +5924,7 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
5924
5924
  name: "Fetched object",
5925
5925
  type: "Object"
5926
5926
  } });
5927
- await t.test("ok", async () => {
5927
+ await t.step("ok", async () => {
5928
5928
  (0, node_assert.deepStrictEqual)(await fetchDocumentLoader("https://example.com/object"), {
5929
5929
  contextUrl: null,
5930
5930
  documentUrl: "https://example.com/object",
@@ -5967,7 +5967,7 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
5967
5967
  Link: "<https://example.com/object>; rel=\"alternate\"; type=\"application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"\""
5968
5968
  }
5969
5969
  });
5970
- await t.test("Link header", async () => {
5970
+ await t.step("Link header", async () => {
5971
5971
  (0, node_assert.deepStrictEqual)(await fetchDocumentLoader("https://example.com/link-ctx"), {
5972
5972
  contextUrl: "https://www.w3.org/ns/activitystreams",
5973
5973
  documentUrl: "https://example.com/link-ctx",
@@ -5988,7 +5988,7 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
5988
5988
  }
5989
5989
  });
5990
5990
  });
5991
- await t.test("Link header relative url", async () => {
5991
+ await t.step("Link header relative url", async () => {
5992
5992
  (0, node_assert.deepStrictEqual)(await fetchDocumentLoader("https://example.com/link-ctx"), {
5993
5993
  contextUrl: "https://www.w3.org/ns/activitystreams",
5994
5994
  documentUrl: "https://example.com/link-ctx",
@@ -6009,7 +6009,7 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6009
6009
  }
6010
6010
  });
6011
6011
  });
6012
- await t.test("wrong Link header syntax", async () => {
6012
+ await t.step("wrong Link header syntax", async () => {
6013
6013
  (0, node_assert.deepStrictEqual)(await fetchDocumentLoader("https://example.com/obj-w-wrong-link"), {
6014
6014
  contextUrl: null,
6015
6015
  documentUrl: "https://example.com/obj-w-wrong-link",
@@ -6033,7 +6033,7 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6033
6033
  </html>`,
6034
6034
  headers: { "Content-Type": "text/html; charset=utf-8" }
6035
6035
  });
6036
- await t.test("HTML <link>", async () => {
6036
+ await t.step("HTML <link>", async () => {
6037
6037
  (0, node_assert.deepStrictEqual)(await fetchDocumentLoader("https://example.com/html-link"), {
6038
6038
  contextUrl: null,
6039
6039
  documentUrl: "https://example.com/object",
@@ -6057,7 +6057,7 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6057
6057
  </html>`,
6058
6058
  headers: { "Content-Type": "application/xhtml+xml; charset=utf-8" }
6059
6059
  });
6060
- await t.test("XHTML <link>", async () => {
6060
+ await t.step("XHTML <link>", async () => {
6061
6061
  (0, node_assert.deepStrictEqual)(await fetchDocumentLoader("https://example.com/xhtml-link"), {
6062
6062
  contextUrl: null,
6063
6063
  documentUrl: "https://example.com/object",
@@ -6083,7 +6083,7 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6083
6083
  </html>`,
6084
6084
  headers: { "Content-Type": "text/html; charset=utf-8" }
6085
6085
  });
6086
- await t.test("HTML <a>", async () => {
6086
+ await t.step("HTML <a>", async () => {
6087
6087
  (0, node_assert.deepStrictEqual)(await fetchDocumentLoader("https://example.com/html-a"), {
6088
6088
  contextUrl: null,
6089
6089
  documentUrl: "https://example.com/object",
@@ -6104,7 +6104,7 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6104
6104
  },
6105
6105
  headers: { "Content-Type": "text/html; charset=utf-8" }
6106
6106
  });
6107
- await t.test("Wrong Content-Type", async () => {
6107
+ await t.step("Wrong Content-Type", async () => {
6108
6108
  (0, node_assert.deepStrictEqual)(await fetchDocumentLoader("https://example.com/wrong-content-type"), {
6109
6109
  contextUrl: null,
6110
6110
  documentUrl: "https://example.com/wrong-content-type",
@@ -6117,18 +6117,33 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6117
6117
  });
6118
6118
  });
6119
6119
  esm_default.get("https://example.com/404", { status: 404 });
6120
- await t.test("not ok", async () => {
6120
+ await t.step("not ok", async () => {
6121
6121
  await (0, node_assert.rejects)(() => fetchDocumentLoader("https://example.com/404"), require_request.FetchError, "HTTP 404: https://example.com/404");
6122
6122
  });
6123
- await t.test("preloaded contexts", async () => {
6123
+ await t.step("preloaded contexts", async () => {
6124
6124
  for (const [url, document] of Object.entries(preloadedContexts)) (0, node_assert.deepStrictEqual)(await fetchDocumentLoader(url), {
6125
6125
  contextUrl: null,
6126
6126
  documentUrl: url,
6127
6127
  document
6128
6128
  });
6129
6129
  });
6130
+ await t.step("preloaded Mastodon attribution domains", async () => {
6131
+ const context = ["https://www.w3.org/ns/activitystreams", "http://joinmastodon.org/ns"];
6132
+ const expanded = await jsonld_default.expand({
6133
+ "@context": context,
6134
+ id: "https://social.example/users/alice",
6135
+ type: "Person",
6136
+ attributionDomains: ["blog.example"]
6137
+ }, { documentLoader: fetchDocumentLoader });
6138
+ (0, node_assert.deepStrictEqual)(expanded, [{
6139
+ "@id": "https://social.example/users/alice",
6140
+ "@type": ["https://www.w3.org/ns/activitystreams#Person"],
6141
+ "http://joinmastodon.org/ns#attributionDomains": [{ "@value": "blog.example" }]
6142
+ }]);
6143
+ (0, node_assert.deepStrictEqual)((await jsonld_default.compact(expanded, context, { documentLoader: fetchDocumentLoader })).attributionDomains, ["blog.example"]);
6144
+ });
6130
6145
  esm_default.get("https://www.w3.org/ns/cid/v1", { status: 503 });
6131
- await t.test("preloaded CID v1 context", async () => {
6146
+ await t.step("preloaded CID v1 context", async () => {
6132
6147
  const url = "https://www.w3.org/ns/cid/v1";
6133
6148
  (0, node_assert.deepStrictEqual)(await fetchDocumentLoader(url), {
6134
6149
  contextUrl: null,
@@ -6136,7 +6151,7 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6136
6151
  document: cid_v1_default
6137
6152
  });
6138
6153
  });
6139
- await t.test("preloaded FEP-ef61 context", async () => {
6154
+ await t.step("preloaded FEP-ef61 context", async () => {
6140
6155
  const url = "https://w3id.org/fep/ef61";
6141
6156
  (0, node_assert.ok)(url in preloadedContexts);
6142
6157
  (0, node_assert.deepStrictEqual)(await fetchDocumentLoader(url), {
@@ -6153,7 +6168,7 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6153
6168
  });
6154
6169
  });
6155
6170
  esm_default.get("https://w3id.org/fep/7aa9", { status: 502 });
6156
- await t.test("preloaded FEP-7aa9 context", async () => {
6171
+ await t.step("preloaded FEP-7aa9 context", async () => {
6157
6172
  const url = "https://w3id.org/fep/7aa9";
6158
6173
  (0, node_assert.deepStrictEqual)(await fetchDocumentLoader(url), {
6159
6174
  contextUrl: null,
@@ -6184,7 +6199,7 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6184
6199
  (0, node_assert.deepStrictEqual)(esm_default.callHistory.calls(url).length, 0);
6185
6200
  });
6186
6201
  esm_default.get("https://w3id.org/fep/6757", { status: 502 });
6187
- await t.test("preloaded FEP-6757 context", async () => {
6202
+ await t.step("preloaded FEP-6757 context", async () => {
6188
6203
  const url = "https://w3id.org/fep/6757";
6189
6204
  (0, node_assert.deepStrictEqual)(await fetchDocumentLoader(url), {
6190
6205
  contextUrl: null,
@@ -6213,7 +6228,7 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6213
6228
  (0, node_assert.deepStrictEqual)(esm_default.callHistory.calls(url).length, 0);
6214
6229
  });
6215
6230
  esm_default.get("https://w3id.org/fep/22cd", { status: 502 });
6216
- await t.test("preloaded FEP-22cd context", async () => {
6231
+ await t.step("preloaded FEP-22cd context", async () => {
6217
6232
  const url = "https://w3id.org/fep/22cd";
6218
6233
  const articleId = "https://example.com/articles/1";
6219
6234
  const translatorId = "https://example.com/users/alice";
@@ -6291,7 +6306,7 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6291
6306
  (0, node_assert.deepStrictEqual)(esm_default.callHistory.calls(url).length, 0);
6292
6307
  (0, node_assert.deepStrictEqual)(esm_default.callHistory.calls("https://www.w3.org/ns/activitystreams").length, 0);
6293
6308
  });
6294
- await t.test("deny non-HTTP/HTTPS", async () => {
6309
+ await t.step("deny non-HTTP/HTTPS", async () => {
6295
6310
  await (0, node_assert.rejects)(() => fetchDocumentLoader("ftp://localhost"), require_url.UrlError);
6296
6311
  });
6297
6312
  esm_default.get("https://example.com/localhost-redirect", {
@@ -6316,13 +6331,13 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6316
6331
  name: "Fetched object",
6317
6332
  type: "Object"
6318
6333
  } });
6319
- await t.test("allowPrivateAddress: false", async () => {
6334
+ await t.step("allowPrivateAddress: false", async () => {
6320
6335
  await (0, node_assert.rejects)(() => fetchDocumentLoader("https://localhost/object"), require_url.UrlError);
6321
6336
  await (0, node_assert.rejects)(() => fetchDocumentLoader("https://example.com/localhost-redirect"), require_url.UrlError);
6322
6337
  await (0, node_assert.rejects)(() => fetchDocumentLoader("https://example.com/localhost-link"), require_url.UrlError);
6323
6338
  });
6324
6339
  const fetchDocumentLoader2 = getDocumentLoader({ allowPrivateAddress: true });
6325
- await t.test("allowPrivateAddress: true", async () => {
6340
+ await t.step("allowPrivateAddress: true", async () => {
6326
6341
  const expected = {
6327
6342
  contextUrl: null,
6328
6343
  documentUrl: "https://localhost/object",
@@ -6345,7 +6360,7 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6345
6360
  headers: { Location: `https://example.com/too-many-redirects/${Number(cl.url.split("/").at(-1)) + 1}` }
6346
6361
  };
6347
6362
  });
6348
- await t.test("too many redirects", async () => {
6363
+ await t.step("too many redirects", async () => {
6349
6364
  redirectAttempts = 0;
6350
6365
  await (0, node_assert.rejects)(() => fetchDocumentLoader("https://example.com/too-many-redirects/0"), require_request.FetchError, "Too many redirections");
6351
6366
  (0, node_assert.deepStrictEqual)(redirectAttempts, 21);
@@ -6365,7 +6380,7 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6365
6380
  headers: { Location: "https://example.com/redirect-loop-a" }
6366
6381
  };
6367
6382
  });
6368
- await t.test("redirect loop", async () => {
6383
+ await t.step("redirect loop", async () => {
6369
6384
  loopAttempts = 0;
6370
6385
  await (0, node_assert.rejects)(() => fetchDocumentLoader("https://example.com/redirect-loop-a"), require_request.FetchError, "Redirect loop detected");
6371
6386
  (0, node_assert.deepStrictEqual)(loopAttempts, 2);
@@ -6378,7 +6393,7 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6378
6393
  headers: { Location: "/redirect-loop-relative" }
6379
6394
  };
6380
6395
  });
6381
- await t.test("redirect loop with relative location", async () => {
6396
+ await t.step("redirect loop with relative location", async () => {
6382
6397
  relativeLoopAttempts = 0;
6383
6398
  await (0, node_assert.rejects)(() => fetchDocumentLoader("https://example.com/redirect-loop-relative"), require_request.FetchError, "Redirect loop detected");
6384
6399
  (0, node_assert.deepStrictEqual)(relativeLoopAttempts, 1);
@@ -6388,7 +6403,7 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6388
6403
  body: maliciousPayload,
6389
6404
  headers: { "Content-Type": "text/html; charset=utf-8" }
6390
6405
  });
6391
- await t.test("ReDoS resistance (CVE-2025-68475)", async () => {
6406
+ await t.step("ReDoS resistance (CVE-2025-68475)", async () => {
6392
6407
  const start = performance.now();
6393
6408
  await (0, node_assert.rejects)(() => fetchDocumentLoader("https://example.com/redos"), SyntaxError);
6394
6409
  const elapsed = performance.now() - start;
@@ -6396,7 +6411,7 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6396
6411
  });
6397
6412
  esm_default.hardReset();
6398
6413
  });
6399
- (0, node_test.test)("getDocumentLoader() bounds JSON, HTML, and alternate documents", async () => {
6414
+ (0, _fedify_fixture.test)("getDocumentLoader() bounds JSON, HTML, and alternate documents", async () => {
6400
6415
  const url = "https://example.com/bounded";
6401
6416
  esm_default.mockGlobal();
6402
6417
  let oversized = true;
@@ -6426,7 +6441,7 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6426
6441
  esm_default.hardReset();
6427
6442
  }
6428
6443
  });
6429
- (0, node_test.test)("getDocumentLoader() rejects oversized gzip responses from fetch", async () => {
6444
+ (0, _fedify_fixture.test)("getDocumentLoader() rejects oversized gzip responses from fetch", async () => {
6430
6445
  const document = { name: "a".repeat(16 * 1024 * 1024) };
6431
6446
  const compressed = (0, node_zlib.gzipSync)(JSON.stringify(document));
6432
6447
  (0, node_assert.ok)(compressed.byteLength < 64 * 1024);
@@ -6456,7 +6471,7 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6456
6471
  });
6457
6472
  }
6458
6473
  });
6459
- (0, node_test.test)("getRemoteDocument() bounds JSON by default", async () => {
6474
+ (0, _fedify_fixture.test)("getRemoteDocument() bounds JSON by default", async () => {
6460
6475
  let canceled = false;
6461
6476
  let pulls = 0;
6462
6477
  await (0, node_assert.rejects)(getRemoteDocument("https://example.com/document", new Response(new ReadableStream({
@@ -6473,17 +6488,14 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6473
6488
  (0, node_assert.deepStrictEqual)(canceled, true);
6474
6489
  (0, node_assert.deepStrictEqual)(pulls, 257);
6475
6490
  });
6476
- (0, node_test.test)("getDocumentLoader() logs DNS failures as such", async (t) => {
6477
- if ("Deno" in globalThis && (await Deno.permissions.query({ name: "net" })).state !== "granted") {
6478
- t.skip("requires the net permission");
6479
- return;
6480
- }
6491
+ (0, _fedify_fixture.test)("getDocumentLoader() logs DNS failures as such", async (t) => {
6492
+ if ("Deno" in globalThis && (await Deno.permissions.query({ name: "net" })).state !== "granted") throw new Error("This DNS test requires Deno network permission (--allow-net).");
6481
6493
  const loader = getDocumentLoader();
6482
6494
  for (const result of [
6483
6495
  "throws",
6484
6496
  "empty",
6485
6497
  "private"
6486
- ]) await t.test(result, async () => {
6498
+ ]) await t.step(result, async () => {
6487
6499
  const originalLookup = node_dns_promises.default.lookup;
6488
6500
  node_dns_promises.default.lookup = (() => result === "throws" ? Promise.reject(/* @__PURE__ */ new Error("Resolver unavailable")) : Promise.resolve(result === "empty" ? [] : [{
6489
6501
  address: "127.0.0.1",
@@ -6531,14 +6543,14 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6531
6543
  }
6532
6544
  });
6533
6545
  });
6534
- (0, node_test.test)("getDocumentLoader() bounds alternate document chains", async (t) => {
6546
+ (0, _fedify_fixture.test)("getDocumentLoader() bounds alternate document chains", async (t) => {
6535
6547
  const base = "https://example.com/alternate-chain/";
6536
6548
  const loader = getDocumentLoader({ allowPrivateAddress: true });
6537
6549
  for (const mode of [
6538
6550
  "header",
6539
6551
  "html",
6540
6552
  "mixed"
6541
- ]) for (const hops of [20, 21]) await t.test(`${mode}: ${hops} hops`, async () => {
6553
+ ]) for (const hops of [20, 21]) await t.step(`${mode}: ${hops} hops`, async () => {
6542
6554
  esm_default.mockGlobal();
6543
6555
  let requests = 0;
6544
6556
  esm_default.get(`begin:${base}`, ({ url }) => {
@@ -6567,7 +6579,7 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6567
6579
  "alternate-redirect",
6568
6580
  "redirect-alternate",
6569
6581
  "redirect-intermediate"
6570
- ]) await t.test(`${mode}: cycle`, async () => {
6582
+ ]) await t.step(`${mode}: cycle`, async () => {
6571
6583
  esm_default.mockGlobal();
6572
6584
  let requests = 0;
6573
6585
  esm_default.get(`begin:${base}`, ({ url }) => {
@@ -6589,7 +6601,7 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6589
6601
  esm_default.hardReset();
6590
6602
  }
6591
6603
  });
6592
- await t.test("alternate followed by 20 redirects shares the limit", async () => {
6604
+ await t.step("alternate followed by 20 redirects shares the limit", async () => {
6593
6605
  esm_default.mockGlobal();
6594
6606
  let requests = 0;
6595
6607
  esm_default.get(`begin:${base}`, ({ url }) => {
@@ -6609,7 +6621,7 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6609
6621
  esm_default.hardReset();
6610
6622
  }
6611
6623
  });
6612
- await t.test("relative alternate after redirect and isolated calls", async () => {
6624
+ await t.step("relative alternate after redirect and isolated calls", async () => {
6613
6625
  esm_default.mockGlobal();
6614
6626
  esm_default.get(`${base}start`, Response.redirect(`${base}html`, 302));
6615
6627
  esm_default.get(`${base}html`, alternate("./document", true));
@@ -6633,10 +6645,10 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6633
6645
  } });
6634
6646
  }
6635
6647
  });
6636
- (0, node_test.test)("getDocumentLoader() preserves cancellation across alternates", async (t) => {
6648
+ (0, _fedify_fixture.test)("getDocumentLoader() preserves cancellation across alternates", async (t) => {
6637
6649
  const base = "https://example.com/alternate-abort/";
6638
6650
  const loader = getDocumentLoader({ allowPrivateAddress: true });
6639
- for (const html of [false, true]) await t.test(html ? "HTML" : "Link header", async () => {
6651
+ for (const html of [false, true]) await t.step(html ? "HTML" : "Link header", async () => {
6640
6652
  esm_default.mockGlobal();
6641
6653
  const controller = new AbortController();
6642
6654
  let requests = 0;
@@ -6659,7 +6671,7 @@ var jsonld_default = jsonld_dist_jsonld_esm_js.default;
6659
6671
  }
6660
6672
  });
6661
6673
  });
6662
- (0, node_test.test)("getDocumentLoader() rejects cancellation before fetching", async () => {
6674
+ (0, _fedify_fixture.test)("getDocumentLoader() rejects cancellation before fetching", async () => {
6663
6675
  esm_default.mockGlobal();
6664
6676
  let requests = 0;
6665
6677
  const url = "https://example.com/pre-aborted-alternate";