Skip to content

Releases: whitlockjc/json-refs

v3.0.0

25 Apr 06:06
Compare
Choose a tag to compare

There are two changes that break backward compatibility:

  1. options.relativeBase has been removed in favor of options.location. When necessary (if relative reference resolution is having issues), set options.location to the location of the document being resolved.
  2. Previously, all references to circulars (even if the reference location was itself not circular) would not be resolved. Now, if options.resolveCirculars is false (the default value), if a JSON Reference points to a circular but the JSON Reference is not within the circular chain, the reference will be resolved and not marked as circular. (Here is an example that would had been marked as circular in v2.x but is not in v3.x: https://github.com/whitlockjc/json-refs/blob/master/test/browser/documents/test-document.yaml#L44)

Below is the list of features and fixes added in this release:

  • Added options.location to allow for better relative reference resolution
  • Added options.resolveCirculars to allow for resolving circular references (Issue #74)
  • (breaking) Removed options.relativeBase as it's too confusing and easier to get right using options.location
  • Fixed accidental feature of resolver that would that resolved remote references against parent documents (Issue #100)
  • Fixed issue where json-refs resolve did not handle a location with a fragment in it (Issue #104)
  • Fixed issue where options.filter could keep remote references from being fully resolved (Issue #111)
  • Fixed issue where circular reference in remote documents were not handled properly (Issue #97)
  • Fixed issue where references to the root document were not marked as circular at proper depth (Issue #88)
  • Fixed issue where references within the root document but outside of options.subDocPath were rolled up instead of reporting the real reference location (Issue #112)
  • Fixed issue where documents could be resolved more than once (Issues #87, #89 and #103)
  • Fixed issue with remote references not being fully resolved (Issue #80)
  • Rewrote resolver for accuracy and efficiency (Issues #80, #87, #88, #89, #97, #100 and #103)
  • Updated #pathFromPtr to include the reason why #isPtr fails (Issue #85)

v2.1.7

23 Apr 16:31
Compare
Choose a tag to compare

[email protected] is a security release. json-refs dependencies were updated to fix two reported security issues:

  • path-loader was using an insecure version of qs
  • json-refs was using an insecure version of uri-js

All dependencies were updated just to be safe.