Unverified Commit 62f15833 authored by Hong Minhee's avatar Hong Minhee
Browse files

Merge tag '1.2.12' into 1.3-maintenance

Fedify 1.2.12
parents 5a041bc0 89b59985
Loading
Loading
Loading
Loading
+46 −0
Original line number Diff line number Diff line
@@ -8,6 +8,13 @@ Version 1.3.8

To be released.

 -  Fixed a bug with nested object hydration in Activity Vocabulary API where
    deeply nested properties (like `Object.getAttribution()` on
    `Activity.getObject()`) were't being properly hydrated during `toJsonLd()`
    calls. Previously, subsequent calls to `toJsonLd()` on nested objects could
    result in inconsistent JSON-LD output where nested objects remained as URLs
    instead of being fully expanded.


Version 1.3.7
-------------
@@ -210,6 +217,19 @@ Released on November 30, 2024.
[#193]: https://github.com/fedify-dev/fedify/issues/193


Version 1.2.12
--------------

Released on February 10, 2025.

 -  Fixed a bug with nested object hydration in Activity Vocabulary API where
    deeply nested properties (like `Object.getAttribution()` on
    `Activity.getObject()`) were't being properly hydrated during `toJsonLd()`
    calls. Previously, subsequent calls to `toJsonLd()` on nested objects could
    result in inconsistent JSON-LD output where nested objects remained as URLs
    instead of being fully expanded.


Version 1.2.11
--------------

@@ -457,6 +477,19 @@ Released on October 31, 2024.
[#118]: https://github.com/fedify-dev/fedify/issues/118


Version 1.1.12
--------------

Released on February 10, 2025.

 -  Fixed a bug with nested object hydration in Activity Vocabulary API where
    deeply nested properties (like `Object.getAttribution()` on
    `Activity.getObject()`) were't being properly hydrated during `toJsonLd()`
    calls. Previously, subsequent calls to `toJsonLd()` on nested objects could
    result in inconsistent JSON-LD output where nested objects remained as URLs
    instead of being fully expanded.


Version 1.1.11
--------------

@@ -745,6 +778,19 @@ Released on October 20, 2024.
[#150]: https://github.com/fedify-dev/fedify/issues/150


Version 1.0.15
--------------

Released on February 10, 2025.

 -  Fixed a bug with nested object hydration in Activity Vocabulary API where
    deeply nested properties (like `Object.getAttribution()` on
    `Activity.getObject()`) were't being properly hydrated during `toJsonLd()`
    calls. Previously, subsequent calls to `toJsonLd()` on nested objects could
    result in inconsistent JSON-LD output where nested objects remained as URLs
    instead of being fully expanded.


Version 1.0.14
--------------

+147 −66

File changed.

Preview size limit exceeded, changes collapsed.

+0 −1
Original line number Diff line number Diff line
@@ -76,7 +76,6 @@ async function* generateClass(
    `;
  }
  yield `

    /**
     * The type URI of {@link ${type.name}}: \`${typeUri}\`.
     */
+2 −0
Original line number Diff line number Diff line
@@ -179,6 +179,7 @@ async function* generateProperty(
            await this.#fetch${toPascalCase(property.singularName)}(v, options);
          if (fetched == null) return null;
          this.${await getFieldName(property.uri)}[0] = fetched;
          this._cachedJsonLd = undefined;
          return fetched;
        }
      `;
@@ -236,6 +237,7 @@ async function* generateProperty(
                v, options);
            if (fetched == null) continue;
            vs[i] = fetched;
            this._cachedJsonLd = undefined;
            yield fetched;
            continue;
          }
+21 −0
Original line number Diff line number Diff line
@@ -378,6 +378,27 @@ test("Activity.getObject()", async () => {
  assertEquals(object.id, new URL("https://example.com/object"));
  assertEquals(object.name, "Fetched object");

  // Is hydration applied to toJsonLd()?
  const jsonLd = await activity.toJsonLd();
  assertEquals(jsonLd, {
    "@context": [
      "https://w3id.org/identity/v1",
      "https://www.w3.org/ns/activitystreams",
      "https://w3id.org/security/v1",
      "https://w3id.org/security/data-integrity/v1",
    ],
    type: "Activity",
    object: {
      id: "https://example.com/announce",
      type: "Announce",
      object: {
        type: "Object",
        id: "https://example.com/object",
        name: "Fetched object",
      },
    },
  });

  const activity2 = new Activity({
    object: new URL("https://example.com/not-found"),
  });