From 3a0794f51aa394658319206b744dc39b232fb052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Tue, 19 May 2026 14:31:10 +0200 Subject: [PATCH 1/2] Add CHANGELOG.md covering changes since v1.0.273 Human-readable changelog grouping the work merged since the v1.0.273 release (2026-05-05) by theme: ARM-based control plane (#75), CLI migration to System.CommandLine (#72), replace/patch item commands (#71), JSON output highlighting / rainbow brackets (#80), interactive shell keyboard shortcuts (#57), startup usage hint (#82), and the long tail of paper-cut fixes, doc updates, and pipeline improvements. --- CHANGELOG.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..240dd8b --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,54 @@ +# Changelog + +## Unreleased — since v1.0.273 (2026-05-05) + +A pretty packed cycle. The headline change is **ARM-based control plane for database and container management**, but there’s also a fully reworked CLI, two new item commands, a much friendlier shell experience for newcomers, and a long list of paper-cut fixes. + +### Highlights + +- **Database and container operations now go through Azure Resource Manager.** `mkdb`, `mkcon`, `rmdb`, `rmcon`, `settings`, and `indexpolicy` use ARM when the connection includes a token credential, and fall back to the data plane when it doesn’t (account key, `COSMOSDB_SHELL_TOKEN`, emulator). This means the shell respects RBAC role assignments for control-plane actions instead of relying on master keys, and works on accounts where data-plane management is restricted. `--subscription` and `--resource-group` let you target an account explicitly; otherwise the shell tries to discover the matching ARM account from the credential. ([#75](https://github.com/Azure/CosmosDBShell/pull/75)) +- **CLI parser migrated from CommandLineParser to System.CommandLine.** Better error messages for unknown args, proper handling of `-c "command with spaces"` and `-k "raw command"`, and consistent behavior for `--help`, `--version`, and `--lsp`. ([#72](https://github.com/Azure/CosmosDBShell/pull/72)) +- **`replace` and `patch` item commands.** Update an item by id, or apply a JSON Patch document, without round-tripping through `print` + `mkitem`. ([#71](https://github.com/Azure/CosmosDBShell/pull/71)) +- **Syntax highlighting in the REPL.** JSON command output gets colorized, and matching `()` `[]` `{}` are coloured by nesting depth (rainbow brackets). ([#80](https://github.com/Azure/CosmosDBShell/pull/80)) +- **Interactive keyboard shortcuts.** Bindings for common navigation and editing actions in the REPL. ([#57](https://github.com/Azure/CosmosDBShell/pull/57)) +- **Friendlier first run.** When the shell starts without a connection — or when `connect` is run with no arguments — it now prints a short usage hint instead of a bare prompt. ([#82](https://github.com/Azure/CosmosDBShell/pull/82)) + +### New features + +- New `connect` options `--subscription` and `--resource-group` (and their startup counterparts `--connect-subscription`, `--connect-resource-group`) to explicitly target an ARM Cosmos DB account. +- `connect` now displays an “ARM Account” row when an ARM context is attached. +- Sovereign-cloud aware ARM endpoint resolution: known cloud table for Public / China / US Gov / Germany, plus a `login.X` → `management.X` fallback for additional national clouds. ([#75](https://github.com/Azure/CosmosDBShell/pull/75)) +- `replace` and `patch` item commands. ([#71](https://github.com/Azure/CosmosDBShell/pull/71)) +- JSON output syntax highlighting and depth-cycled bracket coloring. ([#80](https://github.com/Azure/CosmosDBShell/pull/80)) +- Interactive shell keyboard shortcuts. ([#57](https://github.com/Azure/CosmosDBShell/pull/57)) +- Startup usage hint when disconnected. ([#82](https://github.com/Azure/CosmosDBShell/pull/82)) + +### Improvements + +- `ls` pushes `SELECT TOP n` down to the server when no client-side filter is in play, so listing large containers no longer pulls the whole result set. ([#70](https://github.com/Azure/CosmosDBShell/pull/70)) +- `ls` correctly displays hierarchical partition keys ([#64](https://github.com/Azure/CosmosDBShell/pull/64)) and is resilient when items have missing content streams ([#63](https://github.com/Azure/CosmosDBShell/pull/63)). +- `cd` now rejects paths that try to descend below `/database/container`. ([#69](https://github.com/Azure/CosmosDBShell/pull/69)) +- Entra interactive sign-in attempts are cancellable, so a `connect` that opens a browser tab can be aborted with `Ctrl+C`. ([#62](https://github.com/Azure/CosmosDBShell/pull/62)) +- Emulator connection failures produce a clearer, actionable error message. ([#84](https://github.com/Azure/CosmosDBShell/pull/84)) +- `--help` / `/?` output reflowed for readability, and all remaining help strings are localized. +- New long option spellings `--clear-history` and `--color-system` (the unhyphenated forms still work). +- `settings` now validates the database/container before fetching, so missing resources produce the standard localized `database_not_found` / `container_not_found` message regardless of whether the call routes through ARM or the data plane. + +### Fixes + +- `connect` no longer regresses to a failure when the credential has no ARM access — it falls back to the data plane cleanly. ([#75](https://github.com/Azure/CosmosDBShell/pull/75)) +- Token-credential connect paths properly dispose the `CosmosClient` when ARM completion fails, so a failed connect never leaks a half-initialized client. +- Data-plane container reads guard against null `Container.Resource` responses. +- VS Code credential is reused correctly when `connect` is re-issued in the same session. ([#73](https://github.com/Azure/CosmosDBShell/pull/73)) +- Highlighter no longer duplicates text inside interpolated strings, and lexes interpolated-string interiors with accurate outer-source positions. +- `PrintConnectUsageHint` escapes the localized header/footer so they render correctly with markup-bearing values. + +### Documentation + +- New “telemetry” section in [README](README.md) describing what data the shell collects, with explicit clarification of what is and isn’t collected around Entra ID authentication. ([#78](https://github.com/Azure/CosmosDBShell/pull/78)) +- [docs/connect.md](docs/connect.md), [docs/commands.md](docs/commands.md), [docs/navigation.md](docs/navigation.md), and [docs/mcp.md](docs/mcp.md) updated for the new ARM options, the strict-RBAC limitation of key-based connections, and the four-step ARM endpoint resolution order. + +### Build & pipeline + +- Official pipeline now zips signed per-RID publish folders so downloadable artifacts are ready to use. ([#77](https://github.com/Azure/CosmosDBShell/pull/77)) +- Artifact upload trims `out\` to `zip`+`nupkg` only; expected exe is matched by file name with project casing. From ddd31798dfc8ba8c248b57b9be73487c06a8a4e5 Mon Sep 17 00:00:00 2001 From: Mike Krueger Date: Wed, 20 May 2026 12:41:04 +0200 Subject: [PATCH 2/2] Clarify replace/patch behavior in CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 240dd8b..5ed91f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ A pretty packed cycle. The headline change is **ARM-based control plane for data - **Database and container operations now go through Azure Resource Manager.** `mkdb`, `mkcon`, `rmdb`, `rmcon`, `settings`, and `indexpolicy` use ARM when the connection includes a token credential, and fall back to the data plane when it doesn’t (account key, `COSMOSDB_SHELL_TOKEN`, emulator). This means the shell respects RBAC role assignments for control-plane actions instead of relying on master keys, and works on accounts where data-plane management is restricted. `--subscription` and `--resource-group` let you target an account explicitly; otherwise the shell tries to discover the matching ARM account from the credential. ([#75](https://github.com/Azure/CosmosDBShell/pull/75)) - **CLI parser migrated from CommandLineParser to System.CommandLine.** Better error messages for unknown args, proper handling of `-c "command with spaces"` and `-k "raw command"`, and consistent behavior for `--help`, `--version`, and `--lsp`. ([#72](https://github.com/Azure/CosmosDBShell/pull/72)) -- **`replace` and `patch` item commands.** Update an item by id, or apply a JSON Patch document, without round-tripping through `print` + `mkitem`. ([#71](https://github.com/Azure/CosmosDBShell/pull/71)) +- **`replace` and `patch` item commands.** `replace` updates an existing item from JSON (deriving id and partition key from the JSON, with `--etag` for optimistic concurrency). `patch` applies a single Cosmos patch operation — `set`, `add`, `replace`, `remove`, or `incr` — against a field path on an item identified by id and partition key. No more round-tripping through `print` + `mkitem`. ([#71](https://github.com/Azure/CosmosDBShell/pull/71)) - **Syntax highlighting in the REPL.** JSON command output gets colorized, and matching `()` `[]` `{}` are coloured by nesting depth (rainbow brackets). ([#80](https://github.com/Azure/CosmosDBShell/pull/80)) - **Interactive keyboard shortcuts.** Bindings for common navigation and editing actions in the REPL. ([#57](https://github.com/Azure/CosmosDBShell/pull/57)) - **Friendlier first run.** When the shell starts without a connection — or when `connect` is run with no arguments — it now prints a short usage hint instead of a bare prompt. ([#82](https://github.com/Azure/CosmosDBShell/pull/82))