UNPKG

35.7 kBMarkdownView Raw
1# Release History
2
3## 3.17.2 (2022-11-15)
4
5### Bugs Fixed
6
7- Fix issue with patch api not working with aadCredentials [#20689](https://github.com/Azure/azure-sdk-for-js/issues/20689)
8- Improve the contract of Item.batch operation from type any to OperationResponse [#23652](https://github.com/Azure/azure-sdk-for-js/issues/20689)
9- Add section for the current limitations with the SDK [#21650](https://github.com/Azure/azure-sdk-for-js/issues/21650)
10- Fix issue aad refresh token automatically getting refreshed [#22620](https://github.com/Azure/azure-sdk-for-js/issues/22620)
11
12## 3.17.1 (2022-09-12)
13
14### Bugs Fixed
15
16- Fix issue with unwanted runtime dependency on `@azure/identity` [#22968](https://github.com/Azure/azure-sdk-for-js/issues/22968)
17
18## 3.17.0 (2022-08-19)
19
20### Features Added
21
22#### GA: Azure Cosmos DB Integrated Cache
23
24- Support DedicatedGatewayRequestOptions and MaxIntegratedCacheStaleness [#21240](https://github.com/Azure/azure-sdk-for-js/pull/21240)
25- Upgrade cosmos with azure core tracing [#22284](https://github.com/Azure/azure-sdk-for-js/pull/22284)
26- Removed old logging and implement Azure core logging coverage [#18723](https://github.com/Azure/azure-sdk-for-js/pull/18723?)
27
28### Bugs Fixed
29
30- ParallelQueryExecutionContextBase breaks use of abortSignal [#18544](https://github.com/Azure/azure-sdk-for-js/pull/18544)
31- Fixes id encoding issues when using special characters fo RoutingGateway
32
33## 3.16.3 (2022-07-13)
34
35### Bugs Fixed
36
37- Fixes issues with "id" encoding when using special characters that should be allowed in the "id" property of a document. [#22548](https://github.com/Azure/azure-sdk-for-js/pull/22548)
38
39## 3.16.2 (2022-06-24)
40
41### Bugs Fixed
42
43- Adds support to run queries with group by over a column with null values. [#22345](https://github.com/Azure/azure-sdk-for-js/pull/22345)
44
45## 3.16.1 (2022-05-31)
46
47### Bugs Fixed
48
49- Fix [#22003](https://github.com/Azure/azure-sdk-for-js/issues/22003) missing interface error. [#22015](https://github.com/Azure/azure-sdk-for-js/pull/22015)
50
51## 3.16.0 (2022-05-23)
52
53### Features Added
54
55- Allow users like cosmos-explorer to specify hierarchical partition keys. https://github.com/Azure/azure-sdk-for-js/pull/21934
56- Support Dedicated Gateway RequestOptions and Max Integrated Cache Staleness. https://github.com/Azure/azure-sdk-for-js/pull/21240
57
58## 3.15.1 (2022-01-24)
59
60### Bugs Fixed
61
62- Fixed the paths mapped by the `browser` entry in `package.json` to be correct for the package's new output structure. This solves errors with bundling the package for browsers.
63
64## 3.15.0 (2021-11-22)
65
66### Features Added
67
68- _GA_ Adds `container.item(itemId).patch()`. `patch()` is an alternative to `replace()` for item updates. https://github.com/Azure/azure-sdk-for-js/pull/16264/files#diff-7caca690c469e2025576523c0377ac71815f001024fde7c48b20cd24adaa6977R561
69- _GA_ support for Bulk operation PATCH.
70- _GA_ support for Batch operation PATCH.
71- Added the `SasTokenProperties` type and a `createAuthorizationSasToken` function to enable scoped access to Cosmos resources with SAS tokens. For an example that demonstrates creating a SAS token and using it to authenticate a `CosmosClient`, see [the `SasTokenAuth` sample](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/cosmos/samples/v3/typescript/src/SasTokenAuth.ts).
72
73### Other Changes
74
75- Made several changes to the sample programs to improve code quality and compatibility with Node 12, and upgraded the sample programs' dependencies.
76
77## 3.14.1 (2021-09-02)
78
79### Bugs Fixed
80
81- Fix @azure/core-rest-pipeline version for AAD auth.
82
83## 3.14.0 (2021-09-01)
84
85### Features Added
86
87- _PREVIEW_ Adds `container.item(itemId).patch()`. `patch()` is an alternative to `replace()` for item updates. https://github.com/Azure/azure-sdk-for-js/pull/16264/files#diff-7caca690c469e2025576523c0377ac71815f001024fde7c48b20cd24adaa6977R561
88- _PREVIEW_ Adds support for Bulk operation PATCH.
89- _PREVIEW_ Adds support for Batch operation PATCH.
90
91### Bugs Fixed
92
93- Fixes bug where Batch was passing the wrong header for batch requests with partition keys
94- Fixes 401s when using AAD auth. AAD credentials should now work and no longer cause 429s from @azure/identity at high throughput.
95
96## 3.13.1 (2021-08-23)
97
98### Bugs Fixed
99
100- Fixed bugs in session token clearing logic. Session Not found (404, substatus 1002) was not being handled correctly by the session retry policy and would mistakenly retry the request with the same session token.
101
102## 3.13.0 (2021-08-10)
103
104### Features Added
105
106- Adds TransactionalBatch to items `container.items.batch(operations)`
107
108### Bugs Fixed
109
110- Fixed bulk requests which had operations without partitionKey specified.
111
112## 3.12.3 (2021-07-23)
113
114### Bugs Fixed
115
116- Fix bulk operations on containers with multiple partitions with nested partition keys
117
118## 3.12.2 (2021-07-21)
119
120### Features Added
121
122- Adopted target ES2017 to reduce bundle size.
123
124## 3.12.1 (2021-07-16)
125
126### Bugs Fixed
127
128- Returned default retryPolicy option `fixedRetryIntervalInMilliseconds` to its original default 0.
129
130## 3.12.0 (2021-07-06)
131
132### Features Added
133
134- With the dropping of support for Node.js versions that are no longer in LTS, the dependency on `@types/node` has been updated to version 12. Read our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
135- Added background refresher for endpoints, and new `ConnectionPolicy` options. Refreshing defaults to true, and the default refresh rate is every 5 minutes.
136
137```js
138const client = new CosmosClient({
139 endpoint,
140 key: masterKey,
141 connectionPolicy: {
142 ...defaultConnectionPolicy,
143 endpointRefreshRateInMs: 700,
144 enableBackgroundEndpointRefreshing: true,
145 },
146});
147```
148
149- Added `client.dispose()` for closing the endpoint refresher verbosely. Necessary when destroying the CosmosClient inside existing processes like an express web server, or when you want to destroy the client and create a new one in the same process.
150
151```js
152const client = new CosmosClient();
153client.dispose(); // cancels background endpoint refreshing
154```
155
156## 3.11.5 (2021-06-10)
157
158### Features Added
159
160### Breaking Changes
161
162### Key Bugs Fixed
163
164### Fixed
165
166- BUGFIX: Adds another failover condition.
167
168## 3.11.4 (2021-06-10)
169
170- BUGFIX: Correctly failover to new regions when regional DNS has gone offline.
171
172## 3.11.3 (2021-05-21)
173
174- BUGFIX: Sanitize user endpoint URLs for AAD DataPlane RBAC token generation.
175
176## 3.11.2 (2021-05-11)
177
178- BUGFIX: Cache https client between requests.
179
180## 3.11.1 (2021-05-06)
181
182- BUGFIX: Import URL from Browser/Node shim rather than built-in module.
183
184## 3.11.0 (2021-04-21)
185
186- FEATURE: Internal client update. No user facing changes, but major version bump to be safe.
187
188## 3.10.6 (2021-04-14)
189
190- BUGFIX: Adds partitionKey parameter to `container.conflicts.delete`
191
192## 3.10.5 (2021-03-25)
193
194- BUGFIX: Pins node-abort-controller version as we depend on a type in v1.2.0.
195
196## 3.10.4 (2021-03-23)
197
198- FEATURE: Adds Bulk continueOnError option.
199
200## 3.10.3 (2021-03-12)
201
202- BUGFIX: Removes direct dependency on @azure/identity while retaining compatibility.
203
204## 3.10.2 (2021-03-11)
205
206- BUGFIX: Fixes @azure/identity dependency in dev deps.
207
208## 3.10.1 (2021-03-10)
209
210- BUGFIX: Autogenerates IDs for Upsert operations in bulk.
211
212## 3.10.0 (2021-01-21)
213
214- FEATURE: Adds AAD authentication via @azure/identity.
215
216## 3.9.5 (2021-01-18)
217
218- BUGFIX: Throws correct Invalid Continuation Token error when making request with malformed token
219- BUGFIX: Defaults partitionKeyValue to `'[{}]'` when missing in Read/Delete bulk operations
220- BUGFIX: Sums group by operations for cross-partition queries correctly with null values.
221
222## 3.9.3 (2020-10-19)
223
224- BUGFIX: Fixes bulk operations with top level partitionKey values that are undefined or null.
225
226## 3.9.2 (2020-09-16)
227
228- BUGFIX: Fixes slow `userAgent` lookup on azure functions.
229
230## 3.9.1 (2020-08-28)
231
232- BUGFIX: Fixes `OperationInput` type to be more accurate based on `OperationType`.
233- FEATURE: Bulk requests with `Create` operations will now autogenerate IDs if they are not present.
234- FEATURE: The `BulkOperationType` enum now exists and can be used when making bulk requests.
235
236## 3.9.0 (2020-08-13)
237
238- FEATURE: Adds support for autoscale parameters on container and database create methods
239
240Note that `maxThroughput` cannot be passed with `throughput`.
241
242```js
243// correct
244const containerDefinition = {
245 id: "sample container",
246 indexingPolicy: { indexingMode: IndexingMode.consistent },
247 maxThroughput: 500,
248 autoUpgradePolicy: {
249 throughputPolicy: {
250 incrementPercent: 15
251 }
252 }
253};
254database.container.create(containerDefinition)
255
256// incorrect
257const containerDefinition = {
258 id: "sample container",
259 indexingPolicy: { indexingMode: IndexingMode.consistent },
260 throughput: 500, // do not specify throughput with maxThroughput
261 maxThroughput: 500
262 autoUpgradePolicy: {
263 throughputPolicy: {
264 incrementPercent: 15
265 }
266 }
267};
268database.container.create(containerDefinition)
269```
270
271## 3.8.2 (2020-08-12)
272
273- BUGFIX: Fix checkURL function for Node 8
274
275## 3.8.1 (2020-08-12)
276
277- BUGFIX: Adds separate URL module for browser/node.
278
279## 3.8.0 (2020-08-10)
280
281- FEATURE: Throws when initializing ClientContext with an invalid endpoint
282- FEATURE: Changes JSONArray type internal from Array to ArrayLike to avoid requiring type coercion for immutable data
283- FEATURE: Adds bulk request to container.items. Allows aggregate bulk request for up to 100 operations on items with the types: Create, Upsert, Read, Replace, Delete
284
285```js
286// up to 100 operations
287const operations: OperationInput[] = [
288 {
289 operationType: "Create",
290 resourceBody: { id: "doc1", name: "sample", key: "A" },
291 },
292 {
293 operationType: "Upsert",
294 resourceBody: { id: "doc2", name: "other", key: "A" },
295 },
296 {
297 operationType: "Read",
298 id: "readItemId",
299 partitionKey: "key",
300 },
301];
302
303await database.container.items.bulk(operations);
304```
305
306## 3.7.4 (2020-06-30)
307
308- BUGFIX: Properly escape ASCII "DEL" character in partition key header
309
310## 3.7.3 (2020-06-29)
311
312- BUGFIX: Cannot create item with automatic id generation and a container partitioned on ID (#9734)
313
314## 3.7.2 (2020-06-16)
315
316- BUGFIX: Internal abort signal incorrectly triggered when user passes a custom abort signal. See #9510 for details.
317
318## 3.7.1 (2020-06-12)
319
320- BUGFIX: Typo in globalCrypto.js causing errors in IE browser
321- BUGFIX: Resource tokens not matching for item delete operations (#9110)
322
323## 3.7.0 (2020-06-08)
324
325- BUGFIX: Support crypto functions in Internet Explorer browser
326- BUGFIX: Incorrect key casing in object returned by `setAuthorizationHeader`
327- FEATURE: Adds `readOffer` methods to container and database
328- FEATURE: Allows string value `partitionKey` parameter when creating containers
329
330The following result in the same behavior:
331
332```js
333const containerDefinition = {
334 id: "sample container",
335 indexingPolicy: { indexingMode: IndexingMode.consistent },
336 throughput: 400,
337 partitionKey: { paths: ["/key"] }
338};
339database.container.create(containerDefinition);
340
341// OR as a string
342
343const containerDefinition = {
344 id: "sample container",
345 indexingPolicy: { indexingMode: IndexingMode.consistent },
346 throughput: 400,
347 partitionKey: "/key" } // must have leading slash "/"
348};
349database.container.create(containerDefinition);
350```
351
352## 3.6.3 (2020-04-08)
353
354- FEATURE: Add `partitionKey` to `FeedOptions` for scoping a query to a single partition key value
355
356@azure/cosmos V2 has two different but equivalent ways to specify the partition key for a query:
357
358```js
359// V2 These are effectively the same
360container.items.query("SELECT * from c", { partitionKey: "foo" }).toArray();
361container.items.query('SELECT * from c WHERE c.yourPartitionKey = "foo"').toArray();
362```
363
364In an effort to simplify, the V3 SDK removed `partitionKey` from `FeedOptions` so there was only one way to specify the partition key:
365
366```js
367// V3
368container.items.query('SELECT * from c WHERE c.yourPartitionKey = "foo"').fetchAll();
369```
370
371Based on customer feedback, we identified scenarios where it still makes sense to support passing the partition key via `FeedOptions` and have decided to restore the behavior.
372
373## 3.6.2 (2020-02-20)
374
375- BUG FIX: Support signing in web workers where this === self
376
377## 3.6.1 (2020-02-11)
378
379- BUG FIX: Normalize location names when selecting endpoint. Allows passing of normalized endpoint names
380
381## 3.6.0 (2020-02-10)
382
383- FEATURE: Add support for spatial indexing, bounding boxes, and geospatial configuration
384- BUG FIX: Fix bug when passing forceQueryPlan to QueryIterator for non-item resources (#7333)
385
386## 3.5.4 (2020-01-28)
387
388- BUG FIX: Return parsed number instead of string for request charge
389
390## 3.5.3 (2020-01-06)
391
392- BUG FIX: maxDegreeOfParallelism was defaulting to 1 and should default to the number of partitions of the collection
393- BUG FIX: maxItemCount was defaulting to 10 and should default to undefined
394- Set default TLS version to 1.2 (#6761)
395- Use tslib 1.10.0 (#6710)
396- Add partition key to code sample (#6612)
397
398## 3.5.2 (2019-12-03)
399
400- Fix handling of special characters in item ids when signing tokens in the browser (#6379)
401
402## 3.5.1 (2019-11-25)
403
404- Fix bug when paginating GROUP BY queries or using in conjunction with TOP/OFFSET/LIMIT (#6003)
405- Improve error message for mixed type ORDER BY (#6306)
406
407## 3.5.0 (2019-11-21)
408
409- FEATURE: Endpoint discovery and multi-region failover improvements. See https://github.com/Azure/azure-sdk-for-js/pull/6283 for more information on this change. (#6283)
410- Makes changeFeed and query options optional. Fix #6232 Fix #6277 (#6273)
411
412## 3.4.2 (2019-11-07)
413
414- Fixes bug where the query may throw a 410 error during a split operation. Instead, throw 503 (#6074)
415
416## 3.4.1 (2019-11-05)
417
418- Fix region drop failover scenario and add test (#5892)
419
420## 3.4.0 (2019-10-28)
421
422- FEATURE: GROUP BY query support (#5749)
423- Update proxy-agent. Remove types folder (#5854)
424- Typo: Fix "an" vs "a" (#5812)
425- Update to Mocha 6.2.2 (#5824)
426- Remove unused Range type (#5686)
427- Remove universal-user-agent (#5869)
428
429## 3.3.4 (2019-10-14)
430
431- Query bug fix. Empty result last call not reporting proper RUs (#5517)
432- Sign headers using internal package (#5523)
433- Use internal digest function instead of crypto-hash package (#5493)
434- Remove internal binary-search-bounds package (#5417)
435- Fix atob bug impacting browser users (#5375)
436
437## 3.3.2 (2019-10-03)
438
439- Export TokenProvider and RequestInfo types (#5262)
440- Remove atob package in favor of local version (#5334)
441- Fix incorrect lib version in UserAgent (#5295)
442- Allow zero for Item TTL (#5257)
443
444## 3.3.0 (2019-09-24)
445
446- FEATURE: Add userAgentSuffix to CosmosClient constructor options (#5068)
447- Guard process.env to fix webpack issues (#5223)
448- Fixes bug where initial QueryIterator promise was not being created (#5215)
449- Fix aggregates bug when query was returning no results (#5184)
450- sideEffects field set to false (#5022)
451
452## 3.2.0 (2019-08-26)
453
454- FEATURE: Endpoint resolution now blocks until initialized (#409)
455- FEATURE: Add bufferItems support & other cross-partition perf improvements (#397)
456- Fix missing AbortSignal type for users not targeting the DOM (#416)
457- Add sample for bulk update with continuation token (#402)
458- Export default partition key path (#405)
459
460## 3.1.1 (2019-08-07)
461
462- Fix bug where offset limit iterator was being called for each item under the offset count (#398)
463- Add retry on EPIPE error (#400)
464
465## 3.1.0 (2019-07-26)
466
467- FEATURE: Set default ResponseContinuationTokenLimitInKB to 1kb. Prevents header limit errors (#384)
468- Remove unused disableSSLVerification options (#388)
469
470## 3.0.4 (2019-07-22)
471
472- Allow initialHeaders to explicitly set partition key header (#383)
473- Use package.json#files to prevent extraneous files from being pubished (#382)
474- Fix for routing map sort error on older version of node+v8 (#378)
475- Fixes bug when user supplies partial retry options. Close #377 (#379)
476- README updates (#374)
477
478## 3.0.3 (2019-07-17)
479
480- Fix webpack usage. Prevent resolving modules called with `require` (#373)
481- Various internal API cleanups and sample fixes
482
483## 3.0.2 (2019-07-09)
484
485Fixes a long outstanding bug where RUs were always being reported as 0 for aggregate queries (#366)
486
487## 3.0.1 (2019-07-02)
488
489Fixes broken session tokens in the browser. Cosmos uses file system friendly base64 to represent resources internally but does not work with the builtin browser atob function (#363)
490
491## 3.0.0 (2019-06-28)
492
493🎉 v3 release! 🎉 Many new features, bug fixes, and a few breaking changes. Primary goals of this release:
494
495- Implement major new features:
496 - DISTINCT queries
497 - LIMIT/OFFSET queries
498 - User cancelable requests
499- Update to the latest Cosmos REST API version where [all containers have unlimited scale](https://docs.microsoft.com/azure/cosmos-db/migrate-containers-partitioned-to-nonpartitioned)
500- Make it easier to use Cosmos from the browser
501- Better align with the new [Azure JS SDK guidlines](https://azure.github.io/azure-sdk/typescript_introduction.html)
502
503### Migration Guide for Breaking Changes
504
505#### Improved Client Constructor Options (#246)
506
507Constructor options have been simplified:
508
509- `masterKey` was renamed `key` and moved to the top-level
510- Properties previously under `options.auth` have moved to the top-level
511
512```js
513// v2
514const client = new CosmosClient({
515 endpoint: "https://your-database.cosmos.azure.com",
516 auth: {
517 masterKey: "your-primary-key",
518 },
519});
520
521// v3
522const client = new CosmosClient({
523 endpoint: "https://your-database.cosmos.azure.com",
524 key: "your-primary-key",
525});
526```
527
528#### Simplified QueryIterator API (#238 #316)
529
530In v2 there were many different ways to iterate or retrieve results from a query. We have attempted to simplify the v3 API and remove similar or duplciate APIs:
531
532- Remove iterator.next() and iterator.current(). Use fetchNext() to get pages of results.
533- Remove iterator.forEach(). Use async iterators instead.
534- iterator.executeNext() renamed to iterator.fetchNext()
535- iterator.toArray() renamed to iterator.fetchAll()
536- Pages are now proper `Response` objects intead of plain JS objects
537
538```js
539const container = client.database(dbId).container(containerId)
540
541// v2
542container.items.query('SELECT * from c').toArray()
543container.items.query('SELECT * from c').executeNext()
544container.items.query('SELECT * from c').forEach(({ body: item }) => { console.log(item.id) })
545
546// v3
547container.items.query('SELECT * from c').fetchAll()
548container.items.query('SELECT * from c').fetchNext()
549for await(const { result: item } in client.databases.readAll().getAsyncIterator()) {
550 console.log(item.id)
551}
552```
553
554#### Simplified Partition Keys for Queries
555
556v2 has two different but equivalent ways to specify the partition key for a query:
557
558```js
559// v2. These are effectively the same
560container.items.query("SELECT * from c", { partitionKey: "foo" }).toArray();
561container.items.query('SELECT * from c WHERE c.yourPartitionKey = "foo"').toArray();
562```
563
564v3 removed `partitionKey` from `FeedOptions` so there is now only one way to specify the partition key:
565
566```js
567// v3
568container.items.query('SELECT * from c WHERE c.yourPartitionKey = "foo"').fetchAll();
569```
570
571#### Fixed Containers are now Paritioned (#308)
572
573[The Cosmos service now supports partition keys on all containers, including those that were previously created as fixed containers](https://docs.microsoft.com/azure/cosmos-db/migrate-containers-partitioned-to-nonpartitioned). The v3 SDK updates to the latest API version that implements this change, but it is not breaking. If you do not supply a partition key for operations, we will default to a system key that works with all your existing containers and documents.
574
575#### `upsert` removed for Stored Procedures (#356)
576
577Previously `upsert` was allowed for non-partitioned collections, but with the API version update, all collections are partitioned so we removed it entirely.
578
579#### Item reads will not throw on 404 (#343, Community Request)
580
581```js
582const container = client.database(dbId).container(containerId);
583
584// v2
585try {
586 container.items.read(id, undefined);
587} catch (e) {
588 if (e.code === 404) {
589 console.log("item not found");
590 }
591}
592
593// v3
594const { result: item } = container.items.read(id, undefined);
595if (item === undefined) {
596 console.log("item not found");
597}
598```
599
600#### Default Multi Region Write (#335)
601
602The SDK will now write to multiple regions by default if your database configuration supports it. This was previously opt-in behavior.
603
604#### Proper Error Objects (#334, Community Request)
605
606Failed requests now throw proper `Error` or subclasses of `Error`. Previously they threw plain JS objects.
607
608### New Features
609
610#### User Cancellable Requests (#263, Community Request)
611
612The move to `fetch` internally allows us to use the browser `AbortController` API to support user cancellable operations. In the case of operations where multiple requests are potentially in progress (like cross partition queries), all requests for the operation will be canceled. Modern browser users will already have `AbortController`. Node.js users will need to use a [polyfill library](https://www.npmjs.com/package/node-abort-controller)
613
614```js
615const controller = new AbortController();
616const { result: item } = await items.query("SELECT * from c", { abortSignal: controller.signal });
617controller.abort();
618```
619
620#### Set throughput as part of db/container create operation (#220)
621
622```js
623const { database } = client.databases.create({ id: "my-database", throughput: 10000 });
624database.containers.create({ id: "my-container", throughput: 10000 });
625```
626
627#### @azure/cosmos-sign (#213)
628
629Header token generation was split out into a new library, @azure/cosmos-sign. Anyone calling the Cosmos REST API directly can use this to sign headers using the same code we call inside @azure/cosmos.
630
631#### UUID for generated IDs (#355)
632
633v2 had custom code to generate item IDs. We have switched to the well known and maintained community library `uuid`.
634
635#### Connection Strings (#350, Community Request)
636
637It is now possible to pass a connection string copied from the Azure portal:
638
639```js
640const client = new CosmosClient(
641 "AccountEndpoint=https://test-account.documents.azure.com:443/;AccountKey=<KEY HERE>;"
642);
643```
644
645#### Add DISTINCT and LIMIT/OFFSET queries (#306)
646
647```js
648const { results } = await items.query("SELECT DISTINCT VALUE r.name FROM ROOT").fetchAll();
649const { results } = await items.query("SELECT * FROM root r OFFSET 1 LIMIT 2").fetchAll();
650```
651
652### Improved Browser Experience
653
654While it was possible to use the v2 SDK in the browser it was not an ideal experience. You needed to polyfill several node.js built-in libraries and use a bundler like Webpack or Parcel. The v3 SDK makes the out of the box experience much better for browser users.
655
656- Replace request internals with `fetch` (#245)
657- Remove usage of Buffer (#330)
658- Remove node builtin usage in favor of universal packages/APIs (#328)
659- Switch to node-abort-controller (#294)
660
661### Bug Fixes
662
663- Fix offer read and bring back offer tests (#224)
664- Fix EnableEndpointDiscovery (#207)
665- Fix missing RUs on paginated results (#360)
666- Expand SQL query parameter type (#346)
667- Add ttl to ItemDefinition (#341)
668- Fix CP query metrics (#311)
669- Add activityId to FeedResponse (#293)
670- Switch \_ts type from string to number (#252)(#295)
671- Fix Request Charge Aggregation (#289)
672- Allow blank string partition keys (#277)
673- Add string to conflict query type (#237)
674- Add uniqueKeyPolicy to container (#234)
675
676### Engineering Systems
677
678Not always the most visible changes, but they help our team ship better code, faster.
679
680- Use rollup for production builds (#104)
681- Update to Typescript 3.5 (#327)
682- Convert to TS project references. Extract test folder (#270)
683- Enable noUnusedLocals and noUnusedParameters (#275)
684- Azure Pipelines YAML for CI builds (#298)
685
686## 2.0.1 (2018-09-25)
687
688- Fix type issue (See #141)
689
690## 2.0.0 (2018-09-24)
691
692- Multi-region Write support
693- Shared resource response properties added to responses
694- Changed query to allow for customer types for all Resource types
695- Modified items.query to allow for cross partition query
696- Misc fixes/doc updates
697
698## 2.0.0-3 (2018-08-02)
699
700- New object model
701- Updated documentation and samples
702- Improved types
703- Added `createdIfNotExists` for database and container
704- Added prettier
705- Added public CI (Travis and VSTS)
706
707## 2.0.0-0 (2018-08-01)
708
709- Added Promise support
710- Added token handler option for auth
711- typings now emitted from source (moved source to TypeScript)
712- Added CosmosClient (DocumentClient now considered deprecated)
713
714## 1.14.4 (2018-05-03)
715
716- npm documentation fixed.
717
718## 1.14.3 (2018-05-03)
719
720- Added support for default retries on connection issues.
721- Added support to read collection change feed.
722- Fixed session consistency bug that intermittently caused "read session not available".
723- Added support for query metrics.
724- Modified http Agent's maximum number of connections.
725
726## 1.14.2 (2017-12-21)
727
728- Updated documentation to use Azure Cosmos DB.
729- Added Support for proxyUrl setting in ConnectionPolicy.
730
731## 1.14.1 (2017-11-10)
732
733- Minor fix for case sensitive file systems.
734
735## 1.14.0 (2017-11-09)
736
737- Adds support for Session Consistency.
738- This SDK version requires the latest version of Azure Cosmos DB Emulator available for download from https://aka.ms/cosmosdb-emulator.
739
740## 1.13.0 (2017-10-11)
741
742- Splitproofed cross partition queries.
743- Adds supports for resource link with leading and trailing slashes (and corresponding tests).
744
745## 1.12.2 (2017-08-10)
746
747- npm documentation fixed.
748
749## 1.12.1 (2017-08-10)
750
751- Fixed bug in executeStoredProcedure where documents involved had special unicode characters (LS, PS).
752- Fixed bug in handling documents with unicode characters in partition key.
753- Fixed support for creating collection with name media (github #114).
754- Fixed support for permission authorization token (github #178).
755
756## 1.12.0 (2017-05-10)
757
758- Added support for Request Unit per Minute (RU/m) feature.
759- Added support for a new consistency level called ConsistentPrefix.
760- Added support for UriFactory.
761- Fixed the unicode support bug (github #171)
762
763## 1.11.0 (2017-03-16)
764
765- Added the support for aggregation queries (COUNT, MIN, MAX, SUM, and AVG).
766- Added the option for controlling degree of parallelism for cross partition queries.
767- Added the option for disabling SSL verification when running against Emulator.
768- Lowered minimum throughput on partitioned collections from 10,100 RU/s to 2500 RU/s.
769- Fixed the continuation token bug for single partition collection (github #107).
770- Fixed the executeStoredProcedure bug in handling 0 as single param (github #155).
771
772## 1.10.2 (2017-01-27)
773
774- Fixed user-agent header to include the SDK version.
775- Minor code cleanup.
776
777## 1.10.1 (2016-12-22)
778
779- Disabling SSL verification when using the SDK to target the emulator(hostname=localhost).
780- Added support for enabling script logging during stored procedure execution.
781
782## 1.10.0 (2016-10-03)
783
784- Added support for cross partition parallel queries.
785- Added support for TOP/ORDER BY queries for partitioned collections.
786
787## 1.9.0 (2016-07-07)
788
789- Added retry policy support for throttled requests. (Throttled requests receive a request rate too large exception, error code 429.)
790 By default, DocumentClient retries nine times for each request when error code 429 is encountered, honoring the retryAfter time in the response header.
791 A fixed retry interval time can now be set as part of the RetryOptions property on the ConnectionPolicy object if you want to ignore the retryAfter time returned by server between the retries.
792 DocumentClient now waits for a maximum of 30 seconds for each request that is being throttled (irrespective of retry count) and returns the response with error code 429.
793 This time can also be overriden in the RetryOptions property on ConnectionPolicy object.
794
795- DocumentClient now returns x-ms-throttle-retry-count and x-ms-throttle-retry-wait-time-ms as the response headers in every request to denote the throttle retry count and the cummulative time the request waited between the retries.
796
797- The RetryOptions class was added, exposing the RetryOptions property on the ConnectionPolicy class that can be used to override some of the default retry options.
798
799## 1.8.0 (2016-06-14)
800
801- Added the support for geo-replicated database accounts.
802
803## 1.7.0 (2016-04-26)
804
805- Added the support for TimeToLive(TTL) feature for documents.
806
807## 1.6.0 (2016-03-29)
808
809- Added support for Partitioned Collections.
810- Added support for new offer types.
811
812## 1.5.6 (2016-03-08)
813
814- Fixed RangePartitionResolver.resolveForRead bug where it was not returning links due to a bad concat of results.
815- Move compareFunction from Range class to RangePartitionResolver class.
816
817## 1.5.5 (2016-02-02)
818
819- Fixed hashParitionResolver resolveForRead(): When no partition key supplied was throwing exception, instead of returning a list of all registered links.
820
821## 1.5.4 (2016-02-01)
822
823- Dedicated HTTPS Agent: Avoid modifying the global. Use a dedicated agent for all of the lib’s requests.
824
825## 1.5.3 (2016-01-26)
826
827- Properly handle dashes in the mediaIds.
828
829## 1.5.2 (2016-01-22)
830
831- Fix memory leak.
832
833## 1.5.1 (2016-01-04)
834
835- Renamed "Hash" directory to "hash".
836
837## 1.5.0 (2015-12-31)
838
839- Added client-side sharding support.
840- Added hash partition resolver implementation.
841- Added range partitoin resolver implementation.
842
843## 1.4.0 (2015-10-06)
844
845- Implement Upsert. New upsertXXX methods on documentClient.
846
847## 1.3.0 (2015-10-06)
848
849- Skipped to bring version numbers in alignment with other SDKs.
850
851## 1.2.2 (2015-09-10)
852
853- Split Q promises wrapper to new repository.
854- Update to package file for npm registry.
855
856## 1.2.1 (2015-08-15)
857
858- Implements ID Based Routing.
859- Fixes Issue [#49](https://github.com/Azure/azure-documentdb-node/issues/49) - current property conflicts with method current().
860
861## 1.2.0 (2015-08-05)
862
863- Added support for GeoSpatial index.
864- Validates id property for all resources. Ids for resources cannot contain ?, /, #, \\, characters or end with a space.
865- Adds new header "index transformation progress" to ResourceResponse.
866
867## 1.1.0 (2015-07-09)
868
869- Implements V2 indexing policy.
870
871## 1.0.3 (2015-06-04)
872
873- Issue [#40](https://github.com/Azure/azure-documentdb-node/issues/40) - Implemented eslint and grunt configurations in the core and promise SDK.
874
875## 1.0.2 (2015-05-23)
876
877- Issue [#45](https://github.com/Azure/azure-documentdb-node/issues/45) - Promises wrapper does not include header with error.
878
879## 1.0.1 (2015-05-15)
880
881- Implemented ability to query for conflicts by adding readConflicts, readConflictAsync, queryConflicts.
882- Updated API documentation.
883- Issue [#41](https://github.com/Azure/azure-documentdb-node/issues/41) - client.createDocumentAsync error.
884
885Microsoft will provide notification at least **12 months** in advance of retiring an SDK in order to smooth the transition to a newer/supported version.
886
887New features, functionality, and optimizations are only added to the current SDK. So it's recommended that you always upgrade to the latest SDK version as early as possible.
888
889Any request to Cosmos DB using a retired SDK will be rejected by the service.
890
891> [!WARNING]
892> All versions **1.x** of the Cosmos JavaScript SDK for SQL API will be retired on **August 30, 2020**.
893>
894> <br/>
895
896| Version | Release Date | Retirement Date |
897| ------------------------ | ------------------ | --------------- |
898| [3.4.2](#3.4.2) | November 7, 2019 | --- |
899| [3.4.1](#3.4.1) | November 5, 2019 | --- |
900| [3.4.0](#3.4.0) | October 28, 2019 | --- |
901| [3.3.6](#3.3.6) | October 14, 2019 | --- |
902| [3.3.5](#3.3.5) | October 14, 2019 | --- |
903| [3.3.4](#3.3.4) | October 14, 2019 | --- |
904| [3.3.3](#3.3.3) | October 3, 2019 | --- |
905| [3.3.2](#3.3.2) | October 3, 2019 | --- |
906| [3.3.1](#3.3.1) | October 1, 2019 | --- |
907| [3.3.0](#3.3.0) | September 24, 2019 | --- |
908| [3.2.0](#3.2.0) | August 26, 2019 | --- |
909| [3.1.1](#3.1.1) | August 7, 2019 | --- |
910| [3.1.0](#3.1.0) | July 26, 2019 | --- |
911| [3.0.4](#3.0.4) | July 22, 2019 | --- |
912| [3.0.3](#3.0.3) | July 17, 2019 | --- |
913| [3.0.2](#3.0.2) | July 9, 2019 | --- |
914| [3.0.0](#3.0.0) | June 28, 2019 | --- |
915| [2.1.5](#2.1.5) | March 20, 2019 | --- |
916| [2.1.4](#2.1.4) | March 15, 2019 | --- |
917| [2.1.3](#2.1.3) | March 8, 2019 | --- |
918| [2.1.2](#2.1.2) | January 28, 2019 | --- |
919| [2.1.1](#2.1.1) | December 5, 2018 | --- |
920| [2.1.0](#2.1.0) | December 4, 2018 | --- |
921| [2.0.5](#2.0.5) | November 7, 2018 | --- |
922| [2.0.4](#2.0.4) | October 30, 2018 | --- |
923| [2.0.3](#2.0.3) | October 30, 2018 | --- |
924| [2.0.2](#2.0.2) | October 10, 2018 | --- |
925| [2.0.1](#2.0.1) | September 25, 2018 | --- |
926| [2.0.0](#2.0.0) | September 24, 2018 | --- |
927| [2.0.0-3 (RC)](#2.0.0-3) | August 2, 2018 | --- |
928| [1.14.4](#1.14.4) | May 03, 2018 | August 30, 2020 |
929| [1.14.3](#1.14.3) | May 03, 2018 | August 30, 2020 |
930| [1.14.2](#1.14.2) | December 21, 2017 | August 30, 2020 |
931| [1.14.1](#1.14.1) | November 10, 2017 | August 30, 2020 |
932| [1.14.0](#1.14.0) | November 9, 2017 | August 30, 2020 |
933| [1.13.0](#1.13.0) | October 11, 2017 | August 30, 2020 |
934| [1.12.2](#1.12.2) | August 10, 2017 | August 30, 2020 |
935| [1.12.1](#1.12.1) | August 10, 2017 | August 30, 2020 |
936| [1.12.0](#1.12.0) | May 10, 2017 | August 30, 2020 |
937| [1.11.0](#1.11.0) | March 16, 2017 | August 30, 2020 |
938| [1.10.2](#1.10.2) | January 27, 2017 | August 30, 2020 |
939| [1.10.1](#1.10.1) | December 22, 2016 | August 30, 2020 |
940| [1.10.0](#1.10.0) | October 03, 2016 | August 30, 2020 |
941| [1.9.0](#1.9.0) | July 07, 2016 | August 30, 2020 |
942| [1.8.0](#1.8.0) | June 14, 2016 | August 30, 2020 |
943| [1.7.0](#1.7.0) | April 26, 2016 | August 30, 2020 |
944| [1.6.0](#1.6.0) | March 29, 2016 | August 30, 2020 |
945| [1.5.6](#1.5.6) | March 08, 2016 | August 30, 2020 |
946| [1.5.5](#1.5.5) | February 02, 2016 | August 30, 2020 |
947| [1.5.4](#1.5.4) | February 01, 2016 | August 30, 2020 |
948| [1.5.3](#1.5.2) | January 26, 2016 | August 30, 2020 |
949| [1.5.2](#1.5.2) | January 22, 2016 | August 30, 2020 |
950| [1.5.1](#1.5.1) | January 4, 2016 | August 30, 2020 |
951| [1.5.0](#1.5.0) | December 31, 2015 | August 30, 2020 |
952| [1.4.0](#1.4.0) | October 06, 2015 | August 30, 2020 |
953| [1.3.0](#1.3.0) | October 06, 2015 | August 30, 2020 |
954| [1.2.2](#1.2.2) | September 10, 2015 | August 30, 2020 |
955| [1.2.1](#1.2.1) | August 15, 2015 | August 30, 2020 |
956| [1.2.0](#1.2.0) | August 05, 2015 | August 30, 2020 |
957| [1.1.0](#1.1.0) | July 09, 2015 | August 30, 2020 |
958| [1.0.3](#1.0.3) | June 04, 2015 | August 30, 2020 |
959| [1.0.2](#1.0.2) | May 23, 2015 | August 30, 2020 |
960| [1.0.1](#1.0.1) | May 15, 2015 | August 30, 2020 |
961| [1.0.0](#1.0.0) | April 08, 2015 | August 30, 2020 |