UNPKG

8.53 kBMarkdownView Raw
1# Change Log
2All notable changes will be documented in this file.
3JSON Schema $Ref Parser adheres to [Semantic Versioning](http://semver.org/).
4
5
6## [v5.1.0](https://github.com/BigstickCarpet/json-schema-ref-parser/tree/v5.1.0) (2018-07-11)
7
8- Improved the logic of the [`bundle()` method](https://github.com/BigstickCarpet/json-schema-ref-parser/blob/master/docs/ref-parser.md#bundleschema-options-callback) to produce shorter reference paths when possible. This is not a breaking change, since both the old reference paths and the new reference paths are valid. The new ones are just shorter. Big thanks to [@hipstersmoothie](https://github.com/hipstersmoothie) for [PR #68](https://github.com/BigstickCarpet/json-schema-ref-parser/pull/68), which helped a lot with this.
9
10[Full Changelog](https://github.com/BigstickCarpet/json-schema-ref-parser/compare/v5.0.0...v5.1.0)
11
12
13## [v5.0.0](https://github.com/BigstickCarpet/json-schema-ref-parser/tree/v5.0.0) (2018-03-18)
14
15This release contains two bug fixes related to file paths. They are _technically_ breaking changes — hence the major version bump — but they're both edge cases that probably won't affect most users.
16
17- Fixed a bug in the [`$refs.paths()`](docs/refs.md#pathstypes) and [`$refs.values()`](docs/refs.md#valuestypes) methods that caused the path of the root schema file to always be represented as a URL, rather than a filesystem path (see [this commit](https://github.com/BigstickCarpet/json-schema-ref-parser/commit/a95cf50fdf16c864cc1c18d2021d9ce3ec35f5de))
18
19- Merged [PR #75](https://github.com/BigstickCarpet/json-schema-ref-parser/pull/75), which resolves [issue #76](https://github.com/BigstickCarpet/swagger-parser/issues/76). Error messages no longer include the current working directory path when there is no file path.
20
21[Full Changelog](https://github.com/BigstickCarpet/json-schema-ref-parser/compare/v4.1.1...v5.0.0)
22
23
24## [v4.1.0](https://github.com/BigstickCarpet/json-schema-ref-parser/tree/v4.1.0) (2018-01-17)
25
26- Updated dependencies
27
28- Improved the `bundle()` algorithm to favor direct references rather than indirect references (see [PR #62](https://github.com/BigstickCarpet/json-schema-ref-parser/pull/62) for details). This will produce different bundled output than previous versions for some schemas. Both the old output and the new output are valid, but the new output is arguably better.
29
30[Full Changelog](https://github.com/BigstickCarpet/json-schema-ref-parser/compare/v4.0.0...v4.1.0)
31
32
33## [v4.0.0](https://github.com/BigstickCarpet/json-schema-ref-parser/tree/v4.0.0) (2017-10-13)
34
35#### Breaking Changes
36
37- To reduce the size of this library, it no longer includes polyfills for [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) and [TypedArrays](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray), which are natively supported in the latest versions of Node and web browsers. If you need to support older browsers (such as IE9), then just use [this `Promise` polyfill](https://github.com/stefanpenner/es6-promise) and [this `TypedArray` polyfill](https://github.com/inexorabletash/polyfill/blob/master/typedarray.js).
38
39#### Minor Changes
40
41- Updated dependencies
42
43- [PR #53](https://github.com/BigstickCarpet/json-schema-ref-parser/pull/53) - Fixes [an edge-case bug](https://github.com/BigstickCarpet/json-schema-ref-parser/issues/52) with the `bundle()` method
44
45[Full Changelog](https://github.com/BigstickCarpet/json-schema-ref-parser/compare/v3.3.0...v4.0.0)
46
47
48## [v3.3.0](https://github.com/BigstickCarpet/json-schema-ref-parser/tree/v3.3.0) (2017-08-09)
49
50- Updated dependencies
51
52- [PR #30](https://github.com/BigstickCarpet/json-schema-ref-parser/pull/30) - Added a `browser` field to the `package.json` file to support bundlers such as Browserify, Rollup, and Webpack
53
54- [PR #45](https://github.com/BigstickCarpet/json-schema-ref-parser/pull/45) - Implemented a temporary workaround for [issue #42](https://github.com/BigstickCarpet/json-schema-ref-parser/issues/42). JSON Schema $Ref Parser does _not_ currently support [named internal references](http://json-schema.org/latest/json-schema-core.html#id-keyword), but support will be added in the next major release.
55
56[Full Changelog](https://github.com/BigstickCarpet/json-schema-ref-parser/compare/v3.0.0...v3.3.0)
57
58
59## [v3.0.0](https://github.com/BigstickCarpet/json-schema-ref-parser/tree/v3.0.0) (2016-04-03)
60
61#### Plug-ins !!!
62That's the major new feature in this version. Originally requested in [PR #8](https://github.com/BigstickCarpet/json-schema-ref-parser/pull/8), and refined a few times over the past few months, the plug-in API is now finalized and ready to use. You can now define your own [resolvers](https://github.com/BigstickCarpet/json-schema-ref-parser/blob/v3.0.0/docs/plugins/resolvers.md) and [parsers](https://github.com/BigstickCarpet/json-schema-ref-parser/blob/v3.0.0/docs/plugins/parsers.md).
63
64#### Breaking Changes
65The available [options have changed](https://github.com/BigstickCarpet/json-schema-ref-parser/blob/v3.0.0/docs/options.md), mostly due to the new plug-in API. There's not a one-to-one mapping of old options to new options, so you'll have to read the docs and determine which options you need to set. If any. The out-of-the-box configuration works for most people.
66
67All of the [caching options have been removed](https://github.com/BigstickCarpet/json-schema-ref-parser/commit/1f4260184bfd370e9cd385b523fb08c098fac6db). Instead, all files are now cached, and the entire cache is reset for each new parse operation. Caching options may come back in a future release, if there is enough demand for it. If you used the old caching options, please open an issue and explain your use-case and requirements. I need a better understanding of what caching functionality is actually needed by users.
68
69#### Bug Fixes
70Lots of little bug fixes. The only major bug fix is to [support root-level `$ref`s](https://github.com/BigstickCarpet/json-schema-ref-parser/issues/16)
71
72
73[Full Changelog](https://github.com/BigstickCarpet/json-schema-ref-parser/compare/v2.2.0...v3.0.0)
74
75
76## [v2.2.0](https://github.com/BigstickCarpet/json-schema-ref-parser/tree/v2.2.0) (2016-01-03)
77
78This version includes a **complete rewrite** of the [`bundle` method](https://github.com/BigstickCarpet/json-schema-ref-parser/blob/master/docs/ref-parser.md#bundleschema-options-callback) method, mostly to fix [this bug](https://github.com/BigstickCarpet/swagger-parser/issues/16), but also to address a few [edge-cases](https://github.com/BigstickCarpet/json-schema-ref-parser/commit/ca9b322879519e4bcb2dcf6e63f08ac254b90868) that weren't handled before. As a side-effect of this rewrite, there was also some pretty significant refactoring and code-cleanup done throughout the codebase.
79
80Despite the significant code changes, there were no changes to any public-facing APIs, and [all tests are passing](http://bigstickcarpet.com/json-schema-ref-parser/test/index.html) as expected.
81
82[Full Changelog](https://github.com/BigstickCarpet/json-schema-ref-parser/compare/v2.1.0...v2.2.0)
83
84
85## [v2.1.0](https://github.com/BigstickCarpet/json-schema-ref-parser/tree/v2.1.0) (2015-12-31)
86
87JSON Schema $Ref Parser now automatically follows HTTP redirects. This is especially great for servers that automatically "ugrade" your connection from HTTP to HTTPS via a 301 redirect. Now that won't break your code.
88
89There are a few [new options](https://github.com/BigstickCarpet/json-schema-ref-parser/blob/master/docs/options.md) that allow you to set the number of redirects (default is 5) and a few other HTTP request properties.
90
91[Full Changelog](https://github.com/BigstickCarpet/json-schema-ref-parser/compare/v2.0.0...v2.1.0)
92
93
94## [v2.0.0](https://github.com/BigstickCarpet/json-schema-ref-parser/tree/v2.0.0) (2015-12-31)
95
96Bumping the major version number because [this change](https://github.com/BigstickCarpet/json-schema-ref-parser/pull/5) technically breaks backward-compatibility — although I doubt it will actually affect many people. Basically, if you're using JSON Schema $Ref Parser to download files from a CORS-enabled server that requires authentication, then you'll need to set the `http.withCredentials` option to `true`.
97
98```javascript
99$RefParser.dereference('http://some.server.com/file.json', {
100 http: { withCredentials: true }
101});
102```
103
104[Full Changelog](https://github.com/BigstickCarpet/json-schema-ref-parser/compare/v1.4.1...v2.0.0)