Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsonld

Package Overview
Dependencies
Maintainers
3
Versions
214
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonld - npm Package Versions

1
22

3.1.0

Diff

Changelog

Source

3.1.0 - 2020-04-15

Fixed

  • Support recusrive scoped contexts.
  • Various EARL report updates.
  • Fixed prependBase to start path with a '/' for a zero length path if there is an authority in base.

Changed

  • Better support for using a processed context for null and caching @import.
  • Don't set @base in initial context and don't resolve a relative IRI when setting @base in a context, so that the document location can be kept separate from the context itself.
  • Use package.json version field for EARL reports.
davidlehn
published 3.0.1 •

Changelog

Source

3.0.1 - 2020-03-10

Fixed

  • Exclude @type from added values in Merge Node Maps step 2.2.1.
davidlehn
published 3.0.0 •

Changelog

Source

3.0.0 - 2020-03-10

Notes

  • This release adds support for a majority of JSON-LD 1.1. Significant thanks goes to Gregg Kellogg!
  • BREAKING: A notable change is that the framing omitGraph default changed to match the JSON-LD 1.1 Framing spec. This is likely to cause issues in most current uses of frame(). Result handling similar to framed['@graph'][0] will have to be changed. Check your code.
  • The spec calls for various situations to issue warnings. This is currently done with console.warn. This will be replaced by a new event notification API in an upcoming release.

Fixed

  • More support for "@type": "@none".
  • JSON literal value handling issues (null and []).
  • Always pass typeScopedContext to _expandObject.
  • Allow a keyword to exist when expanding in _expandObject when the key is @included or @type.
  • Improve isDouble to look for big integers.
  • URI removeDotSegments only ensures preceding '/' if was already absolute.
  • Do minimal checking to see if IRIs are valid by making sure they contain no whitespace.
  • Terms of the form of an IRI must map to the same IRI.
  • Terms of the form of a relative IRI may not be used as prefixes.
  • Match spec error code "invalid context entry" vs "invalid context member".
  • Keywords may not be used as prefixes.
  • Handle term definition on @type with empty map.
  • Handling of @ values for @reverse.
  • Changes in object embedding.
  • Better support for graph framing.
  • Better frame validation.
  • Wildcard matching on @id and other requireAll semantics.
  • Default frame for lists.
  • Check unused scoped contexts for validity.

Changed

  • Keep term definitions mapping to null so they may be protected.
  • NOTE: LINK_HEADER_REL in lib/constants.js has been deprecated and renamed to LINK_HEADER_CONTEXT. It remains for now but will be removed in a future release.
  • Changed framing defaults
    • embed to "@once" and warn on "@first" or "@last".
    • pruneBlankNodeIdentifiers based on processingMode.
    • omitGraph based on processingMode.
  • Replaced removePreserve with cleanupPreserve and cleanupNulls.
  • Remove unused framing graphStack code that was removed from the spec.

Added

  • Support for "@import".
  • Added support for @included blocks
  • Skip things that have the form of a keyword, with warning.
  • Support for expansion and compaction of values container "@direction".
  • Support for RDF transformation of @direction when rdfDirection is 'i18n-datatype'.
  • Top level @graph omitted if omitGraph is true.
  • Check for invalid values of @embed.
  • Support default values for @type when framing.
davidlehn
published 2.0.2 •

Changelog

Source

2.0.2 - 2020-01-17

Fixed

  • More support for "@type": "@none".
  • JSON literal value handling issues (null and []).
  • Fix resolving context null values.

Changed

  • isKeyword() optimization for non-keyword fast path.
davidlehn
published 2.0.1 •

Changelog

Source

2.0.1 - 2019-12-10

Fixed

  • JSON literal value handling issues.
davidlehn
published 2.0.0 •

Changelog

Source

2.0.0 - 2019-12-09

Notes

  • An important BREAKING change in this release is the removal of callback support in favor of Promises and async/await. This release does not include a backwards compatible layer. If you need callback support, please use the 1.x releases, the Node.js callbackify feature, or another similar utility library. Suggestions on how best to provide a backwards compatibility layer are welcome.

Fixed

  • Expanding the value of a graph container which is already a graph object generates a recursive graph object.
  • Compacting multiple nodes in a graph container places them in @included.
  • Indexing on @type requires @type to be either @id or @vocab, and defaults to @id.
  • Expanding/compacting type scoped contexts uses context before applying new versions to look for type scopes.

Changed

  • Default processing mode changed to json-ld-1.1. Allows a 1.1 context to be used after non-1.1 contexts.
  • Indexing on an arbitrary property, not just @index.
  • @vocab can be relative or a Compact IRI in 1.1, resolved against either a previous @vocab, @base or document base.
  • Better checking of absolute IRIs.
  • Terms that begin with a ':' are not considered absolute or compact IRIs.
  • Don't use terms with "@prefix": false or expanded term definitions to construct compact IRIs.
  • @type may be used as a term definition only if "@container": "@set".
  • Improve support for term propagation.
  • Context propagation no longer strictly related to use for property-scoped or term-scoped contexts and can be overridden.
  • Refactored internal context resolution. Processed context cache feature added. To be documented later.

Removed

  • BREAKING: Remove callback API support. This includes removing support for callback-based document loaders and RDF parsers. This is done to facilitate JSON-LD 1.1 document loader features and to remove deprecated code.
  • BREAKING: Remove deprecated loadDocument API and obsolete DocumentCache.
  • BREAKING: Remove deprecated support for parsing legacy dataset format.
davidlehn
published 1.8.1 •

Changelog

Source

1.8.1 - 2019-10-24

Fixed

  • Run babel on canonicalize. Fixes arrow function compatibility issue.
davidlehn
published 1.8.0 •

Changelog

Source

1.8.0 - 2019-09-10

Added

  • Support literal JSON.
    • NOTE: The JSON serialization is based on the JSON Canonicalization Scheme (JCS) drafts. Changes in the JCS algorithm could cause changes in the toRdf output.
davidlehn
published 1.7.0 •

Changelog

Source

1.7.0 - 2019-08-30

Added

  • Support list of lists.
davidlehn
published 1.6.2 •

Changelog

Source

1.6.2 - 2019-05-21

Fixed

  • Allow overriding of protected terms when redefining to the same definition, modulo the protected flag itself.
  • Fix type-scoped context application:
    • Ensure values and subject references are expanded and compacted using type-scoped contexts, if available.
    • Ensure @type values are evaluated against the previous context, not the type-scoped context.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc