- Update
rdf-canonize.
- Use
globalThisto set globals in browser contexts. - Split platform support out into Node.js and browser files.
- Update
@digitalbazaar/http-clientdependency to address engine compatibility issues with newer Node.js versions. - Update dependencies.
- Browser override path style.
- Support is dropped for Node.js versions earlier than v12. This reduces the maintenance burden of being limited by older APIs, development tools, and dependencies. If you need to use an earlier Node.js then either use a previous jsonld.js version or use translation tools and polyfills as needed. (The built-in process to make browser bundles may work for this.) Bug fixes and updates may be back-ported to previous versions from time to time or on request (preferably with a patch).
- Node.js documentLoader now uses
@digitalbazaar/http-clientinstead ofrequest. - BREAKING: Only support Node.js >= 12. Remove related unneeded polyfills,
tests, and
node6output. Update dependencies that needed newer Node.js versions. - Use Babel
usagemode rather than listing individual polyfills. May increase bundle size due to more accurate support of intended output targets. - Default Node.js document loader
user-agentheader set to "jsonld.js".
- Distribute a
jsonld.esm.min.jsbundle optimized for the features available in browsers that support ES Modules. - Default Node.js document loader
httpAgentandhttpsAgentoptions. - Add note to README about setting a custom
user-agentheader for the default Node.js document loader.
- Use of deprecated library
requestin Node.js documentLoader. - BREAKING: Parameter
requesthas been removed from the Node.js documentLoader. - Node.js documentLoader should no longer be included in browser build.
- State which protected term is being redefined.
- Switch to
core-js@3.
- BREAKING: RDFa parser moved to
jsonld-rdfapackage, removexmldomdependency.
- Add
yallistto packages run through babel for bundles. Fixes use offunction*.
- Add
lru-cacheto packages run through babel for bundles. Fixes use of arrow functions.
- Update
rdf-canonizeto 2.0.1. - NOTE: The
rdf-canonizeupdate changes browser support and removes forge in favor of the WebCryptocrypto.subtleAPI. A WebCrypto polyfill may be required if a jsonld.js API is used that callsrdf-canonize. The polyfill is needed if older browsers are targeted or when not using a secure context on some modern browsers. Due to other concerns and the expected minimal impact of this change, it is happening in a minor release. Please provide feedback if this decision causes problems. - Node.js 6 is no longer tested due to development tool dependency updates and to avoid adding additional testing complexity. Node.js 6 will otherwise still be supported until the next major release. Please report any issues found.
- Empty-property scoped context should not effect the outer context. Note that in situations where this fix is used there is now an extra clone of the active context which could potentially cause performance issues.
- Fix XHR document loader Link header processing.
- Support recusrive scoped contexts.
- Various EARL report updates.
- Fixed
prependBaseto start path with a '/' for a zero length path if there is an authority in base.
- Better support for using a processed context for
nulland caching@import. - Don't set
@basein initial context and don't resolve a relative IRI when setting@basein a context, so that the document location can be kept separate from the context itself. - Use
package.jsonversionfield for EARL reports.
- Exclude
@typefrom added values in Merge Node Maps step 2.2.1.
- 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
omitGraphdefault changed to match the JSON-LD 1.1 Framing spec. This is likely to cause issues in most current uses offrame(). Result handling similar toframed['@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.
- More support for
"@type": "@none". - JSON literal value handling issues (
nulland[]). - Always pass
typeScopedContextto_expandObject. - Allow a keyword to exist when expanding in
_expandObjectwhen the key is@includedor@type. - Improve
isDoubleto look for big integers. - URI
removeDotSegmentsonly 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
@typewith empty map. - Handling of
@values for@reverse. - Changes in object embedding.
- Better support for graph framing.
- Better frame validation.
- Wildcard matching on
@idand otherrequireAllsemantics. - Default frame for lists.
- Check unused scoped contexts for validity.
- Keep term definitions mapping to null so they may be protected.
- NOTE:
LINK_HEADER_RELinlib/constants.jshas been deprecated and renamed toLINK_HEADER_CONTEXT. It remains for now but will be removed in a future release. - Changed framing defaults
embedto "@once" and warn on "@first" or "@last".pruneBlankNodeIdentifiersbased on processingMode.omitGraphbased on processingMode.
- Replaced
removePreservewithcleanupPreserveandcleanupNulls. - Remove unused framing
graphStackcode that was removed from the spec.
- Support for
"@import". - Added support for
@includedblocks - 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
@directionwhenrdfDirectionis 'i18n-datatype'. - Top level
@graphomitted ifomitGraphistrue. - Check for invalid values of
@embed. - Support default values for
@typewhen framing.
- More support for
"@type": "@none". - JSON literal value handling issues (
nulland[]). - Fix resolving context
nullvalues.
isKeyword()optimization for non-keyword fast path.
- JSON literal value handling issues.
- 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
callbackifyfeature, or another similar utility library. Suggestions on how best to provide a backwards compatibility layer are welcome.
- 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
@typerequires@typeto be either@idor@vocab, and defaults to@id. - Expanding/compacting type scoped contexts uses context before applying new versions to look for type scopes.
- 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. @vocabcan be relative or a Compact IRI in 1.1, resolved against either a previous@vocab,@baseor 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": falseor expanded term definitions to construct compact IRIs. @typemay 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.
- 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
loadDocumentAPI and obsoleteDocumentCache. - BREAKING: Remove deprecated support for parsing legacy dataset format.
- Run babel on canonicalize. Fixes arrow function compatibility issue.
- 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
toRdfoutput.
- NOTE: The JSON serialization is based on the JSON Canonicalization
Scheme (JCS) drafts. Changes in the JCS algorithm could cause changes in
the
- Support list of lists.
- Allow overriding of protected terms when redefining to the same
definition, modulo the
protectedflag itself. - Fix type-scoped context application:
- Ensure values and subject references are expanded and compacted using type-scoped contexts, if available.
- Ensure
@typevalues are evaluated against the previous context, not the type-scoped context.
- Ensure
@type-scoped terms are limited to their@type-scoped object.
- Testing: Use explicit id and description skipping regexes.
- Usage of JavaScript Object property names in data.
- NOTE: A class of bugs was causing term names such as
toString,valueOf, and others to be dropped or produce bogus output. The fix could cause output triples to differ from previous versions if those special names were used. - Specifically, the problem was using
x in objinstead ofobj.hasOwnProperty(x)or aMap. - Fixed usage in contexts for expand and compact.
- Attempted fixes in other parts of the code with similar
x in objusage. Finding actual realistic failing test cases proved difficult.
- NOTE: A class of bugs was causing term names such as
- Testing: Improve skip logging.
- Testing:
skipandonlyflags in manifests. - Testing:
VERBOSE_SKIP=trueenv var to debug skipping. - Support
@protected. - Support experimental non-standard
protectedModeoption.
- Handle
<subject> <rdf:first> <rdf:nil>triple.
- Improve handling of canonize test cases.
- Update rdf-canonize dependency to address N-Quads parsing bug.
- Switch to eslint.
- Optimize ensuring value is an array.
- Update canonize docs.
- rdf-canonize updated:
- BREAKING: A fix was applied that makes the canonical output format
properly match the N-Triples canoncial format. This fixes the format to no
longer escape tabs in literals. This may cause canonical output from
jsonld.normalize()/jsonld.canonize()to differ from previous versions depending on your literal data. If a backwards compatibility mode is needed please use 1.4.x and file an issue. - BREAKING: rdf-canonize-native was removed as an indirect optional
dependency and the JavaScript implemenation is now the default. The former
usePureJavaScriptflag was removed and a newuseNativeflag was added to force use of the native bindings. Higher level applications must explicitly installrdf-canonize-nativeto use this mode. Note that in many cases the JavaScript implemenation will be faster. Apps should be benchmarked before using the specialized native mode. - NOTE: The Travis-CI C++11 compiler update fixes are no longer needed when using jsonld.js! rdf-canonize-native was updated to not use C++11 features and is also no longer a direct or indirect dependency of jsonld.js.
- BREAKING: A fix was applied that makes the canonical output format
properly match the N-Triples canoncial format. This fixes the format to no
longer escape tabs in literals. This may cause canonical output from
rdfn:Urgna2012EvalTestandrdfn:Urdna2015EvalTesttests should compare with expected output.
- PhantomJS is deprecated, now using headless Chrome with Karma.
- NOTE: Using headless Chrome vs PhantomJS may cause newer JS features to slip into releases without proper support for older runtimes and browsers. Please report such issues and they will be addressed.
- Update webpack and babel.
- Use CommonJS style in main file.
- NOTE: This change might cause problems if code somehow was still
using the long deprecated
jsonldjsglobal. Any dependants on this feature should update to use bundler tools such as webpack or usejsonldin the distributed bundle.
- NOTE: This change might cause problems if code somehow was still
using the long deprecated
- Use rdf-canonize to compare n-quads test results.
- Maintain multiple graphs.
- Sort
@typewhen looking for scoped contexts.
- Use JSON-LD WG tests.
- Categorize and skip failing tests.
- Fix source map generation.
- The updated rdf-canonize extracted out native support into rdf-canonize-native and now has an optional dependency on this new module. If you have build tools available it will still build and use native support otherwise it will fallback to less performant JS code.
- If you wish to require the native
rdf-canonizebindings, add a dependency in your code tordf-canonize-nativeto insure it is installed. - Some systems such as Travis CI currently only have
ancient compilers installed by default. Users of
rdf-canonize, and hencejsonld.js, previously required special setup so therdf-canonizenative bindings would be installable. If CI testing is not performance critical you can now simplify your CI config, let those bindings fail to install, and use the JS fallback code.
- Update
rdf-canonizedependency to 0.3.
- Initial support for benchmarking.
- Basic callback interface tests.
- Add README note about running json-ld.org test suite.
- Callback version of every test.
- Callback interface tests added to catch callback API errors.
- Avoids duplication of running every test for promises and callbacks.
- Simplifies testing code and makes async/await conversion easier.
- Add
skipExpansionflag totoRdfandcanonize.
- Fix
_findContextUrlsrefactoring bug from 1.0.3.
- Improve performance of active context cache and find context urls:
- Use Map/Set.
- Cache initial contexts based on options.
- Reduce lookups.
- Update webpack/karma core-js usage:
- Add Map, Set, and Array.from support.
- Handle compactArrays option in
@graphcompaction. - Many eslint fixes.
- Add missing await to createNodeMap() and merge().
- Don't always use arrays for
@graph. Fixes 1.0 compatibility issue.
- 1.0.0!
- Semantic Versioning is now past the "initial development" 0.x.y stage (after 7+ years!).
- Conformance:
- JSON-LD 1.0 + JSON-LD 1.0 errata
- JSON-LD 1.1 drafts
- Thanks to the JSON-LD and related communities and the many many people over the years who contributed ideas, code, bug reports, and support!
- Expansion and Compaction using scoped contexts on property and
@typeterms. - Expansion and Compaction of nested properties.
- Index graph containers using
@idand@index, with@setvariations. - Index node objects using
@idand@type, with@setvariations. - Framing default and named graphs in addition to merged graph.
- Value patterns when framing, allowing a subset of values to appear in the output.
- ES2018 features are being used. Update version check to use generated Node.js 6 code when using Node.js earlier than 8.6.0.
- Typo handling legacy N-Quads dataset format.
- Include String startsWith() compatibility code.
- Use the W3C standard MIME type for N-Quads of "application/n-quads". Accept "application/nquads" for compatibility.
- Fix fromRdf with input triple having a nil subject.
- BREAKING: Release 0.5.x as latest branch. See the many many changes below since 0.4.x including many potential breaking changes.
- BREAKING: Remove
jsonld.versionAPI andpkginfodependency. This feature added complexity and browser issues and the use case is likely handled by semantic versioning and using a proper dependency.
- Do not use native types to create IRIs in value expansion.
- Improved error detection for
@containervariations. - Handle empty and relative
@base. - Remove shortcut from compactIri when IRI is a keyword (fixes compact-0073).
- Set processingMode from options or first encountered context.
- Use array representation of
@containerin processing. - BREAKING: Check for keys in term definition outside that expected:
@container,@id,@language,@reverse, and@type. This also sets up for additional keywords in 1.1.
- BREAKING: Use RDF JS (rdf.js.org) interfaces for internal representation of dataset and quads. This should only break code that was using undocumented internal data structures, backwards-compat code exists to handle external RDF parsers.
- Update
rdf-canonizeto dependency with native support.
- Allow empty lists to be compacted to any
@listcontainer term. Fixes compact-0074 test.
- Remote context retrieval bug.
- BREAKING: Remove
promisifyAPI.
- BREAKING: Remove top-layer errors.
- BREAKING: Remove deprecated extensions API, including
jsonld.request.
- Add
expansionMapandcompactionMapoptions. These functions may be provided that will be called when an unmapped value or property will be dropped during expansion or compaction, respectively. The function map return eitherundefinedto cause the default behavior, some other value to use instead of the default expanded/compacted value, or it may throw an error to stop expansion/compaction.
- BREAKING: Remove deprecated
objectifyandprependBaseAPIs. Nowobjectifycan be achieved via the@linkoption in framing andprependBasecan be found viaurl.prependBase. - BREAKING: Remove deprecated
nameroption from all public APIs, useissuerinstead. - BREAKING: Last active context used is no longer returned as an optional
parameter to the
compactcallback. - BREAKING: Do not expose deprecated
DocumentCache.
- BREAKING: Change default canonicalization algorithm to
URDNA2015.
- Callbackify bugs.
- Document loaders.
- Request queue.
- Handling of exceptions in callbacks.
- Various toRDF tests.
- Move tests from test/ to tests/.
- Run all test-suite tests with promises and callbacks.
- Use Node.js "global" or webpack polyfill.
- Distribute all js files, for real this time.
- Fix
toRDF().
- Distribute all js files.
- Generate all js files for Node.js 6.
- Significant code reorganization and splitting into multiple files.
- BREAKING: Explicit IE8 support. Webpack, babel, and/or polyfills may be of help if support is still needed.
- BREAKING: jQuery document loader. Use the XHR loader.
Object.keyspolyfill. Other tools can provide this.
- Handling of "global".
- Distribute browser files.
- Distribute unminified bundle.
- Add .editorconfig support.
fetch-test-suitesand relatedfetch-*-test-suiteNPM scripts.- Support for
@graph@container.
- Bower support. Use NPM, a NPM proxy site, or build your own bundle.
- Makefile. Use NPM script targets.
- Update url parser to remove default ports from URLs.
- Skip spec version 1.1 tests.
- BREAKING: Only support Node.js 6.x and later with ES2015 features.
- Build and use custom Node.js 6.x output so async/await/etc can be used.
- BREAKING: Move
js/jsonld.jstolib/jsonld.js. - BREAKING: Switch to CommonJS.
- BREAKING: Fixes to allow RFC3986 tests to pass. Some URI edge cases and certain base URIs with dot segments may cause different URI outputs.
- Switch to Karma for browser testing.
- Switch to webpack to build browser bundles.
- Add explicit feature compatibility libs to browser bundles.
- Use async APIs for test generation.
- Done to allow testing in Node.js and browsers.
- Required major testing changes to make everything async.
- Workarounds added to get async generated mocha tests working.
- Improved support for loading various types of tests.
- Can load local files, test manifests, or plain js files (in Node.js).
- Use ES2015 in tests and babel/webpack to support older platforms.
- Use rdf-canonize library, remove local implementation.
- Fix
promises.compactAPI when called with only 2 parameters.
- Add optimization for finding best CURIE matches.
- Add optimization for compacting keywords.
- Add optimizations for _compactIri.
- Revert es6-promise dependency to 2.x to avoid auto-polyfill behavior.
- Testing document loader.
- Add
headersandrequestoption for node doc loader.
- Include local tests.
- N-Quads comments pattern.
- Local tests.
- Document cache in default node document loader is broken; disable until HTTP caching is implemented.
- N-Quads may contain comments.
- Add inputFormat and algorithm options to normalize.
- Add support for normalization test suite.
- Support URDNA2015 normalization algorithm.
- Add async scheduling of normalization algorithms.
- Ignore null values in language maps.
- Ignore jsonld-request and pkginfo for browserify.
- "request" extension moved to jsonld-request. This was done to simplify
the core JSON-LD processing library. In particular, the extension pulled in
RDFa processing code and related dependencies. The old method of using this
extension of
jsonld.use('request')is deprecated in favor of using the new module directly. - The
jsonldtool moved to jsonld-cli. This was also done to simplify the core JSON-LD processing library and because it uses the jsonld-request module.
- See git history for changes.