Unverified Commit 07adbc9b authored by Hong Minhee's avatar Hong Minhee
Browse files

Merge tag '1.1.21' into 1.2-maintenance

Fedify 1.1.21
parents 5ae84c4b 95180832
Loading
Loading
Loading
Loading
+52 −0
Original line number Diff line number Diff line
@@ -8,6 +8,22 @@ Version 1.2.21

To be released.

 -  Activity Vocabulary API became to accept [RFC 3339] date-time strings
    without a timezone offset.  This is not a bug fix, but improves
    interoperability with some implementations that do not include a timezone
    offset in their date-time strings including WordPress.  [[#226]]

 -  Added the following default context to `Undo` class:

    ~~~~ json
    {
      "litepub": "http://litepub.social/ns#",
      "toot": "http://joinmastodon.org/ns#",
      "EmojiReact": "litepub:EmojiReact",
      "Emoji": "toot:Emoji"
    }
    ~~~~


Version 1.2.20
--------------
@@ -375,6 +391,28 @@ Released on October 31, 2024.
[#118]: https://github.com/dahlia/fedify/issues/118


Version 1.1.21
--------------

Released on April 8, 2025.

 -  Activity Vocabulary API became to accept [RFC 3339] date-time strings
    without a timezone offset.  This is not a bug fix, but improves
    interoperability with some implementations that do not include a timezone
    offset in their date-time strings including WordPress.  [[#226]]

 -  Added the following default context to `Undo` class:

    ~~~~ json
    {
      "litepub": "http://litepub.social/ns#",
      "toot": "http://joinmastodon.org/ns#",
      "EmojiReact": "litepub:EmojiReact",
      "Emoji": "toot:Emoji"
    }
    ~~~~


Version 1.1.20
--------------

@@ -782,6 +820,20 @@ Released on October 20, 2024.
[#150]: https://github.com/dahlia/fedify/issues/150


Version 1.0.24
--------------

Released on April 8, 2025.

 -  Activity Vocabulary API became to accept [RFC 3339] date-time strings
    without a timezone offset.  This is not a bug fix, but improves
    interoperability with some implementations that do not include a timezone
    offset in their date-time strings including WordPress.  [[#226]]

[RFC 3339]: https://datatracker.ietf.org/doc/html/rfc3339
[#226]: https://github.com/fedify-dev/fedify/issues/226


Version 1.0.23
--------------

+39 −8
Original line number Diff line number Diff line
@@ -5282,7 +5282,11 @@ get urls(): ((URL | Link))[] {
        : _219RwDanjScTv5tYCjwGZVCM7KZ9_endTime__array
    ) {
      if (v == null) continue;
    _219RwDanjScTv5tYCjwGZVCM7KZ9_endTime.push(Temporal.Instant.from(v[\\"@value\\"]))
    _219RwDanjScTv5tYCjwGZVCM7KZ9_endTime.push(Temporal.Instant.from(
        v[\\"@value\\"].substring(19).match(/[Z+-]/)
          ? v[\\"@value\\"]
          : v[\\"@value\\"] + \\"Z\\"
      ))
    }
    instance.#_219RwDanjScTv5tYCjwGZVCM7KZ9_endTime = _219RwDanjScTv5tYCjwGZVCM7KZ9_endTime;
    const _86xFhmgBapoMvYqjbjRuDPayTrS_generator: (Object | Link | URL)[] = [];
@@ -5497,7 +5501,11 @@ get urls(): ((URL | Link))[] {
        : _5e258TDXtuhaFRPZiGoDfEpjdMr_published__array
    ) {
      if (v == null) continue;
    _5e258TDXtuhaFRPZiGoDfEpjdMr_published.push(Temporal.Instant.from(v[\\"@value\\"]))
    _5e258TDXtuhaFRPZiGoDfEpjdMr_published.push(Temporal.Instant.from(
        v[\\"@value\\"].substring(19).match(/[Z+-]/)
          ? v[\\"@value\\"]
          : v[\\"@value\\"] + \\"Z\\"
      ))
    }
    instance.#_5e258TDXtuhaFRPZiGoDfEpjdMr_published = _5e258TDXtuhaFRPZiGoDfEpjdMr_published;
    const _7UpwM3JWcXhADcscukEehBorf6k_replies: (Collection | URL)[] = [];
@@ -5538,7 +5546,11 @@ get urls(): ((URL | Link))[] {
        : _2w3Jmue4up8iVDUA51WZqomEF438_startTime__array
    ) {
      if (v == null) continue;
    _2w3Jmue4up8iVDUA51WZqomEF438_startTime.push(Temporal.Instant.from(v[\\"@value\\"]))
    _2w3Jmue4up8iVDUA51WZqomEF438_startTime.push(Temporal.Instant.from(
        v[\\"@value\\"].substring(19).match(/[Z+-]/)
          ? v[\\"@value\\"]
          : v[\\"@value\\"] + \\"Z\\"
      ))
    }
    instance.#_2w3Jmue4up8iVDUA51WZqomEF438_startTime = _2w3Jmue4up8iVDUA51WZqomEF438_startTime;
    const _4LqirZspQbFWWQEbFcXAxm7tTDN1_summary: ((string | LanguageString))[] = [];
@@ -5614,7 +5626,11 @@ get urls(): ((URL | Link))[] {
        : _385aB7ySixcf5Un6z3VsWmThgCzQ_updated__array
    ) {
      if (v == null) continue;
    _385aB7ySixcf5Un6z3VsWmThgCzQ_updated.push(Temporal.Instant.from(v[\\"@value\\"]))
    _385aB7ySixcf5Un6z3VsWmThgCzQ_updated.push(Temporal.Instant.from(
        v[\\"@value\\"].substring(19).match(/[Z+-]/)
          ? v[\\"@value\\"]
          : v[\\"@value\\"] + \\"Z\\"
      ))
    }
    instance.#_385aB7ySixcf5Un6z3VsWmThgCzQ_updated = _385aB7ySixcf5Un6z3VsWmThgCzQ_updated;
    const _2oPEH9MQ3aj8JVwyYuWkqoVwV865_url: ((URL | Link))[] = [];
@@ -11219,7 +11235,11 @@ cryptosuite?: \\"eddsa-jcs-2022\\" | null;verificationMethod?: Multikey | URL |
        : _3qzP3ukEZoUziK5FEiA1RhU4aqac__array
    ) {
      if (v == null) continue;
    _3qzP3ukEZoUziK5FEiA1RhU4aqac.push(Temporal.Instant.from(v[\\"@value\\"]))
    _3qzP3ukEZoUziK5FEiA1RhU4aqac.push(Temporal.Instant.from(
        v[\\"@value\\"].substring(19).match(/[Z+-]/)
          ? v[\\"@value\\"]
          : v[\\"@value\\"] + \\"Z\\"
      ))
    }
    instance.#_3qzP3ukEZoUziK5FEiA1RhU4aqac = _3qzP3ukEZoUziK5FEiA1RhU4aqac;
    
@@ -44977,7 +44997,14 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti
      const decoded =
      typeof v === \\"object\\" && \\"@type\\" in v
        && \\"@value\\" in v && typeof v[\\"@value\\"] === \\"string\\"
        && v[\\"@type\\"] === \\"http://www.w3.org/2001/XMLSchema#dateTime\\" ? Temporal.Instant.from(v[\\"@value\\"]) : typeof v === \\"object\\" && \\"@value\\" in v
        && v[\\"@type\\"] === \\"http://www.w3.org/2001/XMLSchema#dateTime\\"
        // Check if the value is a valid RFC 3339 date-time string
        && new Date(v[\\"@value\\"]).toString() !== \\"Invalid Date\\"
         ? Temporal.Instant.from(
        v[\\"@value\\"].substring(19).match(/[Z+-]/)
          ? v[\\"@value\\"]
          : v[\\"@value\\"] + \\"Z\\"
      ) : typeof v === \\"object\\" && \\"@value\\" in v
        && typeof v[\\"@value\\"] === \\"boolean\\" ? v[\\"@value\\"] : undefined
      ;
      if (typeof decoded === \\"undefined\\") continue;
@@ -52627,7 +52654,11 @@ proofs?: (DataIntegrityProof | URL)[];deleted?: Temporal.Instant | null;}
        : _8g8g4LiVMhFTXskuDEqx4ascxUr_deleted__array
    ) {
      if (v == null) continue;
    _8g8g4LiVMhFTXskuDEqx4ascxUr_deleted.push(Temporal.Instant.from(v[\\"@value\\"]))
    _8g8g4LiVMhFTXskuDEqx4ascxUr_deleted.push(Temporal.Instant.from(
        v[\\"@value\\"].substring(19).match(/[Z+-]/)
          ? v[\\"@value\\"]
          : v[\\"@value\\"] + \\"Z\\"
      ))
    }
    instance.#_8g8g4LiVMhFTXskuDEqx4ascxUr_deleted = _8g8g4LiVMhFTXskuDEqx4ascxUr_deleted;
    
@@ -53115,7 +53146,7 @@ instruments?: (Object | URL)[];}
      );
    }
    const docContext = options.context ??
      [\\"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\\"];
      [\\"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\\",{\\"litepub\\":\\"http://litepub.social/ns#\\",\\"toot\\":\\"http://joinmastodon.org/ns#\\",\\"EmojiReact\\":\\"litepub:EmojiReact\\",\\"Emoji\\":\\"toot:Emoji\\"}];
    const compacted = await jsonld.compact(
      values,
      docContext,
+9 −2
Original line number Diff line number Diff line
@@ -184,10 +184,17 @@ const scalarTypes: Record<string, ScalarType> = {
    dataCheck(v) {
      return `typeof ${v} === "object" && "@type" in ${v}
        && "@value" in ${v} && typeof ${v}["@value"] === "string"
        && ${v}["@type"] === "http://www.w3.org/2001/XMLSchema#dateTime"`;
        && ${v}["@type"] === "http://www.w3.org/2001/XMLSchema#dateTime"
        // Check if the value is a valid RFC 3339 date-time string
        && new Date(${v}["@value"]).toString() !== "Invalid Date"
        `;
    },
    decoder(v) {
      return `Temporal.Instant.from(${v}["@value"])`;
      return `Temporal.Instant.from(
        ${v}["@value"].substring(19).match(/[Z+-]/)
          ? ${v}["@value"]
          : ${v}["@value"] + "Z"
      )`;
    },
  },
  "http://www.w3.org/2001/XMLSchema#duration": {
+4 −0
Original line number Diff line number Diff line
@@ -19,4 +19,8 @@ defaultContext:
- "https://w3id.org/security/data-integrity/v1"
- "https://www.w3.org/ns/did/v1"
- "https://w3id.org/security/multikey/v1"
- litepub: "http://litepub.social/ns#"
  toot: "http://joinmastodon.org/ns#"
  EmojiReact: "litepub:EmojiReact"
  Emoji: "toot:Emoji"
properties: []
+2 −0
Original line number Diff line number Diff line
@@ -143,6 +143,7 @@ test("Object.fromJsonLd()", async () => {
      "content": "Hello",
      "mediaType": "text/plain",
    },
    "published": "2025-01-01 12:34:56",
  }, { documentLoader: mockDocumentLoader, contextLoader: mockDocumentLoader });
  assertInstanceOf(obj, Object);
  assertEquals(obj.name, "Test");
@@ -153,6 +154,7 @@ test("Object.fromJsonLd()", async () => {
  assertInstanceOf(obj.source, Source);
  assertEquals(obj.source.content, "Hello");
  assertEquals(obj.source.mediaType, "text/plain");
  assertEquals(obj.published, Temporal.Instant.from("2025-01-01T12:34:56Z"));

  const createJsonLd = {
    "@context": "https://www.w3.org/ns/activitystreams",