From c360bf9b0274e01d660e01a445b47396527aaf59 Mon Sep 17 00:00:00 2001 From: Zach foster Date: Wed, 16 Sep 2020 14:07:06 -0400 Subject: [PATCH 1/4] Switches back to universal-user-agent --- common/config/rush/pnpm-lock.yaml | 156 +++++------------- sdk/cosmosdb/cosmos/package.json | 2 +- sdk/cosmosdb/cosmos/rollup.config.js | 2 + sdk/cosmosdb/cosmos/src/common/platform.ts | 2 +- .../cosmos/src/utils/user-agent.browser.ts | 6 - sdk/cosmosdb/cosmos/src/utils/user-agent.ts | 16 -- 6 files changed, 44 insertions(+), 140 deletions(-) delete mode 100644 sdk/cosmosdb/cosmos/src/utils/user-agent.browser.ts delete mode 100644 sdk/cosmosdb/cosmos/src/utils/user-agent.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 9ada45e415c2..0b425bc4d9bb 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -46,8 +46,6 @@ dependencies: '@rush-temp/test-utils-perfstress': 'file:projects/test-utils-perfstress.tgz' '@rush-temp/test-utils-recorder': 'file:projects/test-utils-recorder.tgz' '@rush-temp/testhub': 'file:projects/testhub.tgz' - precise-commits: 1.0.2_prettier@1.19.1 - prettier: 1.19.1 lockfileVersion: 5.1 packages: /@azure/abort-controller/1.0.1: @@ -1836,14 +1834,6 @@ packages: dev: false resolution: integrity: sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== - /cli-cursor/2.1.0: - dependencies: - restore-cursor: 2.0.0 - dev: false - engines: - node: '>=4' - resolution: - integrity: sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= /cli-cursor/3.1.0: dependencies: restore-cursor: 3.1.0 @@ -1852,12 +1842,6 @@ packages: node: '>=8' resolution: integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== - /cli-spinners/1.3.1: - dev: false - engines: - node: '>=4' - resolution: - integrity: sha512-1QL4544moEsDVH9T/l6Cemov/37iv1RtoKf7NJ04A60+4MREXNfx/QvavbH6QoGdsD4N4Mwy49cmaINR/o2mdg== /cli-width/3.0.0: dev: false engines: @@ -2091,14 +2075,6 @@ packages: dev: false resolution: integrity: sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE= - /cross-spawn/5.1.0: - dependencies: - lru-cache: 4.1.5 - shebang-command: 1.2.0 - which: 1.3.1 - dev: false - resolution: - integrity: sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= /cross-spawn/6.0.5: dependencies: nice-try: 1.0.5 @@ -2324,10 +2300,6 @@ packages: dev: false resolution: integrity: sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw= - /diff-match-patch/1.0.5: - dev: false - resolution: - integrity: sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw== /diff/3.5.0: dev: false engines: @@ -2881,20 +2853,6 @@ packages: node: '>=0.8.x' resolution: integrity: sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg== - /execa/0.9.0: - dependencies: - cross-spawn: 5.1.0 - get-stream: 3.0.0 - is-stream: 1.1.0 - npm-run-path: 2.0.2 - p-finally: 1.0.0 - signal-exit: 3.0.3 - strip-eof: 1.0.0 - dev: false - engines: - node: '>=4' - resolution: - integrity: sha512-BbUMBiX4hqiHZUA5+JujIjNb6TyAlp2D5KLheMjMluwOuzcnylDL4AxZYLLn1n2AGB49eSWwyKvvEQoRpnAtmA== /execa/1.0.0: dependencies: cross-spawn: 6.0.5 @@ -3387,12 +3345,6 @@ packages: node: '>=4' resolution: integrity: sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== - /get-stream/3.0.0: - dev: false - engines: - node: '>=4' - resolution: - integrity: sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= /get-stream/4.1.0: dependencies: pump: 3.0.0 @@ -3820,10 +3772,6 @@ packages: dev: false resolution: integrity: sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== - /ignore/3.3.10: - dev: false - resolution: - integrity: sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug== /ignore/4.0.6: dev: false engines: @@ -5050,12 +4998,6 @@ packages: hasBin: true resolution: integrity: sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA== - /mimic-fn/1.2.0: - dev: false - engines: - node: '>=4' - resolution: - integrity: sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== /mimic-fn/2.1.0: dev: false engines: @@ -5169,12 +5111,6 @@ packages: dev: false resolution: integrity: sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ== - /mri/1.1.6: - dev: false - engines: - node: '>=4' - resolution: - integrity: sha512-oi1b3MfbyGa7FJMP9GmLTttni5JoICpYBRlq+x5V16fZbLsnL9N3wFqqIm/nIG43FjUFkFh9Epzp/kzUGUnJxQ== /ms/2.0.0: dev: false resolution: @@ -5482,14 +5418,6 @@ packages: dev: false resolution: integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - /onetime/2.0.1: - dependencies: - mimic-fn: 1.2.0 - dev: false - engines: - node: '>=4' - resolution: - integrity: sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= /onetime/5.1.0: dependencies: mimic-fn: 2.1.0 @@ -5520,17 +5448,6 @@ packages: node: '>= 0.8.0' resolution: integrity: sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== - /ora/1.4.0: - dependencies: - chalk: 2.4.2 - cli-cursor: 2.1.0 - cli-spinners: 1.3.1 - log-symbols: 2.2.0 - dev: false - engines: - node: '>=4' - resolution: - integrity: sha512-iMK1DOQxzzh2MBlVsU42G80mnrvUhqsMh74phHtDlrcTZPK0pH6o7l7DRshK+0YsxDyEuaOkziVdvM3T0QTzpw== /os-homedir/1.0.2: dev: false engines: @@ -5893,22 +5810,6 @@ packages: hasBin: true resolution: integrity: sha512-GV+nsUXuPW2p8Zy7SarF/2W/oiK8bFQgJcncoJ0d7kRpekEA0ftChjfEaF9/Y+QJEc/wFR7RAEa8lYByuUIe2g== - /precise-commits/1.0.2_prettier@1.19.1: - dependencies: - diff-match-patch: 1.0.5 - execa: 0.9.0 - find-up: 2.1.0 - glob: 7.1.6 - ignore: 3.3.10 - mri: 1.1.6 - ora: 1.4.0 - prettier: 1.19.1 - dev: false - hasBin: true - peerDependencies: - prettier: '>=1.8.0' - resolution: - integrity: sha512-PYkoNTFXVvZRzJTDxdgzmPanhSNGj5Wtj2NgSo7IhwNXGcKktX+L4DJhyIrhFSLsWWAvd+cYyyU2eXlaX5QxzA== /prelude-ls/1.1.2: dev: false engines: @@ -6410,15 +6311,6 @@ packages: dev: false resolution: integrity: sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA== - /restore-cursor/2.0.0: - dependencies: - onetime: 2.0.1 - signal-exit: 3.0.3 - dev: false - engines: - node: '>=4' - resolution: - integrity: sha1-n37ih/gv0ybU/RYpI9YhKe7g368= /restore-cursor/3.1.0: dependencies: onetime: 5.1.0 @@ -7628,6 +7520,10 @@ packages: dev: false resolution: integrity: sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI= + /universal-user-agent/6.0.0: + dev: false + resolution: + integrity: sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== /universalify/0.1.2: dev: false engines: @@ -8328,6 +8224,8 @@ packages: '@types/mocha': 7.0.2 '@types/node': 8.10.61 '@types/sinon': 9.0.4 + '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 + '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 assert: 1.5.0 chai: 4.2.0 cross-env: 7.0.2 @@ -8367,7 +8265,7 @@ packages: dev: false name: '@rush-temp/app-configuration' resolution: - integrity: sha512-Dvua3Tobr3ppJqmYiEfDhOBd69Mz2RrONLDEz1//uL/FXNdxSuaZuMRrrD5Xhdfk2GnChivKp9jt+luKCfA/1A== + integrity: sha512-o3zyWd0p+Th710h7qEQs8+0UstbL9Vf+kgUNP5amLJDfYh2qfzVA0msroRHAhaM0sRO7BDGXfpkFnU/GUa9PPw== tarball: 'file:projects/app-configuration.tgz' version: 0.0.0 'file:projects/core-amqp.tgz': @@ -8933,11 +8831,12 @@ packages: tslint-config-prettier: 1.18.0 typedoc: 0.15.8 typescript: 3.9.6 + universal-user-agent: 6.0.0 uuid: 8.2.0 dev: false name: '@rush-temp/cosmos' resolution: - integrity: sha512-lpTdhiEWZ/QNiArY5mrQLIdd/KjmBl/Xn71juX1PtSQ5cziny1tfnRIcSjyLUq3aTlPAYhs9XjI6ixFrknYVOA== + integrity: sha512-n2thQR98RdP6LVfeW9NbiW787UK+JJjZEe7JbgMqbrehiMCBynmPkEY38rgYhlklxwpQDPS8nUir1NFNZlx/fQ== tarball: 'file:projects/cosmos.tgz' version: 0.0.0 'file:projects/data-tables.tgz': @@ -9437,6 +9336,7 @@ packages: 'file:projects/keyvault-admin.tgz': dependencies: '@azure/core-tracing': 1.0.0-preview.9 + '@azure/identity': 1.1.0 '@microsoft/api-extractor': 7.7.11 '@opentelemetry/api': 0.10.2 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 @@ -9444,16 +9344,40 @@ packages: '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 '@rollup/plugin-node-resolve': 8.1.0_rollup@1.32.1 '@rollup/plugin-replace': 2.3.3_rollup@1.32.1 + '@types/chai': 4.2.11 + '@types/fs-extra': 8.1.1 + '@types/mocha': 7.0.2 '@types/node': 8.10.61 + '@types/sinon': 9.0.4 + '@types/uuid': 8.0.0 '@typescript-eslint/eslint-plugin': 2.34.0_3787943315ebc5ea524d5c102dc9e452 '@typescript-eslint/parser': 2.34.0_eslint@6.8.0+typescript@3.9.6 + assert: 1.5.0 + chai: 4.2.0 cross-env: 7.0.2 + dotenv: 8.2.0 eslint: 6.8.0 eslint-config-prettier: 6.11.0_eslint@6.8.0 eslint-plugin-no-null: 1.0.2_eslint@6.8.0 eslint-plugin-no-only-tests: 2.4.0 eslint-plugin-promise: 4.2.1 esm: 3.2.25 + karma: 5.1.1 + karma-chrome-launcher: 3.1.0 + karma-coverage: 2.0.2 + karma-edge-launcher: 0.4.2_karma@5.1.1 + karma-env-preprocessor: 0.1.1 + karma-firefox-launcher: 1.3.0 + karma-ie-launcher: 1.0.0_karma@5.1.1 + karma-json-preprocessor: 0.3.3_karma@5.1.1 + karma-json-to-file-reporter: 1.0.1 + karma-junit-reporter: 2.0.1_karma@5.1.1 + karma-mocha: 2.0.1 + karma-mocha-reporter: 2.2.5_karma@5.1.1 + karma-remap-istanbul: 0.6.0_karma@5.1.1 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 + nyc: 14.1.1 prettier: 1.19.1 rimraf: 3.0.2 rollup: 1.32.1 @@ -9461,13 +9385,15 @@ packages: rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.0_rollup@1.32.1 rollup-plugin-visualizer: 4.0.4_rollup@1.32.1 + sinon: 9.0.2 source-map-support: 0.5.19 tslib: 2.0.0 typescript: 3.9.6 + uuid: 8.2.0 dev: false name: '@rush-temp/keyvault-admin' resolution: - integrity: sha512-eJjxCTqMLb7tC0iSwnDg/sXQpv/89fgdgtuMTfFMnx7nM+30n/L8qTwXhBQs87UucOKDQI3qSw8DD74fs7xGvg== + integrity: sha512-6f8De+04Tlf3rZOc/1Thy6H7qGD6/5rcn0fH9FPXudEe+Vbr7Vx3f4HhsnUDy9vnVrvyNWfFyiCJoGT0drXpow== tarball: 'file:projects/keyvault-admin.tgz' version: 0.0.0 'file:projects/keyvault-certificates.tgz': @@ -9533,7 +9459,7 @@ packages: dev: false name: '@rush-temp/keyvault-certificates' resolution: - integrity: sha512-+a86qI+0rcf+xiFjB3H4JH6htEoBP+JJvVNmoNtfcLRh4F//9PBzFxOoS0NKutNsdw6Qexlv9lF0zJhj2E9uAA== + integrity: sha512-yDAV8Si946hzwpcxzkApINOt1n/qEu1IntnvPqMCOrEqbov++DRkg3H4SjGDe7IZKF4kGV2lweazuvBH6w7uKA== tarball: 'file:projects/keyvault-certificates.tgz' version: 0.0.0 'file:projects/keyvault-common.tgz': @@ -10018,7 +9944,7 @@ packages: dev: false name: '@rush-temp/service-bus' resolution: - integrity: sha512-51d4bYHeIAsk9snkfMhwDBa/SdL8xqrjc7MKV2+KuP2Iz+O8XQIupoJG4t64tyM//8CoK0nxSSb+X2te8esCew== + integrity: sha512-yUNItoZnv5e6MhbT7s5BEKkJ/aXAn+He9qxRb6hEQjnweh3vpR4YxsRzTNnAYrAxcnlksrx0OpGjL3/gsI3Olw== tarball: 'file:projects/service-bus.tgz' version: 0.0.0 'file:projects/storage-blob-changefeed.tgz': @@ -10211,7 +10137,7 @@ packages: dev: false name: '@rush-temp/storage-file-datalake' resolution: - integrity: sha512-RKgkJyMJreDqQYe/7tXpmVB+4OeAlRMXWFIbH8eWeMzEa156MjEy8G46v07aF/6vgsJfKxTDNWz7ZOZM7k6Qqg== + integrity: sha512-T5+VpauSuj3fPBJ7jLMk3qgnFVihSVQjcABp/XHalvOBJWV9RbLpNBNyHKhheJumjvLHFVWBcZQ63xUF46Ag6w== tarball: 'file:projects/storage-file-datalake.tgz' version: 0.0.0 'file:projects/storage-file-share.tgz': @@ -10609,5 +10535,3 @@ specifiers: '@rush-temp/test-utils-perfstress': 'file:./projects/test-utils-perfstress.tgz' '@rush-temp/test-utils-recorder': 'file:./projects/test-utils-recorder.tgz' '@rush-temp/testhub': 'file:./projects/testhub.tgz' - precise-commits: ^1.0.2 - prettier: ^1.16.4 diff --git a/sdk/cosmosdb/cosmos/package.json b/sdk/cosmosdb/cosmos/package.json index ce9ac006e0bc..d9d157c04f5f 100644 --- a/sdk/cosmosdb/cosmos/package.json +++ b/sdk/cosmosdb/cosmos/package.json @@ -22,7 +22,6 @@ "./dist-esm/utils/atob.js": "./dist-esm/utils/atob.browser.js", "./dist-esm/utils/digest.js": "./dist-esm/utils/digest.browser.js", "./dist-esm/utils/hmac.js": "./dist-esm/utils/hmac.browser.js", - "./dist-esm/utils/user-agent.js": "./dist-esm/utils/user-agent.browser.js", "./dist-esm/utils/url.js": "./dist-esm/utils/url.browser.js" }, "files": [ @@ -92,6 +91,7 @@ "priorityqueuejs": "^1.0.0", "semaphore": "^1.0.5", "tslib": "^2.0.0", + "universal-user-agent": "^6.0.0", "uuid": "^8.1.0" }, "devDependencies": { diff --git a/sdk/cosmosdb/cosmos/rollup.config.js b/sdk/cosmosdb/cosmos/rollup.config.js index d2f543f761ec..c24190c69722 100644 --- a/sdk/cosmosdb/cosmos/rollup.config.js +++ b/sdk/cosmosdb/cosmos/rollup.config.js @@ -4,6 +4,7 @@ export default [ input: "dist-esm/index.js", external: [ "tslib", + "universal-user-agent", "uuid/v4", "debug", "node-abort-controller", @@ -19,6 +20,7 @@ export default [ name: "Microsoft.Azure.Cosmos", sourcemap: true, globals: { + "universal-user-agent": "universalUserAgent", "fast-json-stable-stringify": "stableStringify", "uuid/v4": "uuid", "node-abort-controller": "AbortController", diff --git a/sdk/cosmosdb/cosmos/src/common/platform.ts b/sdk/cosmosdb/cosmos/src/common/platform.ts index d2b16be7233e..431bd768b931 100644 --- a/sdk/cosmosdb/cosmos/src/common/platform.ts +++ b/sdk/cosmosdb/cosmos/src/common/platform.ts @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { userAgent } from "../utils/user-agent"; +import { getUserAgent as userAgent } from "universal-user-agent"; import { Constants } from "./constants"; /** diff --git a/sdk/cosmosdb/cosmos/src/utils/user-agent.browser.ts b/sdk/cosmosdb/cosmos/src/utils/user-agent.browser.ts deleted file mode 100644 index 0adcb83522c8..000000000000 --- a/sdk/cosmosdb/cosmos/src/utils/user-agent.browser.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -export function userAgent(): string { - return navigator.userAgent; -} diff --git a/sdk/cosmosdb/cosmos/src/utils/user-agent.ts b/sdk/cosmosdb/cosmos/src/utils/user-agent.ts deleted file mode 100644 index f411dcbe4481..000000000000 --- a/sdk/cosmosdb/cosmos/src/utils/user-agent.ts +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import osName from "os-name"; - -export function userAgent(): string { - try { - return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`; - } catch (error) { - if (/wmic os get Caption/.test(error.message)) { - return "Windows "; - } - - throw error; - } -} From b96da589b6b91d1613dccefe954f3aa8a66787f4 Mon Sep 17 00:00:00 2001 From: Zach foster Date: Wed, 16 Sep 2020 14:42:19 -0400 Subject: [PATCH 2/4] remove os-name --- sdk/cosmosdb/cosmos/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/cosmosdb/cosmos/package.json b/sdk/cosmosdb/cosmos/package.json index d9d157c04f5f..3e17edccfa37 100644 --- a/sdk/cosmosdb/cosmos/package.json +++ b/sdk/cosmosdb/cosmos/package.json @@ -87,7 +87,6 @@ "jsbi": "^3.1.3", "node-abort-controller": "^1.0.4", "node-fetch": "^2.6.0", - "os-name": "^3.1.0", "priorityqueuejs": "^1.0.0", "semaphore": "^1.0.5", "tslib": "^2.0.0", From 4599a8c5de56ea0b6c6efb1e057d9fb6e03e7b8f Mon Sep 17 00:00:00 2001 From: Zach foster Date: Wed, 16 Sep 2020 15:23:10 -0400 Subject: [PATCH 3/4] Changelog --- sdk/cosmosdb/cosmos/CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdk/cosmosdb/cosmos/CHANGELOG.md b/sdk/cosmosdb/cosmos/CHANGELOG.md index bd8ef528bea3..ea05c6a63240 100644 --- a/sdk/cosmosdb/cosmos/CHANGELOG.md +++ b/sdk/cosmosdb/cosmos/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 3.9.2 (Unreleased) +## 3.9.2 (2020-09-16) + +- BUGFIX: Fixes slow `userAgent` lookup on azure functions. ## 3.9.1 (2020-08-28) From 0d7e047d698dcba5222b6c15824142bcf4be8c62 Mon Sep 17 00:00:00 2001 From: Zach foster Date: Wed, 16 Sep 2020 15:23:26 -0400 Subject: [PATCH 4/4] Changelog --- sdk/cosmosdb/cosmos/CHANGELOG.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sdk/cosmosdb/cosmos/CHANGELOG.md b/sdk/cosmosdb/cosmos/CHANGELOG.md index ea05c6a63240..19e50e1aedaa 100644 --- a/sdk/cosmosdb/cosmos/CHANGELOG.md +++ b/sdk/cosmosdb/cosmos/CHANGELOG.md @@ -64,17 +64,17 @@ database.container.create(containerDefinition) const operations: OperationInput[] = [ { operationType: "Create", - resourceBody: { id: "doc1", name: "sample", key: "A" }, + resourceBody: { id: "doc1", name: "sample", key: "A" } }, { operationType: "Upsert", - resourceBody: { id: "doc2", name: "other", key: "A" }, + resourceBody: { id: "doc2", name: "other", key: "A" } }, { operationType: "Read", id: "readItemId", - partitionKey: "key", - }, + partitionKey: "key" + } ]; await database.container.items.bulk(operations); @@ -291,14 +291,14 @@ Constructor options have been simplified: const client = new CosmosClient({ endpoint: "https://your-database.cosmos.azure.com", auth: { - masterKey: "your-primary-key", - }, + masterKey: "your-primary-key" + } }); // v3 const client = new CosmosClient({ endpoint: "https://your-database.cosmos.azure.com", - key: "your-primary-key", + key: "your-primary-key" }); ```