UNPKG

11.7 kBMarkdownView Raw
1ChangeLog
2=========
3
44.0.0 (2019-09-04)
5------------------
6
7* #129: Using the package in non-typescript node.js now wortks with a simple
8 `const Ketting = require('ketting')`.
9* #129: Fixed the browser distribution. the `Ketting` constructor is
10 registered globally again.
11
12
134.0.0.alpha.0 (2019-04-22)
14--------------------------
15
16* The old format for OAuth2 setup is now no longer supported.
17* It's now possible to specify per-domain authentication using wildcards.
18 This allows you to set up specific authentication credentials for specific
19 domains. This might be useful in case you talk to multiple API's with a
20 single client.
21
22
233.1.0 (2019-03-28)
24------------------
25
26* If Ketting anticipates that a user might want to fetch multiple resources
27 in sequence (a follow chain), it will now add `Prefer-Push` header and
28 a `Prefer: transclude` header. Both are experimental internet drafts to
29 suggest to a server to do a HTTP/2 push or embed a child resource
30 respecitvely. This feature is experimental and might change as these drafts
31 change.
32
33
343.0.2 (2019-03-19)
35------------------
36
37* A mistake was made when releasing version 3. A branched was not merged in
38 entirely, which caused some of the new OAuth2 features to be partially
39 missing. This has now been corrected.
40
41
423.0.1 (2019-03-18)
43------------------
44
45* Updated dependencies
46
473.0.0 (2019-03-18)
48------------------
49
50* Switched OAuth2 implementation from `client-oauth2` to `fetch-mw-oauth2`.
51 This adds support for `authorization_code` auth, removes 11 dependencies and
52 reduces the minified Ketting build from 69KB to 28KB.
53* OAuth2 options now have a new format. The old format is still supported, but
54 will be removed from a future version.
55* The `baseHref` propertyname was renamed to `Context` on the `Link` type. The
56 new name matches the name from RFC8288. This is a small BC break.
57
58
592.5.1 (2019-03-01)
60------------------
61
62* #120: The system that de-duplicates identical requests will cache failures
63 forever. This is now fixed. Highly recommended update.
64
65
662.5.0 (2019-01-22)
67------------------
68
69* Basic JSON:API support. Currently only links appearing in the top-level
70 document are supported.
71* #113: Support for Typescript environments that don't have `esModuleInterop`
72 set to true.
73* Added a 'go' function for easily getting resources based on relative uris.
74
75
762.4.1 (2018-11-07)
77------------------
78
79* If a link appears in both `_embedded` and `_links`, they will be
80 de-duplicated. HAL technically requires links to appear in both places, so
81 scanning `_embedded` should not be needed. However, most implementations will
82 not add links `_links` if they were already `_embedded`. This change caters
83 both usages.
84
85
862.4.0 (2018-11-05)
87------------------
88
89* The `Resource` class is now a generic typescript type. This allows a user
90 of the library to define specific 'types of resources' and leverage static
91 typing for `GET` and `PUT` requests.
92* A few documentation updates.
93
94
952.3.0 (2018-10-10)
96------------------
97
98* Better handling of `Content-Types`. When following HAL links that have a
99 `type` parameter, the type is rememebered and used in `Accept` and
100 `Content-Type` headers, for `GET`, `PUT` and `POST` requests.
101* If no `type` was provided, it will use the last `Content-Type` header from
102 `GET` response.
103* If that `GET` request never happened, it uses the first 'default'
104 `Content-Type` from client.contentTypes, and enumerates all mime-types from
105 that list for `Accept` headers.
106* No longer incorrectly sends `text/plain` Content-Types.
107* Optimization: If multiple calls are made to ask for a Resource's current
108 representation, all these calls are coalesced into one. The big benefit is
109 that there are no longer multiple parallel `GET` requests.
110* Webpack browser build is set to 'production' mode.
111* Fixed: After refreshing an OAuth2 token, the new access token wasn't used.
112
113
1142.2.1 (2018-09-19)
115------------------
116
117* Refreshing OAuth2 tokens without having a refresh_token.
118 `client_credentials` in particular shouldn't return a `refresh_token`, so
119 for these cases, new access tokens are acquired using a new
120 `client_credentials` request.
121
122
1232.2.0 (2018-09-18)
124------------------
125
126* Support for OAuth2 `client_credentials` grant.
127
128
1292.1.0 (2018-09-14)
130------------------
131
132* No longer ships with `cross-fetch` and `whatwg-fetch`. To use this library
133 in a browser, you must run this in a browser that supports `fetch` or
134 provide your own polyfill.
135* Updated dependencies
136
137
1382.0.4 (2018-09-12)
139------------------
140
141* Fixed bug: HAL title values weren't parsed.
142
143
1442.0.3 (2018-08-23)
145------------------
146
147* Exporting 'Resource' for TS purposes.
148
149
1502.0.2 (2018-08-23)
151------------------
152
153* Updated dependencies
154* Fixed a typescript definition problem.
155
156
1572.0.1 (2018-06-17)
158------------------
159
160* Same as last build.
161
1622.0.0 (2018-06-17)
163------------------
164
165* #71: Total conversion to Typescript.
166* BC break: Minified files are now in the `browser/` directory, not the `dist/`
167 directory.
168* #78: Webpack build had a broken version of `querystring`, which caused
169 `Link:` header parsing to fail in browsers.
170* #80: `resource.fetch()` would throw an exception with some combinations
171 of arguments.
172* #90: `get()` and `refresh()` will now throw an Error when a server did not
173 include a content-type.
174* #89: Refactored OAuth utility to be a bit more clear.
175* #83: Support for `resource.patch()`. The implementation is pretty basic. Let
176 us know how you would like to use it!
177
178
1791.1.0 (2018-04-07)
180------------------
181
182* #70: Moved all source from `lib/` to `src/`. This is prepping for typescript
183 support.
184* #73: Mocha tests can now be ran in a browser.
185* #76: Fixed a browser bug: Headers is not a constructor.
186
187
1881.0.0 (2018-03-25)
189------------------
190
191* #66: Support for Accept header weighing with the q= parameter.
192* #68: Updated all dependencies to their latest version.
193
194
1950.10.3 (2018-01-31)
196-------------------
197
198* #63: It was not possible to expand templated links with variables after more
199 than one chained hop. (@mhum).
200
201
2020.10.2 (2018-01-31)
203-------------------
204
205* #62: It was not possible to override headers such as `Content-Type` when
206 calling `Resource.fetch()`, if these were also set in the `fetchInit`
207 defaults. (@mhum).
208
209
2100.10.1 (2018-01-31)
211-------------------
212
213* #60: Chaining more than 2 `follow` statements did not work.
214
215
2160.10.0 (2017-11-16)
217-------------------
218
219* #19: Support for OAuth2 access and refresh tokens. When used, the library
220 can automatically refresh the access token if the previous one expired. It
221 can also supports the `client_credentials` OAuth2 grant (@mhum).
222
223
2240.9.0 (2017-09-23)
225------------------
226
227* #52: Now using the new URL object in browsers for resolving relative urls,
228 and falling back to a DOM based url resolving mechanism if it's not
229 available. This causes the browser distribution to drop another 10KB to
230 46KB.
231* Moved a bunch of utility objects into a `util/` directory, so it's more
232 clear what the important API's are.
233* #55: Fixed another problem related to the fetchInit function in firefox.
234
235
2360.8.3 (2017-09-10)
237-----------------
238
239* Including the sourcemap file in the NPM distribution.
240
241
2420.8.2 (2017-09-10)
243-----------------
244
245* #53: Regression related to the new 'fetchInit' option.
246* Now generating source maps.
247
248
2490.8.1 (2017-09-04)
250------------------
251
252* #50: Allow Fetch settings to be passed to the constructor of Ketting, so that
253 settings such as `credentials: include` may be passed.
254
255
2560.8.0 (2017-08-28)
257------------------
258
259* #49: Removed support for expanding CURIEs in HAL. This was in conflict with
260 the HAL standard. The canonical relation type is the prefix in the REL, not
261 the expanded CURIE uri.
262
263
2640.7.1 (2017-08-24)
265------------------
266
267* Lots of documentation updates.
268* Including web distribution in NPM package.
269
270
2710.7.0 (2017-08-21)
272------------------
273
274* This library is now called Ketting. It used to be called Restl. Ketting is
275 the dutch word for chain.
276* Automatically expanding Curies in the HAL `_link` object.
277
278
2790.6.0 (2017-08-20)
280------------------
281
282* #15: Browser support via webpack!
283* #45: Removed Bluebird dependency.
284* #16: Parsing the HTTP `Link` header (RFC5988).
285* #30: Added support for automatically parsing `application/problem+json` error
286 responses and throwing better exceptions. (RFC7807).
287* #47: Link object now uses an object as its only constructor argument.
288
289
2900.5.0 (2017-08-08)
291------------------
292
293* #41: Support for parsing HTML5. The library can now extract `link` and `a`
294 elements with `rel` attributes.
295* Removed the `accept` option. This should now be controlled with the
296 `contentTypes` property.
297* #40: Removed support for the Requests library. This library now only used
298 the Fetch API, to make it compatible with browsers in the future.
299
300
3010.4.2 (2017-08-03)
302------------------
303
304* #39: Making it easier to fire off custom HTTP requests on a resource using
305 the Fetch API. You can now just provide the `init` argument without providing
306 a url.
307
308
3090.4.1 (2017-07-07)
310------------------
311
312* #38: Add HTTP response to HTTP-related exceptions.
313
314
3150.4.0 (2017-07-07)
316------------------
317
318* #37: Support for templated uris.
319
320
3210.3.2 (2017-04-27)
322------------------
323
324* #33: Support for OAuth2 Bearer token.
325
326
3270.3.1 (2017-04-26)
328------------------
329
330* #31: Support for setting a standard `Content-Type` HTTP header.
331
332
3330.3.0 (2017-04-24)
334------------------
335
336* #28: Support for Basic Authentication
337
338
3390.2.1 (2017-04-21)
340------------------
341
342* #27: Fixed exception messages, they missed the HTTP status code.
343
344
3450.2.0 (2017-04-21)
346------------------
347
348* #17: Now using the Fetch API instead of the requests library. The requests
349 library is kept around for BC purposes, but this will eventually be removed.
350* #25: the resourceCache was accidentally shared between Client instances.
351
352
3530.1.2 (2017-04-19)
354------------------
355
356* #11: Added test framework.
357* #11: Added `follow()` function on Client object for an easy shortcut.
358
359
3600.1.1 (2017-04-03)
361------------------
362
363* #10: Returning the response body from the `refresh()` function, similar to
364 `GET` but cache-defeating.
365
366
3670.1.0 (2017-02-13)
368------------------
369
370* #7: Strip `_embedded` and `_links` from `Representation.body`. They are
371 already available through `Representation.embedded` and
372 `Representation.links`.
373* Added a cache for resources in the Client object, which ensures that if you
374 request the same resource twice, you'll end up with the same object.
375* #6: Automatically parse `_embedded` and treat items in this object as real
376 resources.
377* Fixed a bug in `post()`.
378* Allowing custom headers to be set, and allowing default headers to be
379 overridden.
380* Automatically resolve all urls from `links()`.
381
382
3830.0.4 (2017-02-06)
384-----------------
385
386* Bugfixes.
387* Linting with eslint.
388
389
3900.0.3 (2017-02-06)
391------------------
392
393* Now using Bluebird for promises, so we can extend them.
394* #2: Custom requests are now possible on `Resource` objects.
395* #3: Promises returned from `follow()` now have a `follow()` function
396 themselves, making it extremely easy to hop from link to link.
397* Added a `post()` method for making new resources. This function returns a
398 `Resource` object again if the response contained a `Location` header.
399* #4: Things in the `_embedded` property are now also treated as links and can
400 be followed.
401* The `links()` method on Resource now have a `rel` argument for easy filtering.
402* Added a `followAll()` function for getting collections.
403
404
4050.0.2 (2017-01-03)
406------------------
407
408* `PUT` request.
409* `DELETE` request.
410
411
4120.0.1 (2016-12-28)
413------------------
414
415* First version!
416* Parses HAL `_links`.
417* Follows links.
418* `GET` requests.
419* `refresh()` function.