UNPKG

51.7 kBMarkdownView Raw
1# Release History
2
3## 4.2.0 (2024-11-19)
4
5### Features Added
6
7- Full Text Support: This feature adds support for full text search policy and indexing policy. It also enables performing full text search queries. [docs](https://learn.microsoft.com/azure/cosmos-db/gen-ai/full-text-search)
8- Hybrid Search Support: This feature adds support for performing hybrid search queries. [docs](https://learn.microsoft.com/azure/cosmos-db/gen-ai/hybrid-search)
9- Added support for three optional properties to support `quantizedFlat` and `diskANN` vector indexing policies. The properties are: `quantizationByteSize`, `vectorIndexShardKey` and `indexingSearchListSize`.
10
11## 4.1.1 (2024-08-30)
12
13### Bugs Fixed
14
15- Fixed a issue caused by accessing `process` without checking its existence in the global scope, it was leading to crashes in non-Node environments.
16- The default value of `continueOnError` of BulkRequestOptions is now set to true. Pass `{ continueOnError: false }` in `bulkOptions` to stop executing operations when one fails.
17
18## 4.1.0 (2024-08-07)
19
20### Features Added
21
22- Vector Search: This feature introduces vector indexes, vector embedding policy and vector queries to enable vector similarity search in JS SDK. [docs](https://learn.microsoft.com/azure/cosmos-db/nosql/vector-search)
23- All versions and deletes mode in change feed: The All versions and deletes mode is added in change feed mode which captures every version and every change (create, update, and delete) made to items. [docs](https://learn.microsoft.com/azure/cosmos-db/nosql/change-feed-modes?tabs=all-versions-and-deletes#all-versions-and-deletes-change-feed-mode-preview)
24- Bypassing integrated cache: The option to bypass integrated cache is now available in `RequestOptions`. [docs](https://learn.microsoft.com/azure/cosmos-db/integrated-cache#bypass-the-integrated-cache-preview)
25- Computed Properties: Support for adding Computed Properties in items is added. [docs](https://learn.microsoft.com/azure/cosmos-db/nosql/query/computed-properties?tabs=dotnet#creating-computed-properties)
26- Composite Indexing: The JS SDK now supports including composite indexes in the indexing policy, improving query performance on multiple fields. [docs](https://learn.microsoft.com/azure/cosmos-db/index-overview#composite-indexes)
27- Correlated Activity Id: Correlated Activity Id is added in header of every query request on Items. This helps in troubleshooting by linking all requests for a query that involves multiple server interactions and partitions. Correlated Activity Id can be accessed through query response headers or `response.correlatedActivityId`.
28- Split proof Bulk API: Earlier, whenever Bulk API encountered a partition split during processing, it would return an error message. Now, JS SDK ensures that the Bulk API is resistant to partition split. [#18682](https://github.com/Azure/azure-sdk-for-js/issues/18682)
29- Improved samples: The samples have been updated in this release, now organized into two folders: `v3` for features up to the v3 release, and `v4` for features up to the v4 release.
30- Added support for MakeList and MakeSet query aggregators
31
32#### Vector Search
33
34- The following sample shows how to create a container with vector embedding and indexing policies.
35
36```js
37// define vector indexing policy
38const vectorEmbeddingPolicy = {
39 vectorEmbeddings: [
40 {
41 path: "/vector1",
42 dataType: VectorEmbeddingDataType.UInt8,
43 dimensions: 1000,
44 distanceFunction: VectorEmbeddingDistanceFunction.Euclidean,
45 },
46 {
47 path: "/vector2",
48 dataType: VectorEmbeddingDataType.Int8,
49 dimensions: 200,
50 distanceFunction: VectorEmbeddingDistanceFunction.DotProduct,
51 },
52 {
53 path: "/vector3",
54 dataType: VectorEmbeddingDataType.UInt8,
55 dimensions: 400,
56 distanceFunction: VectorEmbeddingDistanceFunction.Cosine,
57 },
58 ],
59};
60
61// add vector indexes in Indexing Policy
62const indexingPolicy = {
63 automatic: true,
64 indexingMode: "consistent",
65 vectorIndexes: [
66 { path: "/vector1", type: VectorIndexType.Flat },
67 { path: "/vector2", type: VectorIndexType.QuantizedFlat },
68 { path: "/vector3", type: VectorIndexType.DiskANN },
69 ],
70};
71
72// define and create container with vector Embedding Policy
73const containerDefinition = {
74 id: containerId,
75 partitionKey: { paths: ["/id"] },
76 indexingPolicy: indexingPolicy,
77 vectorEmbeddingPolicy: vectorEmbeddingPolicy,
78};
79await database.containers.createIfNotExists(containerDefinition);
80```
81
82- Vector Search queries without TOP or LIMIT+OFFSET are blocked by default, with an option to disable this check using `allowUnboundedNonStreamingQueries` in query FeedOptions. Also added an internal buffer size check to prevent excessive memory consumption, throwing errors if the buffer size exceeds the default. The max buffer size can be increased using the `vectorSearchBufferSize` option from query FeedOptions.
83
84#### Change Feed - All versions and deletes mode
85
86- The AllVersionsAndDeletes mode is only supported with `ChangeFeedStartFrom.Now` and `ChangeFeedStartFrom.Continuation`.
87- To read from the change feed in all versions and deletes mode, include `changeFeedMode` in changeFeedIteratorOptions:
88
89```js
90 const changeFeedIteratorOptions: ChangeFeedIteratorOptions = {
91 maxItemCount: 5,
92 changeFeedStartFrom: ChangeFeedStartFrom.Now(),
93 changeFeedMode: ChangeFeedMode.AllVersionsAndDeletes,
94 };
95 const iterator = container.items.getChangeFeedIterator(changeFeedIteratorOptions);
96```
97
98#### Bypassing Integrated Cache
99
100- Here is a sample showing how to enable `bypassIntegratedCache` in RequestOptions.
101
102```js
103 const options: RequestOptions = {bypassIntegratedCache: true};
104 const response = await container.item("1").read(options);
105```
106
107#### Computed Properties
108
109- The following snippet configures computed properties for a container:
110
111```js
112 const computedProperties: ComputedProperty[] = [{
113 name: "lowerLastName",
114 query:
115 "SELECT VALUE LOWER(IS_DEFINED(c.lastName) ? c.lastName : c.parents[0].familyName) FROM c",
116 },];
117 const { resource: containerdef } = await database.containers.createIfNotExists({
118 id: containerName,
119 computedProperties: computedProperties,
120 indexingPolicy: indexingPolicy,
121 });
122 const container: Container = database.container(containerdef.id);
123```
124
125#### Composite Indexing
126
127- Here's a sample of adding composite indexes for a container:
128
129```js
130 const containerDefinition: ContainerDefinition = {
131 id: "containerWithCompositeIndexingPolicy",
132 indexingPolicy: {
133 automatic: true,
134 indexingMode: IndexingMode.consistent,
135 includedPaths: [
136 {
137 path: "/*",
138 },
139 ],
140 excludedPaths: [],
141 compositeIndexes: [
142 [
143 { path: "/key", order: "ascending" },
144 { path: "/field", order: "ascending" },
145 ],
146 ],
147 },
148 };
149 await database.containers.create(containerDefinition);
150```
151
152- Added support for passing a custom `HttpClient` when constructing a `CosmosClient`.
153
154### Breaking Changes
155
156#### Dropped Support for TypeScript 4.1
157
158- We have opted to discontinue support for TypeScript version 4.1. Consequently, the minimum supported TypeScript version has been elevated to 4.2. Kindly ensure that your environment is promptly updated to align with these changes.
159
160### Bugs Fixed
161
162- Fix Bulk operations(Read, Delete, and Patch) failing due to wrong format of partition key in non-partitioned container.
163
164## 4.0.0 (2023-09-12)
165
166🎉 v4 release! 🎉 Many new features, bug fixes, and a few breaking changes.
167
168- Summary of new added features
169 - Diagnostics: A diagnostic object has been added to responses of api operations ie. point lookups, bulk & batch operations, query and error responses, which contains information related to metadata lookups, retries, request and reponse latencies and payload siezes.
170 - Hierarchical Partitioning: Containers with hierarchical partitions are now supported. [docs](https://learn.microsoft.com/azure/cosmos-db/hierarchical-partition-keys)
171 - Index metrics: can be enabled to show both utilized indexed paths and recommended indexed paths. [docs](https://learn.microsoft.com/azure/cosmos-db/nosql/index-metrics?tabs=javascript)
172 - New Changefeed iterator: which can consume changes for a specific partition key, a feed range or an entire container. [docs](https://learn.microsoft.com/azure/cosmos-db/nosql/change-feed-pull-model?tabs=JavaScript)
173 - Priority based throttling is now supported. [docs](https://devblogs.microsoft.com/cosmosdb/introducing-priority-based-execution-in-azure-cosmos-db-preview/)
174
175### New Features
176
177#### Diagnostics
178
179- Since `diagnostics` is added to all Response objects. You could programatically access `CosmosDiagnostic` as follows.
180
181```js
182 // For point look up operations
183 const { container, diagnostics: containerCreateDiagnostic } =
184 await database.containers.createIfNotExists({
185 id: containerId,
186 partitionKey: {
187 paths: ["/key1"],
188 },
189 });
190
191 // For Batch operations
192 const operations: OperationInput[] = [
193 {
194 operationType: BulkOperationType.Create,
195 resourceBody: { id: 'A', key: "A", school: "high" },
196 },
197 ];
198 const response = await container.items.batch(operations, "A");
199 const diagnostics = response.diagnostics
200
201 // For Bulk operations
202 const operations: OperationInput[] = [
203 {
204 operationType: BulkOperationType.Create,
205 resourceBody: { id: 'A', key: "A", school: "high" },
206 },
207 ];
208 const response = await container.items.bulk(operations);;
209 const diagnostics = response.diagnostics
210
211 // For query operations
212 const queryIterator = container.items.query("select * from c");
213 const { resources, diagnostics } = await queryIterator.fetchAll();
214
215 // While error handling
216 try {
217 // Some operation that might fail
218 } catch (err) {
219 const diagnostics = err.diagnostics
220 }
221```
222
223#### Hierarchical Partitioning
224
225- Here is a sampele for creating container with Hierarchical Partitions
226
227 ```js
228 const containerDefinition = {
229 id: "Test Database",
230 partitionKey: {
231 paths: ["/name", "/address/zip"],
232 version: PartitionKeyDefinitionVersion.V2,
233 kind: PartitionKeyKind.MultiHash,
234 },
235 };
236 const { container } = await database.containers.createIfNotExists(containerDefinition);
237 console.log(container.id);
238 ```
239
240- Definition of PartitionKey has been changed to support Hierarchical partitioning. Here is how to use the new definition.
241
242 - The operations for which PartitionKey can be derived from Request body, providing PartitionKey is optional as always i.e
243 ```js
244 const item = {
245 id: 1,
246 name: "foo",
247 address: {
248 zip: 100,
249 },
250 active: true,
251 };
252 await container.items.create(item);
253 ```
254 - Here is sample for operations which require hierarchical partition to be passed.
255
256 ```js
257 await container.item("1", ["foo", 100]).read();
258 ```
259
260 OR
261
262 ```js
263 const partitionKey: PartitionKey = new PartitionKeyBuilder()
264 .addValue("foo")
265 .addValue(100)
266 .build();
267 await container.item("1", partitionKey).read();
268 ```
269
270 - If you are not using Hierarchical Partitioning feature, Definition of Partition Key is practically backward compatible.
271 ```js
272 await container.item("1", "1").read();
273 ```
274
275#### New Change feed Iterator
276
277The v4 SDK now supports [Change feed pull model](https://learn.microsoft.com/azure/cosmos-db/nosql/change-feed-pull-model?tabs=JavaScript).
278
279**_Note: There are no breaking changes, the old change feed iterator is still supported._**
280
281Major Differences:
282
283- The new iterator allows fetching change feed for a partition key, a feed range, or an entire container, compared to the older iterator, which was limited to fetching change feed for a partition key only.
284
285- The new implementation is effectively an infinite list of items that encompasses all future writes and updates. The `hasMoreResults` property now always returns `true`, unlike the older implementation, which returned `false` when a `NotModified` status code was received from the backend.
286
287Here is an example of creating and using the new change feed iterator:
288
289```js
290const changeFeedOptions = {
291 changeFeedStartFrom: ChangeFeedStartFrom.Beginning("partition key or feed range"),
292 maxItemCount: 10,
293};
294const iterator = container.items.getChangeFeedIterator(changeFeedOptions);
295while (iterator.hasMoreResults) {
296 const res = await iterator.readNext();
297 // process res
298}
299```
300
301#### Index Metrics [#20194](https://github.com/Azure/azure-sdk-for-js/issues/20194)
302
303Azure Cosmos DB provides indexing metrics for optimizing query performance, especially when you're unsure about adjusting the indexing policy.
304You can enable indexing metrics for a query by setting the PopulateIndexMetrics property to true(default=false).
305
306```js
307const { resources: resultsIndexMetrics, indexMetrics } = await container.items
308 .query(querySpec, { populateIndexMetrics: true })
309 .fetchAll();
310```
311
312We only recommend enabling the index metrics for troubleshooting query performance.
313
314#### Enhanced Retry Utility for Improved SDK Reliability [#23475](https://github.com/Azure/azure-sdk-for-js/issues/23475)
315
316Improved the retry utility to align with other language SDKs. Now, it automatically retries requests on the next available region when encountering HTTP 503 errors (Service Unavailable)
317and handles HTTP timeouts more effectively, enhancing the SDK's reliability.
318
319#### Priority based throttling [docs](https://devblogs.microsoft.com/cosmosdb/introducing-priority-based-execution-in-azure-cosmos-db-preview/) [#26393](https://github.com/Azure/azure-sdk-for-js/pull/26393/files)
320
321Priority-based execution is a capability which allows users to specify priority for the request sent to Azure Cosmos DB. Based on the priority specified by the user, if there are more requests than the configured RU/s in a second, then Azure Cosmos DB will throttle low priority requests to allow high priority requests to execute.
322You can enable priority based throttling by setting priorityLevel property.
323
324```js
325const response =
326 (await container.item(document.id).read) < TestItem > { priorityLevel: PriorityLevel.Low };
327```
328
329### Bugs Fixed
330
331- Updated response codes for the getDatabase() method. [#25932](https://github.com/Azure/azure-sdk-for-js/issues/25932)
332- Fix Upsert operation failing when partition key of container is `/id` and `/id` is missing in the document. [#21383](https://github.com/Azure/azure-sdk-for-js/issues/21383)
333
334### Breaking Changes
335
336- The definition of PartitionKey is changed, PartitionKeyDefinition is now a independent type. [#23416](https://github.com/Azure/azure-sdk-for-js/issues/23416)
337
338## 3.17.3 (2023-02-13)
339
340### Features Added
341
342- Changes in bulk api to honour size restictions (i.e 2Mb) while creating individual batches.[#23923](https://github.com/Azure/azure-sdk-for-js/issues/23923)
343- Enriched Timeout error response. We had defined Timeout error as custom error in our sdk but we were not sending up any message along with it, now we are throwing the specific Error. [#23025](https://github.com/Azure/azure-sdk-for-js/issues/23025)
344- Added functionality to delete entire data for a partition id. [#22091](https://github.com/Azure/azure-sdk-for-js/issues/22091)
345- SDK now defines all possible error types, namely Export RestError, AbortError, TimeoutError, and ErrorResponse. [22789](https://github.com/Azure/azure-sdk-for-js/issues/22789)
346
347### Bugs Fixed
348
349- Removed excessive log warnings during bulk operations on a container with no partitionkey set.
350- Fix issue with GlobalEndpointManager never making endpoints available after they fall-back [#22726](https://github.com/Azure/azure-sdk-for-js/issues/22726)
351- Fix issue that caused parallel queries to break when returning a result of 0 or false. [#24493](https://github.com/Azure/azure-sdk-for-js/issues/24493)
352
353### Other Changes
354
355- Error handling guidelines are added in README.md
356
357## 3.17.2 (2022-11-15)
358
359### Bugs Fixed
360
361- Fix issue with patch api not working with aadCredentials [#20689](https://github.com/Azure/azure-sdk-for-js/issues/20689)
362- Improve the contract of Item.batch operation from type any to OperationResponse [#23652](https://github.com/Azure/azure-sdk-for-js/issues/20689)
363- Add section for the current limitations with the SDK [#21650](https://github.com/Azure/azure-sdk-for-js/issues/21650)
364- Fix issue aad refresh token automatically getting refreshed [#22620](https://github.com/Azure/azure-sdk-for-js/issues/22620)
365
366## 3.17.1 (2022-09-12)
367
368### Bugs Fixed
369
370- Fix issue with unwanted runtime dependency on `@azure/identity` [#22968](https://github.com/Azure/azure-sdk-for-js/issues/22968)
371
372## 3.17.0 (2022-08-19)
373
374### Features Added
375
376#### GA: Azure Cosmos DB Integrated Cache
377
378- Support DedicatedGatewayRequestOptions and MaxIntegratedCacheStaleness [#21240](https://github.com/Azure/azure-sdk-for-js/pull/21240)
379- Upgrade cosmos with azure core tracing [#22284](https://github.com/Azure/azure-sdk-for-js/pull/22284)
380- Removed old logging and implement Azure core logging coverage [#18723](https://github.com/Azure/azure-sdk-for-js/pull/18723?)
381
382### Bugs Fixed
383
384- ParallelQueryExecutionContextBase breaks use of abortSignal [#18544](https://github.com/Azure/azure-sdk-for-js/pull/18544)
385- Fixes id encoding issues when using special characters fo RoutingGateway
386
387## 3.16.3 (2022-07-13)
388
389### Bugs Fixed
390
391- 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)
392
393## 3.16.2 (2022-06-24)
394
395### Bugs Fixed
396
397- 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)
398
399## 3.16.1 (2022-05-31)
400
401### Bugs Fixed
402
403- 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)
404
405## 3.16.0 (2022-05-23)
406
407### Features Added
408
409- Allow users like cosmos-explorer to specify hierarchical partition keys. https://github.com/Azure/azure-sdk-for-js/pull/21934
410- Support Dedicated Gateway RequestOptions and Max Integrated Cache Staleness. https://github.com/Azure/azure-sdk-for-js/pull/21240
411
412## 3.15.1 (2022-01-24)
413
414### Bugs Fixed
415
416- 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.
417
418## 3.15.0 (2021-11-22)
419
420### Features Added
421
422- _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
423- _GA_ support for Bulk operation PATCH.
424- _GA_ support for Batch operation PATCH.
425- 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).
426
427### Other Changes
428
429- Made several changes to the sample programs to improve code quality and compatibility with Node 12, and upgraded the sample programs' dependencies.
430
431## 3.14.1 (2021-09-02)
432
433### Bugs Fixed
434
435- Fix @azure/core-rest-pipeline version for AAD auth.
436
437## 3.14.0 (2021-09-01)
438
439### Features Added
440
441- _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
442- _PREVIEW_ Adds support for Bulk operation PATCH.
443- _PREVIEW_ Adds support for Batch operation PATCH.
444
445### Bugs Fixed
446
447- Fixes bug where Batch was passing the wrong header for batch requests with partition keys
448- Fixes 401s when using AAD auth. AAD credentials should now work and no longer cause 429s from @azure/identity at high throughput.
449
450## 3.13.1 (2021-08-23)
451
452### Bugs Fixed
453
454- 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.
455
456## 3.13.0 (2021-08-10)
457
458### Features Added
459
460- Adds TransactionalBatch to items `container.items.batch(operations)`
461
462### Bugs Fixed
463
464- Fixed bulk requests which had operations without partitionKey specified.
465
466## 3.12.3 (2021-07-23)
467
468### Bugs Fixed
469
470- Fix bulk operations on containers with multiple partitions with nested partition keys
471
472## 3.12.2 (2021-07-21)
473
474### Features Added
475
476- Adopted target ES2017 to reduce bundle size.
477
478## 3.12.1 (2021-07-16)
479
480### Bugs Fixed
481
482- Returned default retryPolicy option `fixedRetryIntervalInMilliseconds` to its original default 0.
483
484## 3.12.0 (2021-07-06)
485
486### Features Added
487
488- 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.
489- Added background refresher for endpoints, and new `ConnectionPolicy` options. Refreshing defaults to true, and the default refresh rate is every 5 minutes.
490
491```js
492const client = new CosmosClient({
493 endpoint,
494 key: masterKey,
495 connectionPolicy: {
496 ...defaultConnectionPolicy,
497 endpointRefreshRateInMs: 700,
498 enableBackgroundEndpointRefreshing: true,
499 },
500});
501```
502
503- 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.
504
505```js
506const client = new CosmosClient();
507client.dispose(); // cancels background endpoint refreshing
508```
509
510## 3.11.5 (2021-06-10)
511
512### Features Added
513
514### Breaking Changes
515
516### Key Bugs Fixed
517
518### Fixed
519
520- BUGFIX: Adds another failover condition.
521
522## 3.11.4 (2021-06-10)
523
524- BUGFIX: Correctly failover to new regions when regional DNS has gone offline.
525
526## 3.11.3 (2021-05-21)
527
528- BUGFIX: Sanitize user endpoint URLs for AAD DataPlane RBAC token generation.
529
530## 3.11.2 (2021-05-11)
531
532- BUGFIX: Cache https client between requests.
533
534## 3.11.1 (2021-05-06)
535
536- BUGFIX: Import URL from Browser/Node shim rather than built-in module.
537
538## 3.11.0 (2021-04-21)
539
540- FEATURE: Internal client update. No user facing changes, but major version bump to be safe.
541
542## 3.10.6 (2021-04-14)
543
544- BUGFIX: Adds partitionKey parameter to `container.conflicts.delete`
545
546## 3.10.5 (2021-03-25)
547
548- BUGFIX: Pins node-abort-controller version as we depend on a type in v1.2.0.
549
550## 3.10.4 (2021-03-23)
551
552- FEATURE: Adds Bulk continueOnError option.
553
554## 3.10.3 (2021-03-12)
555
556- BUGFIX: Removes direct dependency on @azure/identity while retaining compatibility.
557
558## 3.10.2 (2021-03-11)
559
560- BUGFIX: Fixes @azure/identity dependency in dev deps.
561
562## 3.10.1 (2021-03-10)
563
564- BUGFIX: Autogenerates IDs for Upsert operations in bulk.
565
566## 3.10.0 (2021-01-21)
567
568- FEATURE: Adds AAD authentication via @azure/identity.
569
570## 3.9.5 (2021-01-18)
571
572- BUGFIX: Throws correct Invalid Continuation Token error when making request with malformed token
573- BUGFIX: Defaults partitionKeyValue to `'[{}]'` when missing in Read/Delete bulk operations
574- BUGFIX: Sums group by operations for cross-partition queries correctly with null values.
575
576## 3.9.3 (2020-10-19)
577
578- BUGFIX: Fixes bulk operations with top level partitionKey values that are undefined or null.
579
580## 3.9.2 (2020-09-16)
581
582- BUGFIX: Fixes slow `userAgent` lookup on azure functions.
583
584## 3.9.1 (2020-08-28)
585
586- BUGFIX: Fixes `OperationInput` type to be more accurate based on `OperationType`.
587- FEATURE: Bulk requests with `Create` operations will now autogenerate IDs if they are not present.
588- FEATURE: The `BulkOperationType` enum now exists and can be used when making bulk requests.
589
590## 3.9.0 (2020-08-13)
591
592- FEATURE: Adds support for autoscale parameters on container and database create methods
593
594Note that `maxThroughput` cannot be passed with `throughput`.
595
596```js
597// correct
598const containerDefinition = {
599 id: "sample container",
600 indexingPolicy: { indexingMode: IndexingMode.consistent },
601 maxThroughput: 500,
602 autoUpgradePolicy: {
603 throughputPolicy: {
604 incrementPercent: 15
605 }
606 }
607};
608database.container.create(containerDefinition)
609
610// incorrect
611const containerDefinition = {
612 id: "sample container",
613 indexingPolicy: { indexingMode: IndexingMode.consistent },
614 throughput: 500, // do not specify throughput with maxThroughput
615 maxThroughput: 500
616 autoUpgradePolicy: {
617 throughputPolicy: {
618 incrementPercent: 15
619 }
620 }
621};
622database.container.create(containerDefinition)
623```
624
625## 3.8.2 (2020-08-12)
626
627- BUGFIX: Fix checkURL function for Node 8
628
629## 3.8.1 (2020-08-12)
630
631- BUGFIX: Adds separate URL module for browser/node.
632
633## 3.8.0 (2020-08-10)
634
635- FEATURE: Throws when initializing ClientContext with an invalid endpoint
636- FEATURE: Changes JSONArray type internal from Array to ArrayLike to avoid requiring type coercion for immutable data
637- 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
638
639```js
640// up to 100 operations
641const operations: OperationInput[] = [
642 {
643 operationType: "Create",
644 resourceBody: { id: "doc1", name: "sample", key: "A" },
645 },
646 {
647 operationType: "Upsert",
648 resourceBody: { id: "doc2", name: "other", key: "A" },
649 },
650 {
651 operationType: "Read",
652 id: "readItemId",
653 partitionKey: "key",
654 },
655];
656
657await database.container.items.bulk(operations);
658```
659
660## 3.7.4 (2020-06-30)
661
662- BUGFIX: Properly escape ASCII "DEL" character in partition key header
663
664## 3.7.3 (2020-06-29)
665
666- BUGFIX: Cannot create item with automatic id generation and a container partitioned on ID (#9734)
667
668## 3.7.2 (2020-06-16)
669
670- BUGFIX: Internal abort signal incorrectly triggered when user passes a custom abort signal. See #9510 for details.
671
672## 3.7.1 (2020-06-12)
673
674- BUGFIX: Typo in globalCrypto.js causing errors in IE browser
675- BUGFIX: Resource tokens not matching for item delete operations (#9110)
676
677## 3.7.0 (2020-06-08)
678
679- BUGFIX: Support crypto functions in Internet Explorer browser
680- BUGFIX: Incorrect key casing in object returned by `setAuthorizationHeader`
681- FEATURE: Adds `readOffer` methods to container and database
682- FEATURE: Allows string value `partitionKey` parameter when creating containers
683
684The following result in the same behavior:
685
686```js
687const containerDefinition = {
688 id: "sample container",
689 indexingPolicy: { indexingMode: IndexingMode.consistent },
690 throughput: 400,
691 partitionKey: { paths: ["/key"] }
692};
693database.container.create(containerDefinition);
694
695// OR as a string
696
697const containerDefinition = {
698 id: "sample container",
699 indexingPolicy: { indexingMode: IndexingMode.consistent },
700 throughput: 400,
701 partitionKey: "/key" } // must have leading slash "/"
702};
703database.container.create(containerDefinition);
704```
705
706## 3.6.3 (2020-04-08)
707
708- FEATURE: Add `partitionKey` to `FeedOptions` for scoping a query to a single partition key value
709
710@azure/cosmos V2 has two different but equivalent ways to specify the partition key for a query:
711
712```js
713// V2 These are effectively the same
714container.items.query("SELECT * from c", { partitionKey: "foo" }).toArray();
715container.items.query('SELECT * from c WHERE c.yourPartitionKey = "foo"').toArray();
716```
717
718In an effort to simplify, the V3 SDK removed `partitionKey` from `FeedOptions` so there was only one way to specify the partition key:
719
720```js
721// V3
722container.items.query('SELECT * from c WHERE c.yourPartitionKey = "foo"').fetchAll();
723```
724
725Based 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.
726
727## 3.6.2 (2020-02-20)
728
729- BUG FIX: Support signing in web workers where this === self
730
731## 3.6.1 (2020-02-11)
732
733- BUG FIX: Normalize location names when selecting endpoint. Allows passing of normalized endpoint names
734
735## 3.6.0 (2020-02-10)
736
737- FEATURE: Add support for spatial indexing, bounding boxes, and geospatial configuration
738- BUG FIX: Fix bug when passing forceQueryPlan to QueryIterator for non-item resources (#7333)
739
740## 3.5.4 (2020-01-28)
741
742- BUG FIX: Return parsed number instead of string for request charge
743
744## 3.5.3 (2020-01-06)
745
746- BUG FIX: maxDegreeOfParallelism was defaulting to 1 and should default to the number of partitions of the collection
747- BUG FIX: maxItemCount was defaulting to 10 and should default to undefined
748- Set default TLS version to 1.2 (#6761)
749- Use tslib 1.10.0 (#6710)
750- Add partition key to code sample (#6612)
751
752## 3.5.2 (2019-12-03)
753
754- Fix handling of special characters in item ids when signing tokens in the browser (#6379)
755
756## 3.5.1 (2019-11-25)
757
758- Fix bug when paginating GROUP BY queries or using in conjunction with TOP/OFFSET/LIMIT (#6003)
759- Improve error message for mixed type ORDER BY (#6306)
760
761## 3.5.0 (2019-11-21)
762
763- 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)
764- Makes changeFeed and query options optional. Fix #6232 Fix #6277 (#6273)
765
766## 3.4.2 (2019-11-07)
767
768- Fixes bug where the query may throw a 410 error during a split operation. Instead, throw 503 (#6074)
769
770## 3.4.1 (2019-11-05)
771
772- Fix region drop failover scenario and add test (#5892)
773
774## 3.4.0 (2019-10-28)
775
776- FEATURE: GROUP BY query support (#5749)
777- Update proxy-agent. Remove types folder (#5854)
778- Typo: Fix "an" vs "a" (#5812)
779- Update to Mocha 6.2.2 (#5824)
780- Remove unused Range type (#5686)
781- Remove universal-user-agent (#5869)
782
783## 3.3.4 (2019-10-14)
784
785- Query bug fix. Empty result last call not reporting proper RUs (#5517)
786- Sign headers using internal package (#5523)
787- Use internal digest function instead of crypto-hash package (#5493)
788- Remove internal binary-search-bounds package (#5417)
789- Fix atob bug impacting browser users (#5375)
790
791## 3.3.2 (2019-10-03)
792
793- Export TokenProvider and RequestInfo types (#5262)
794- Remove atob package in favor of local version (#5334)
795- Fix incorrect lib version in UserAgent (#5295)
796- Allow zero for Item TTL (#5257)
797
798## 3.3.0 (2019-09-24)
799
800- FEATURE: Add userAgentSuffix to CosmosClient constructor options (#5068)
801- Guard process.env to fix webpack issues (#5223)
802- Fixes bug where initial QueryIterator promise was not being created (#5215)
803- Fix aggregates bug when query was returning no results (#5184)
804- sideEffects field set to false (#5022)
805
806## 3.2.0 (2019-08-26)
807
808- FEATURE: Endpoint resolution now blocks until initialized (#409)
809- FEATURE: Add bufferItems support & other cross-partition perf improvements (#397)
810- Fix missing AbortSignal type for users not targeting the DOM (#416)
811- Add sample for bulk update with continuation token (#402)
812- Export default partition key path (#405)
813
814## 3.1.1 (2019-08-07)
815
816- Fix bug where offset limit iterator was being called for each item under the offset count (#398)
817- Add retry on EPIPE error (#400)
818
819## 3.1.0 (2019-07-26)
820
821- FEATURE: Set default ResponseContinuationTokenLimitInKB to 1kb. Prevents header limit errors (#384)
822- Remove unused disableSSLVerification options (#388)
823
824## 3.0.4 (2019-07-22)
825
826- Allow initialHeaders to explicitly set partition key header (#383)
827- Use package.json#files to prevent extraneous files from being pubished (#382)
828- Fix for routing map sort error on older version of node+v8 (#378)
829- Fixes bug when user supplies partial retry options. Close #377 (#379)
830- README updates (#374)
831
832## 3.0.3 (2019-07-17)
833
834- Fix webpack usage. Prevent resolving modules called with `require` (#373)
835- Various internal API cleanups and sample fixes
836
837## 3.0.2 (2019-07-09)
838
839Fixes a long outstanding bug where RUs were always being reported as 0 for aggregate queries (#366)
840
841## 3.0.1 (2019-07-02)
842
843Fixes 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)
844
845## 3.0.0 (2019-06-28)
846
847🎉 v3 release! 🎉 Many new features, bug fixes, and a few breaking changes. Primary goals of this release:
848
849- Implement major new features:
850 - DISTINCT queries
851 - LIMIT/OFFSET queries
852 - User cancelable requests
853- 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)
854- Make it easier to use Cosmos from the browser
855- Better align with the new [Azure JS SDK guidlines](https://azure.github.io/azure-sdk/typescript_introduction.html)
856
857### Migration Guide for Breaking Changes
858
859#### Improved Client Constructor Options (#246)
860
861Constructor options have been simplified:
862
863- `masterKey` was renamed `key` and moved to the top-level
864- Properties previously under `options.auth` have moved to the top-level
865
866```js
867// v2
868const client = new CosmosClient({
869 endpoint: "https://your-database.cosmos.azure.com",
870 auth: {
871 masterKey: "your-primary-key",
872 },
873});
874
875// v3
876const client = new CosmosClient({
877 endpoint: "https://your-database.cosmos.azure.com",
878 key: "your-primary-key",
879});
880```
881
882#### Simplified QueryIterator API (#238 #316)
883
884In 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:
885
886- Remove iterator.next() and iterator.current(). Use fetchNext() to get pages of results.
887- Remove iterator.forEach(). Use async iterators instead.
888- iterator.executeNext() renamed to iterator.fetchNext()
889- iterator.toArray() renamed to iterator.fetchAll()
890- Pages are now proper `Response` objects intead of plain JS objects
891
892```js
893const container = client.database(dbId).container(containerId)
894
895// v2
896container.items.query('SELECT * from c').toArray()
897container.items.query('SELECT * from c').executeNext()
898container.items.query('SELECT * from c').forEach(({ body: item }) => { console.log(item.id) })
899
900// v3
901container.items.query('SELECT * from c').fetchAll()
902container.items.query('SELECT * from c').fetchNext()
903for await(const { result: item } in client.databases.readAll().getAsyncIterator()) {
904 console.log(item.id)
905}
906```
907
908#### Simplified Partition Keys for Queries
909
910v2 has two different but equivalent ways to specify the partition key for a query:
911
912```js
913// v2. These are effectively the same
914container.items.query("SELECT * from c", { partitionKey: "foo" }).toArray();
915container.items.query('SELECT * from c WHERE c.yourPartitionKey = "foo"').toArray();
916```
917
918v3 removed `partitionKey` from `FeedOptions` so there is now only one way to specify the partition key:
919
920```js
921// v3
922container.items.query('SELECT * from c WHERE c.yourPartitionKey = "foo"').fetchAll();
923```
924
925#### Fixed Containers are now Paritioned (#308)
926
927[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.
928
929#### `upsert` removed for Stored Procedures (#356)
930
931Previously `upsert` was allowed for non-partitioned collections, but with the API version update, all collections are partitioned so we removed it entirely.
932
933#### Item reads will not throw on 404 (#343, Community Request)
934
935```js
936const container = client.database(dbId).container(containerId);
937
938// v2
939try {
940 container.items.read(id, undefined);
941} catch (e) {
942 if (e.code === 404) {
943 console.log("item not found");
944 }
945}
946
947// v3
948const { result: item } = container.items.read(id, undefined);
949if (item === undefined) {
950 console.log("item not found");
951}
952```
953
954#### Default Multi Region Write (#335)
955
956The SDK will now write to multiple regions by default if your database configuration supports it. This was previously opt-in behavior.
957
958#### Proper Error Objects (#334, Community Request)
959
960Failed requests now throw proper `Error` or subclasses of `Error`. Previously they threw plain JS objects.
961
962### New Features
963
964#### User Cancellable Requests (#263, Community Request)
965
966The 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)
967
968```js
969const controller = new AbortController();
970const { result: item } = await items.query("SELECT * from c", { abortSignal: controller.signal });
971controller.abort();
972```
973
974#### Set throughput as part of db/container create operation (#220)
975
976```js
977const { database } = client.databases.create({ id: "my-database", throughput: 10000 });
978database.containers.create({ id: "my-container", throughput: 10000 });
979```
980
981#### @azure/cosmos-sign (#213)
982
983Header 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.
984
985#### UUID for generated IDs (#355)
986
987v2 had custom code to generate item IDs. We have switched to the well known and maintained community library `uuid`.
988
989#### Connection Strings (#350, Community Request)
990
991It is now possible to pass a connection string copied from the Azure portal:
992
993```js
994const client = new CosmosClient(
995 "AccountEndpoint=https://test-account.documents.azure.com:443/;AccountKey=<KEY HERE>;",
996);
997```
998
999#### Add DISTINCT and LIMIT/OFFSET queries (#306)
1000
1001```js
1002const { results } = await items.query("SELECT DISTINCT VALUE r.name FROM ROOT").fetchAll();
1003const { results } = await items.query("SELECT * FROM root r OFFSET 1 LIMIT 2").fetchAll();
1004```
1005
1006### Improved Browser Experience
1007
1008While 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.
1009
1010- Replace request internals with `fetch` (#245)
1011- Remove usage of Buffer (#330)
1012- Remove node builtin usage in favor of universal packages/APIs (#328)
1013- Switch to node-abort-controller (#294)
1014
1015### Bug Fixes
1016
1017- Fix offer read and bring back offer tests (#224)
1018- Fix EnableEndpointDiscovery (#207)
1019- Fix missing RUs on paginated results (#360)
1020- Expand SQL query parameter type (#346)
1021- Add ttl to ItemDefinition (#341)
1022- Fix CP query metrics (#311)
1023- Add activityId to FeedResponse (#293)
1024- Switch \_ts type from string to number (#252)(#295)
1025- Fix Request Charge Aggregation (#289)
1026- Allow blank string partition keys (#277)
1027- Add string to conflict query type (#237)
1028- Add uniqueKeyPolicy to container (#234)
1029
1030### Engineering Systems
1031
1032Not always the most visible changes, but they help our team ship better code, faster.
1033
1034- Use rollup for production builds (#104)
1035- Update to Typescript 3.5 (#327)
1036- Convert to TS project references. Extract test folder (#270)
1037- Enable noUnusedLocals and noUnusedParameters (#275)
1038- Azure Pipelines YAML for CI builds (#298)
1039
1040## 2.0.1 (2018-09-25)
1041
1042- Fix type issue (See #141)
1043
1044## 2.0.0 (2018-09-24)
1045
1046- Multi-region Write support
1047- Shared resource response properties added to responses
1048- Changed query to allow for customer types for all Resource types
1049- Modified items.query to allow for cross partition query
1050- Misc fixes/doc updates
1051
1052## 2.0.0-3 (2018-08-02)
1053
1054- New object model
1055- Updated documentation and samples
1056- Improved types
1057- Added `createdIfNotExists` for database and container
1058- Added prettier
1059- Added public CI (Travis and VSTS)
1060
1061## 2.0.0-0 (2018-08-01)
1062
1063- Added Promise support
1064- Added token handler option for auth
1065- typings now emitted from source (moved source to TypeScript)
1066- Added CosmosClient (DocumentClient now considered deprecated)
1067
1068## 1.14.4 (2018-05-03)
1069
1070- npm documentation fixed.
1071
1072## 1.14.3 (2018-05-03)
1073
1074- Added support for default retries on connection issues.
1075- Added support to read collection change feed.
1076- Fixed session consistency bug that intermittently caused "read session not available".
1077- Added support for query metrics.
1078- Modified http Agent's maximum number of connections.
1079
1080## 1.14.2 (2017-12-21)
1081
1082- Updated documentation to use Azure Cosmos DB.
1083- Added Support for proxyUrl setting in ConnectionPolicy.
1084
1085## 1.14.1 (2017-11-10)
1086
1087- Minor fix for case sensitive file systems.
1088
1089## 1.14.0 (2017-11-09)
1090
1091- Adds support for Session Consistency.
1092- This SDK version requires the latest version of Azure Cosmos DB Emulator available for download from https://aka.ms/cosmosdb-emulator.
1093
1094## 1.13.0 (2017-10-11)
1095
1096- Splitproofed cross partition queries.
1097- Adds supports for resource link with leading and trailing slashes (and corresponding tests).
1098
1099## 1.12.2 (2017-08-10)
1100
1101- npm documentation fixed.
1102
1103## 1.12.1 (2017-08-10)
1104
1105- Fixed bug in executeStoredProcedure where documents involved had special unicode characters (LS, PS).
1106- Fixed bug in handling documents with unicode characters in partition key.
1107- Fixed support for creating collection with name media (github #114).
1108- Fixed support for permission authorization token (github #178).
1109
1110## 1.12.0 (2017-05-10)
1111
1112- Added support for Request Unit per Minute (RU/m) feature.
1113- Added support for a new consistency level called ConsistentPrefix.
1114- Added support for UriFactory.
1115- Fixed the unicode support bug (github #171)
1116
1117## 1.11.0 (2017-03-16)
1118
1119- Added the support for aggregation queries (COUNT, MIN, MAX, SUM, and AVG).
1120- Added the option for controlling degree of parallelism for cross partition queries.
1121- Added the option for disabling SSL verification when running against Emulator.
1122- Lowered minimum throughput on partitioned collections from 10,100 RU/s to 2500 RU/s.
1123- Fixed the continuation token bug for single partition collection (github #107).
1124- Fixed the executeStoredProcedure bug in handling 0 as single param (github #155).
1125
1126## 1.10.2 (2017-01-27)
1127
1128- Fixed user-agent header to include the SDK version.
1129- Minor code cleanup.
1130
1131## 1.10.1 (2016-12-22)
1132
1133- Disabling SSL verification when using the SDK to target the emulator(hostname=localhost).
1134- Added support for enabling script logging during stored procedure execution.
1135
1136## 1.10.0 (2016-10-03)
1137
1138- Added support for cross partition parallel queries.
1139- Added support for TOP/ORDER BY queries for partitioned collections.
1140
1141## 1.9.0 (2016-07-07)
1142
1143- Added retry policy support for throttled requests. (Throttled requests receive a request rate too large exception, error code 429.)
1144 By default, DocumentClient retries nine times for each request when error code 429 is encountered, honoring the retryAfter time in the response header.
1145 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.
1146 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.
1147 This time can also be overriden in the RetryOptions property on ConnectionPolicy object.
1148
1149- 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.
1150
1151- 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.
1152
1153## 1.8.0 (2016-06-14)
1154
1155- Added the support for geo-replicated database accounts.
1156
1157## 1.7.0 (2016-04-26)
1158
1159- Added the support for TimeToLive(TTL) feature for documents.
1160
1161## 1.6.0 (2016-03-29)
1162
1163- Added support for Partitioned Collections.
1164- Added support for new offer types.
1165
1166## 1.5.6 (2016-03-08)
1167
1168- Fixed RangePartitionResolver.resolveForRead bug where it was not returning links due to a bad concat of results.
1169- Move compareFunction from Range class to RangePartitionResolver class.
1170
1171## 1.5.5 (2016-02-02)
1172
1173- Fixed hashParitionResolver resolveForRead(): When no partition key supplied was throwing exception, instead of returning a list of all registered links.
1174
1175## 1.5.4 (2016-02-01)
1176
1177- Dedicated HTTPS Agent: Avoid modifying the global. Use a dedicated agent for all of the lib’s requests.
1178
1179## 1.5.3 (2016-01-26)
1180
1181- Properly handle dashes in the mediaIds.
1182
1183## 1.5.2 (2016-01-22)
1184
1185- Fix memory leak.
1186
1187## 1.5.1 (2016-01-04)
1188
1189- Renamed "Hash" directory to "hash".
1190
1191## 1.5.0 (2015-12-31)
1192
1193- Added client-side sharding support.
1194- Added hash partition resolver implementation.
1195- Added range partitoin resolver implementation.
1196
1197## 1.4.0 (2015-10-06)
1198
1199- Implement Upsert. New upsertXXX methods on documentClient.
1200
1201## 1.3.0 (2015-10-06)
1202
1203- Skipped to bring version numbers in alignment with other SDKs.
1204
1205## 1.2.2 (2015-09-10)
1206
1207- Split Q promises wrapper to new repository.
1208- Update to package file for npm registry.
1209
1210## 1.2.1 (2015-08-15)
1211
1212- Implements ID Based Routing.
1213- Fixes Issue [#49](https://github.com/Azure/azure-documentdb-node/issues/49) - current property conflicts with method current().
1214
1215## 1.2.0 (2015-08-05)
1216
1217- Added support for GeoSpatial index.
1218- Validates id property for all resources. Ids for resources cannot contain ?, /, #, \\, characters or end with a space.
1219- Adds new header "index transformation progress" to ResourceResponse.
1220
1221## 1.1.0 (2015-07-09)
1222
1223- Implements V2 indexing policy.
1224
1225## 1.0.3 (2015-06-04)
1226
1227- Issue [#40](https://github.com/Azure/azure-documentdb-node/issues/40) - Implemented eslint and grunt configurations in the core and promise SDK.
1228
1229## 1.0.2 (2015-05-23)
1230
1231- Issue [#45](https://github.com/Azure/azure-documentdb-node/issues/45) - Promises wrapper does not include header with error.
1232
1233## 1.0.1 (2015-05-15)
1234
1235- Implemented ability to query for conflicts by adding readConflicts, readConflictAsync, queryConflicts.
1236- Updated API documentation.
1237- Issue [#41](https://github.com/Azure/azure-documentdb-node/issues/41) - client.createDocumentAsync error.
1238
1239Microsoft will provide notification at least **12 months** in advance of retiring an SDK in order to smooth the transition to a newer/supported version.
1240
1241New 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.
1242
1243Any request to Cosmos DB using a retired SDK will be rejected by the service.
1244
1245> [!WARNING]
1246> All versions **1.x** of the Cosmos JavaScript SDK for SQL API will be retired on **August 30, 2020**.
1247>
1248> <br/>
1249
1250| Version | Release Date | Retirement Date |
1251| ------------------------ | ------------------ | --------------- |
1252| [3.4.2](#3.4.2) | November 7, 2019 | --- |
1253| [3.4.1](#3.4.1) | November 5, 2019 | --- |
1254| [3.4.0](#3.4.0) | October 28, 2019 | --- |
1255| [3.3.6](#3.3.6) | October 14, 2019 | --- |
1256| [3.3.5](#3.3.5) | October 14, 2019 | --- |
1257| [3.3.4](#3.3.4) | October 14, 2019 | --- |
1258| [3.3.3](#3.3.3) | October 3, 2019 | --- |
1259| [3.3.2](#3.3.2) | October 3, 2019 | --- |
1260| [3.3.1](#3.3.1) | October 1, 2019 | --- |
1261| [3.3.0](#3.3.0) | September 24, 2019 | --- |
1262| [3.2.0](#3.2.0) | August 26, 2019 | --- |
1263| [3.1.1](#3.1.1) | August 7, 2019 | --- |
1264| [3.1.0](#3.1.0) | July 26, 2019 | --- |
1265| [3.0.4](#3.0.4) | July 22, 2019 | --- |
1266| [3.0.3](#3.0.3) | July 17, 2019 | --- |
1267| [3.0.2](#3.0.2) | July 9, 2019 | --- |
1268| [3.0.0](#3.0.0) | June 28, 2019 | --- |
1269| [2.1.5](#2.1.5) | March 20, 2019 | --- |
1270| [2.1.4](#2.1.4) | March 15, 2019 | --- |
1271| [2.1.3](#2.1.3) | March 8, 2019 | --- |
1272| [2.1.2](#2.1.2) | January 28, 2019 | --- |
1273| [2.1.1](#2.1.1) | December 5, 2018 | --- |
1274| [2.1.0](#2.1.0) | December 4, 2018 | --- |
1275| [2.0.5](#2.0.5) | November 7, 2018 | --- |
1276| [2.0.4](#2.0.4) | October 30, 2018 | --- |
1277| [2.0.3](#2.0.3) | October 30, 2018 | --- |
1278| [2.0.2](#2.0.2) | October 10, 2018 | --- |
1279| [2.0.1](#2.0.1) | September 25, 2018 | --- |
1280| [2.0.0](#2.0.0) | September 24, 2018 | --- |
1281| [2.0.0-3 (RC)](#2.0.0-3) | August 2, 2018 | --- |
1282| [1.14.4](#1.14.4) | May 03, 2018 | August 30, 2020 |
1283| [1.14.3](#1.14.3) | May 03, 2018 | August 30, 2020 |
1284| [1.14.2](#1.14.2) | December 21, 2017 | August 30, 2020 |
1285| [1.14.1](#1.14.1) | November 10, 2017 | August 30, 2020 |
1286| [1.14.0](#1.14.0) | November 9, 2017 | August 30, 2020 |
1287| [1.13.0](#1.13.0) | October 11, 2017 | August 30, 2020 |
1288| [1.12.2](#1.12.2) | August 10, 2017 | August 30, 2020 |
1289| [1.12.1](#1.12.1) | August 10, 2017 | August 30, 2020 |
1290| [1.12.0](#1.12.0) | May 10, 2017 | August 30, 2020 |
1291| [1.11.0](#1.11.0) | March 16, 2017 | August 30, 2020 |
1292| [1.10.2](#1.10.2) | January 27, 2017 | August 30, 2020 |
1293| [1.10.1](#1.10.1) | December 22, 2016 | August 30, 2020 |
1294| [1.10.0](#1.10.0) | October 03, 2016 | August 30, 2020 |
1295| [1.9.0](#1.9.0) | July 07, 2016 | August 30, 2020 |
1296| [1.8.0](#1.8.0) | June 14, 2016 | August 30, 2020 |
1297| [1.7.0](#1.7.0) | April 26, 2016 | August 30, 2020 |
1298| [1.6.0](#1.6.0) | March 29, 2016 | August 30, 2020 |
1299| [1.5.6](#1.5.6) | March 08, 2016 | August 30, 2020 |
1300| [1.5.5](#1.5.5) | February 02, 2016 | August 30, 2020 |
1301| [1.5.4](#1.5.4) | February 01, 2016 | August 30, 2020 |
1302| [1.5.3](#1.5.2) | January 26, 2016 | August 30, 2020 |
1303| [1.5.2](#1.5.2) | January 22, 2016 | August 30, 2020 |
1304| [1.5.1](#1.5.1) | January 4, 2016 | August 30, 2020 |
1305| [1.5.0](#1.5.0) | December 31, 2015 | August 30, 2020 |
1306| [1.4.0](#1.4.0) | October 06, 2015 | August 30, 2020 |
1307| [1.3.0](#1.3.0) | October 06, 2015 | August 30, 2020 |
1308| [1.2.2](#1.2.2) | September 10, 2015 | August 30, 2020 |
1309| [1.2.1](#1.2.1) | August 15, 2015 | August 30, 2020 |
1310| [1.2.0](#1.2.0) | August 05, 2015 | August 30, 2020 |
1311| [1.1.0](#1.1.0) | July 09, 2015 | August 30, 2020 |
1312| [1.0.3](#1.0.3) | June 04, 2015 | August 30, 2020 |
1313| [1.0.2](#1.0.2) | May 23, 2015 | August 30, 2020 |
1314| [1.0.1](#1.0.1) | May 15, 2015 | August 30, 2020 |
1315| [1.0.0](#1.0.0) | April 08, 2015 | August 30, 2020 |