Loading CHANGES.md +3 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,9 @@ Version 0.15.0 To be released. - Removed `expand` option of `Object.toJsonLd()` method, which was deprecated in version 0.14.0. Use `format: "expand"` option instead. Version 0.14.3 -------------- Loading cli/lookup.ts +2 −2 Original line number Diff line number Diff line Loading @@ -97,9 +97,9 @@ export const command = new Command() Deno.exit(1); } if (options.compact) { printJson(await object.toJsonLd({ contextLoader })); printJson(await object.toJsonLd({ format: "compact", contextLoader })); } else if (options.expand) { printJson(await object.toJsonLd({ expand: true, contextLoader })); printJson(await object.toJsonLd({ format: "expand", contextLoader })); } else { console.log(object); } Loading src/codegen/__snapshots__/class.test.ts.snap +0 −819 File changed.Preview size limit exceeded, changes collapsed. Show changes src/codegen/codec.ts +0 −13 Original line number Diff line number Diff line Loading @@ -28,22 +28,9 @@ export async function* generateEncoder( */ async toJsonLd(options: { format?: "compact" | "expand", expand?: boolean, contextLoader?: DocumentLoader, context?: string | Record<string, string> | (string | Record<string, string>)[], } = {}): Promise<unknown> { if (options.expand != null) { if (options.format != null) { throw new TypeError( "The expand option, which is deprecated, cannot be used together " + "with the format option." ); } getLogger(["fedify", "vocab"]).warn( "The expand option is deprecated; use format: 'expand' instead.", ); options = { ...options, format: "expand", expand: undefined }; } if (options.format == null && this.#cachedJsonLd != null) { return this.#cachedJsonLd; } Loading Loading
CHANGES.md +3 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,9 @@ Version 0.15.0 To be released. - Removed `expand` option of `Object.toJsonLd()` method, which was deprecated in version 0.14.0. Use `format: "expand"` option instead. Version 0.14.3 -------------- Loading
cli/lookup.ts +2 −2 Original line number Diff line number Diff line Loading @@ -97,9 +97,9 @@ export const command = new Command() Deno.exit(1); } if (options.compact) { printJson(await object.toJsonLd({ contextLoader })); printJson(await object.toJsonLd({ format: "compact", contextLoader })); } else if (options.expand) { printJson(await object.toJsonLd({ expand: true, contextLoader })); printJson(await object.toJsonLd({ format: "expand", contextLoader })); } else { console.log(object); } Loading
src/codegen/__snapshots__/class.test.ts.snap +0 −819 File changed.Preview size limit exceeded, changes collapsed. Show changes
src/codegen/codec.ts +0 −13 Original line number Diff line number Diff line Loading @@ -28,22 +28,9 @@ export async function* generateEncoder( */ async toJsonLd(options: { format?: "compact" | "expand", expand?: boolean, contextLoader?: DocumentLoader, context?: string | Record<string, string> | (string | Record<string, string>)[], } = {}): Promise<unknown> { if (options.expand != null) { if (options.format != null) { throw new TypeError( "The expand option, which is deprecated, cannot be used together " + "with the format option." ); } getLogger(["fedify", "vocab"]).warn( "The expand option is deprecated; use format: 'expand' instead.", ); options = { ...options, format: "expand", expand: undefined }; } if (options.format == null && this.#cachedJsonLd != null) { return this.#cachedJsonLd; } Loading