@fedify/vocab 2.4.0-dev.1959 → 2.4.0-dev.1964

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.
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  globalThis.addEventListener = () => {};
3
- import { A as OrderedCollectionPage, B as Service, C as InteractionRule, D as Note, E as Multikey, F as Proposal, G as vocab_exports, H as Tombstone, I as Question, L as QuoteAuthorization, M as Person, N as Place, O as Object$1, P as PropertyValue, R as QuoteRequest, S as InteractionPolicy, T as Measure, V as Source, _ as Follow, a as Application, b as Image, c as Create, d as Document, f as Endpoints, g as FeaturedItem, h as FeaturedCollection, i as Announce, j as Organization, k as Offer, l as CryptographicKey, m as FeatureRequest, n as Activity, o as Collection, p as FeatureAuthorization, r as Agreement, s as Commitment, t as Accept, u as Delete, v as Group, w as Link, x as Intent, y as Hashtag, z as Reject } from "./vocab-CNiWKo57.mjs";
3
+ import { A as Offer, B as Reject, C as InteractionPolicy, D as Multikey, E as Measure, F as PropertyValue, H as Source, I as Proposal, J as vocab_exports, L as Question, M as Organization, N as Person, O as Note, P as Place, R as QuoteAuthorization, S as Intent, T as Link, U as Tombstone, V as Service, _ as FeaturedItem, a as Application, b as Hashtag, c as Commitment, d as Delete, f as Document, g as FeaturedCollection, h as FeatureRequest, i as Announce, j as OrderedCollectionPage, k as Object$1, l as Create, m as FeatureAuthorization, n as Activity, p as Endpoints, r as Agreement, s as Collection, t as Accept, u as CryptographicKey, v as Follow, w as InteractionRule, x as Image, y as Group, z as QuoteRequest } from "./vocab-D3s0_CFf.mjs";
4
4
  import { t as assertInstanceOf } from "./utils-Df2odC27.mjs";
5
5
  import { mockDocumentLoader, test } from "@fedify/fixture";
6
6
  import { deepStrictEqual, notDeepStrictEqual, ok, rejects, throws } from "node:assert/strict";
@@ -3566,7 +3566,9 @@ for (const typeUri in types) {
3566
3566
  ...initValues
3567
3567
  });
3568
3568
  const jsonLd = await instance.toJsonLd({ contextLoader: mockDocumentLoader });
3569
- deepStrictEqual(jsonLd["@context"], type.defaultContext);
3569
+ const defaultContexts = Array.isArray(type.defaultContext) ? type.defaultContext : [type.defaultContext];
3570
+ const extraContexts = [...new Set(allProperties.flatMap((property) => property.extraContext == null || defaultContexts.some((context) => context === property.extraContext) ? [] : [property.extraContext]))];
3571
+ deepStrictEqual(jsonLd["@context"], extraContexts.length === 0 ? type.defaultContext : [...defaultContexts, ...extraContexts]);
3570
3572
  if (type.entity) deepStrictEqual(jsonLd.id, "https://example.com/");
3571
3573
  const restored = await cls.fromJsonLd(jsonLd, {
3572
3574
  documentLoader: mockDocumentLoader,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/vocab",
3
- "version": "2.4.0-dev.1959+0da7be03",
3
+ "version": "2.4.0-dev.1964+1d28dc03",
4
4
  "homepage": "https://fedify.dev/",
5
5
  "repository": {
6
6
  "type": "git",
@@ -43,9 +43,9 @@
43
43
  "jsonld": "^9.0.0",
44
44
  "pkijs": "^3.3.3",
45
45
  "temporal-polyfill": "^1.0.1",
46
- "@fedify/vocab-tools": "2.4.0-dev.1959+0da7be03",
47
- "@fedify/vocab-runtime": "2.4.0-dev.1959+0da7be03",
48
- "@fedify/webfinger": "2.4.0-dev.1959+0da7be03"
46
+ "@fedify/vocab-tools": "2.4.0-dev.1964+1d28dc03",
47
+ "@fedify/vocab-runtime": "2.4.0-dev.1964+1d28dc03",
48
+ "@fedify/webfinger": "2.4.0-dev.1964+1d28dc03"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/node": "^22.17.0",