Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
202 commits
Select commit Hold shift + click to select a range
30d8ee2
refactor: rename mongoβ†’data-api, MongoBSONTypesβ†’BSONTypes + fix array…
tnaum-ms Feb 16, 2026
50dabfb
refactor: convert SchemaAnalyzer to class with addDocument/getSchema API
tnaum-ms Feb 16, 2026
bd70865
refactor: update JSONSchema interface with typed x- properties and fi…
tnaum-ms Feb 16, 2026
99c0234
feat: enhance FieldEntry with bsonType, bsonTypes, isOptional, arrayI…
tnaum-ms Feb 16, 2026
4891463
feat: add transformers (generateDescriptions, toTypeScriptDefinition,…
tnaum-ms Feb 16, 2026
7a54b8c
test: add SchemaAnalyzer class method tests + update plan checklist
tnaum-ms Feb 16, 2026
d4380f4
feat: add version-based caching to SchemaAnalyzer + trace logging
tnaum-ms Feb 16, 2026
633f0b4
Initial plan
Copilot Feb 17, 2026
74eeeac
refactor: remove debug console.log statements from tests
Copilot Feb 17, 2026
eb71916
refactor: remove debug console.log statements from SchemaAnalyzer tes…
tnaum-ms Feb 17, 2026
d8d0709
test: add comprehensive tests for SchemaAnalyzer versioning and cachi…
tnaum-ms Feb 17, 2026
ebdde30
refactor: remove console.log statements from test files for cleaner o…
tnaum-ms Feb 17, 2026
c23b604
refactor: enhance handling of special characters in field names for T…
tnaum-ms Feb 17, 2026
3ca6951
refactor: extract schema-analyzer into standalone npm workspace package
tnaum-ms Feb 17, 2026
2fec69d
docs: add README and bump schema-analyzer to v1.0.0
tnaum-ms Feb 17, 2026
a667c35
build: add prebuild and prejesttest scripts for workspace package builds
tnaum-ms Feb 17, 2026
cbaa573
chore: bump schema-analyzer version to 1.0.0 in package-lock.json
tnaum-ms Feb 17, 2026
f1d006d
Refactor code structure for improved readability and maintainability
tnaum-ms Feb 17, 2026
62a3e57
docs: add future work item for undeclared BSON type names in TS defin…
tnaum-ms Feb 17, 2026
4b3dd00
fix: toInterfaceName handles digit-leading and separator-only collect…
tnaum-ms Feb 17, 2026
37e64e5
docs: clarify boolean JSONSchemaRef safety in getKnownFields
tnaum-ms Feb 17, 2026
b17e9cc
fix: insertText escaping β€” use identifier check + escape quotes/backs…
tnaum-ms Feb 17, 2026
35a13a1
refactor: streamline TypeScript definition tests for improved readabi…
tnaum-ms Feb 17, 2026
1cb9e5b
docs: add terminology guidelines for DocumentDB and MongoDB API usage
tnaum-ms Feb 17, 2026
43915a5
refactor: replace 'console' assert with 'node:assert/strict' for impr…
tnaum-ms Feb 17, 2026
75536e9
refactor: update documentation to consistently reference DocumentDB A…
tnaum-ms Feb 17, 2026
5094ca6
refactor: SchemaAnalyzer class + enhanced FieldEntry + new schema tra…
tnaum-ms Feb 17, 2026
a44c90b
feat: add DocumentDB constants package with operator metadata and doc…
tnaum-ms Feb 19, 2026
df1d7d6
refactor: enhance fetchText function to return detailed error informa…
tnaum-ms Feb 19, 2026
bfe91f7
chore: add prettier for code formatting in documentdb-constants package
tnaum-ms Feb 20, 2026
7c244e0
Add aggregation pipeline stages, system variables, update operators, …
tnaum-ms Feb 20, 2026
45625d2
feat: add evaluate-overrides script to assess scraped data and manual…
tnaum-ms Feb 20, 2026
eaf0a9b
refactor: enhance findOverride function to support cross-category fal…
tnaum-ms Feb 20, 2026
6642026
feat: add comprehensive unit tests for DocumentDB operator references…
tnaum-ms Feb 20, 2026
cec372e
Update documentation links for various operators in DocumentDB constants
tnaum-ms Feb 20, 2026
9096463
Refactor operator documentation generation and update paths
tnaum-ms Feb 20, 2026
6938ccd
Refactor import statements and improve descriptions in DocumentDB con…
tnaum-ms Feb 20, 2026
1b9da3e
Refactor query operators and stages for improved readability and cons…
tnaum-ms Feb 20, 2026
ab68d89
fix: update Jest test path for operator reference validation in README
tnaum-ms Feb 20, 2026
9290f70
docs: fix JSDoc β€” 'frozen array' β†’ 'readonly array' in getFilteredCom…
tnaum-ms Feb 23, 2026
b13745d
refactor: derive MetaTag from ALL_META_TAGS union with string escape …
tnaum-ms Feb 23, 2026
2366b42
chore: remove devDependencies from documentdb-constants, delegate to …
tnaum-ms Feb 23, 2026
42fcdd4
chore: unify workspace configs across packages
tnaum-ms Feb 23, 2026
6c7e614
chore(documentdb-constants): add tsconfig.scripts.json for CI script …
tnaum-ms Feb 23, 2026
0ece75a
refactor(documentdb-constants): replace side-effect imports with expl…
tnaum-ms Feb 23, 2026
5b99454
fix(documentdb-constants): correct expr:bool and expr:comparison doc …
tnaum-ms Feb 23, 2026
1e74364
fix(documentdb-constants): correct expr:bool and expr:comparison doc …
tnaum-ms Feb 23, 2026
e8a13f4
fix(documentdb-constants): add idempotent registration guard to opera…
tnaum-ms Feb 23, 2026
df45bfb
fix(documentdb-constants): log ambiguous and unambiguous override fal…
tnaum-ms Feb 23, 2026
cee31fa
fix(documentdb-constants): integrate script typecheck into build; rev…
tnaum-ms Feb 23, 2026
1052626
fix(documentdb-constants): return shallow copy from getAllCompletions…
tnaum-ms Feb 23, 2026
cadb1f6
docs(documentdb-constants): expand returnType JSDoc β€” experimental fi…
tnaum-ms Feb 23, 2026
782eb2d
fix(documentdb-constants): exit 1 on network failures in scraper β€” 40…
tnaum-ms Feb 23, 2026
812702c
docs(documentdb-constants): note that getFilteredCompletions already …
tnaum-ms Feb 23, 2026
d700375
feat: add documentdb-constants package β€” operator metadata for autoco…
tnaum-ms Feb 23, 2026
3d0674f
Merge branch 'next' into feature/shell-integration
tnaum-ms Feb 23, 2026
bc5adc3
chore: package-lock.json update
tnaum-ms Feb 23, 2026
23dd1eb
fix: prettier-fix
tnaum-ms Feb 23, 2026
a985c16
fix: escape backslashes before pipes in escapeTableCell
tnaum-ms Feb 23, 2026
5c5bc1e
POC: Register documentdb-query custom language for Monaco editors
tnaum-ms Feb 25, 2026
b7f65a6
feat: Enhance documentdb-query completion and validation features
tnaum-ms Feb 25, 2026
e8989d5
feat: Enhance documentdb-query validation with additional tests and i…
tnaum-ms Mar 16, 2026
ce2c04a
feat: Implement type-aware operator sorting for documentdb-query comp…
tnaum-ms Mar 16, 2026
3b90d6e
refactor: Remove debug logging from documentdb-query validation function
tnaum-ms Mar 16, 2026
9fb2d69
fix: coalesce concurrent language registration calls
tnaum-ms Mar 16, 2026
419380b
docs: clarify charBefore out-of-bounds behavior with example
tnaum-ms Mar 16, 2026
e98417a
docs: add TODO for unused isDollarPrefix parameter (WIP)
tnaum-ms Mar 16, 2026
d941a60
docs: document Identifier visitor as planned no-op
tnaum-ms Mar 16, 2026
7bc3533
feat: add telemetry for field completion data fetch failures
tnaum-ms Mar 16, 2026
5514c63
fix: remove unnecessary blank line in registerDocumentDBQueryLanguage…
tnaum-ms Mar 16, 2026
afd34b0
feat: documentdb-query language β€” CompletionItemProvider, HoverProvid…
tnaum-ms Mar 16, 2026
5bf7bf3
Step 4.5(1): cursor context detector with heuristic scanning
tnaum-ms Mar 16, 2026
0e0a081
Step 4.5(2): context-sensitive completion filtering
tnaum-ms Mar 16, 2026
3ee3e67
Step 4.5(3): wire cursor context into completion provider
tnaum-ms Mar 16, 2026
4c97c35
Step 4.5(5): fix Issues A, B, C from manual testing
tnaum-ms Mar 16, 2026
e4837ce
Step 4.5(6): clean up completion item styling
tnaum-ms Mar 16, 2026
63d0056
Step 4.5(7): fix $gt snippet variable escape bug
tnaum-ms Mar 16, 2026
c80ebcd
Step 4.5(8): refactor completions into folder + type-aware value sugg…
tnaum-ms Mar 16, 2026
c039c77
fix: align type suggestion keys with BSONTypes enum values
tnaum-ms Mar 16, 2026
0862db0
fix: use realistic example date in ISODate snippet placeholders
tnaum-ms Mar 16, 2026
d4a8b80
feat: enhance context-sensitive completions with structured knowledge…
tnaum-ms Mar 17, 2026
fa9aa82
feat: enhance type suggestions with improved descriptions and documen…
tnaum-ms Mar 17, 2026
2ce99e4
feat: update sort prefixes for BSON constructors and enhance regex do…
tnaum-ms Mar 17, 2026
a352a75
feat: enhance completion item structure and improve error diagnostics…
tnaum-ms Mar 17, 2026
f3112de
feat: add JavaScript global completions (Date, Math, RegExp) to compl…
tnaum-ms Mar 17, 2026
d727c31
fix: validate NewExpression constructors for unknown identifiers
tnaum-ms Mar 17, 2026
11407a3
feat: add Date.now() and common Math methods to JS global completions
tnaum-ms Mar 17, 2026
be3b361
docs: update 4.5 plan with steps 15-16
tnaum-ms Mar 17, 2026
23927df
fix: include projection operators and BSON constructors in PROJECTION…
tnaum-ms Mar 17, 2026
fe42fef
docs: add completion provider enhancements to future work
tnaum-ms Mar 17, 2026
14694e1
chore: remove gitignored docs/plan files from tracking
tnaum-ms Mar 17, 2026
3c02329
docs: add git safety rules to copilot instructions
tnaum-ms Mar 17, 2026
85c490f
fix: lint error and minor cleanup
tnaum-ms Mar 17, 2026
49f2711
docs: add known edge case comment for string-literal scanning in curs…
tnaum-ms Mar 18, 2026
afbaacb
fix: normalize BSON type 'int' to 'int32' across tests and constants
tnaum-ms Mar 18, 2026
f72ba46
feat: show all completions when cursor context is unknown
tnaum-ms Mar 18, 2026
16de10e
cleanup: remove development console.debug logs from completion provider
tnaum-ms Mar 18, 2026
d84f446
docs: update completion flow to clarify handling of unknown context a…
tnaum-ms Mar 18, 2026
bab2efa
feat: context-sensitive completions β€” cursor-aware filtering & type s…
tnaum-ms Mar 18, 2026
7ef0a34
Merge remote-tracking branch 'origin/next' into feature/shell-integra…
tnaum-ms Mar 18, 2026
3172671
fix: set isTrusted on completion documentation for clickable links
tnaum-ms Mar 18, 2026
4855f48
fix: preserve field completion data across query changes
tnaum-ms Mar 18, 2026
1cd9f66
fix: move $not from key-position to field-level operator category
tnaum-ms Mar 18, 2026
26de68f
feat: add project (1/0) and sort (1/-1) value completions
tnaum-ms Mar 18, 2026
31dba3d
fix: wrap completions with braces when editor has no outer brackets
tnaum-ms Mar 18, 2026
394425e
feat: add auto-trigger characters for colon, comma, and bracket
tnaum-ms Mar 18, 2026
b46254a
feat: add field type hover provider
tnaum-ms Mar 18, 2026
b4fd7a9
fix: hover provider improvements β€” quoted keys, isTrusted, inferred t…
tnaum-ms Mar 18, 2026
c6f6901
test: add operator category coverage tests by position
tnaum-ms Mar 18, 2026
2a7f1df
feat: smart-trigger completions after ': ' and ', ' patterns
tnaum-ms Mar 18, 2026
8bfe0fb
fix: make hover tooltip documentation links clickable in webview
tnaum-ms Mar 18, 2026
053b184
style: apply prettier formatting to completion tests
tnaum-ms Mar 18, 2026
769b045
feat: split EMPTY from UNKNOWN context β€” TDD behavior tests
tnaum-ms Mar 18, 2026
42072c2
feat: add standalone flag to filter non-standalone operators from com…
tnaum-ms Mar 18, 2026
5eaea32
feat: enhance hover content formatting and update inferred types section
tnaum-ms Mar 19, 2026
93ca2b5
feat: add TDD contract test guidelines and update test description fo…
tnaum-ms Mar 19, 2026
5c6bf5f
feat: improve auto-trigger completion logic for query editor
tnaum-ms Mar 19, 2026
f5b27e1
feat: remove unnecessary line breaks in hover documentation links
tnaum-ms Mar 19, 2026
0f016f6
fix: ESC respects suggest widget/snippet mode, Tab respects snippet t…
tnaum-ms Mar 19, 2026
037a01f
feat: add snippet session cancellation to prevent ghost selection bug
tnaum-ms Mar 19, 2026
4a44ff5
fix: escape field names in hover and disable isTrusted for field hovers
tnaum-ms Mar 19, 2026
91b08d4
refactor: move extractQuotedKey to dedicated module
tnaum-ms Mar 19, 2026
78f6ca2
style: format settings.json for consistency and readability
tnaum-ms Mar 19, 2026
f534fb8
feat: collection view & autocompletion UX improvements (Step 4.6) (#532)
tnaum-ms Mar 19, 2026
308fe24
feat: enhance documentdb-query language registration and improve docu…
tnaum-ms Mar 19, 2026
b85b5fb
feat: add snippet session cancellation on Enter and Ctrl+Enter in Que…
tnaum-ms Mar 19, 2026
0f1b44e
Step 5, Task 1: Relocate reusable utilities out of scrapbook
tnaum-ms Mar 20, 2026
1c9718e
Step 5, Task 2: Delete scrapbook source files, commands, and grammar
tnaum-ms Mar 20, 2026
f82330e
Step 5, Task 3: Remove scrapbook references from extension infrastruc…
tnaum-ms Mar 20, 2026
72889bb
Step 5, Task 4: Remove scrapbook test files
tnaum-ms Mar 20, 2026
2a3a931
Step 5, Task 5: Remove scrapbook contributions from package.json
tnaum-ms Mar 20, 2026
c6bd704
Step 5, Task 6: Remove scrapbook-only npm dependencies
tnaum-ms Mar 20, 2026
c00bd36
Step 5, Tasks 7-8: Regenerate l10n, update lockfile, verify build
tnaum-ms Mar 20, 2026
804d03c
fix: remove stale grammar copy pattern and dangling resolve alias fro…
tnaum-ms Mar 20, 2026
71954fa
fix: update CredScan suppression paths after scrapbook removal
tnaum-ms Mar 20, 2026
d5c78f3
fix: remove stale scrapbook references from README and settings
tnaum-ms Mar 20, 2026
77a4cbd
Step 5: Legacy Scrapbook Removal (#533)
tnaum-ms Mar 20, 2026
ac328c0
feat: Scratchpad WI-1 β€” file type registration + ScratchpadService
tnaum-ms Mar 23, 2026
65b30ac
fix: add grammar path for documentdb-scratchpad language
tnaum-ms Mar 23, 2026
13d9629
feat: Scratchpad WI-2 β€” CodeLens, commands, keybindings, tree menus
tnaum-ms Mar 23, 2026
768e0d7
fix: post-WI-2 polish β€” gutter indicators, CodeLens UX, bug fixes
tnaum-ms Mar 23, 2026
c00229b
feat: Scratchpad WI-3 β€” execution engine + output display
tnaum-ms Mar 23, 2026
9c5dd82
fix: circular ref in results, side-by-side output, progress notification
tnaum-ms Mar 23, 2026
1db3123
fix: use .jsonc for results to support comments + JSON without errors
tnaum-ms Mar 23, 2026
acbe13c
chore: filter known @mongosh webpack warnings
tnaum-ms Mar 24, 2026
3bace81
fix: result header, CodeLens tooltips, focus preservation
tnaum-ms Mar 24, 2026
b6a8c44
feat: custom scratchpad help handler
tnaum-ms Mar 24, 2026
6950163
feat: expand help with index, cursor, admin commands
tnaum-ms Mar 24, 2026
30cd575
fix: add db.name shorthand to help output
tnaum-ms Mar 24, 2026
1f670c9
fix: human-readable scratchpad filename, descriptive result tabs
tnaum-ms Mar 24, 2026
09e79f7
refactor: consolidate type imports and improve formatError function s…
tnaum-ms Mar 24, 2026
a0a8f79
chore: l10n update + prettier formatting
tnaum-ms Mar 24, 2026
f270817
fix(#2): align Ctrl+Enter block fallback with CodeLens behavior
tnaum-ms Mar 24, 2026
d2a983a
fix(#5,#6): re-entrancy guard + actual error duration
tnaum-ms Mar 24, 2026
6f21223
fix(#7,#8): localize timeout message + proper db name escaping
tnaum-ms Mar 24, 2026
63bd6d8
fix(#9): cross-platform webpack ignoreWarnings regex
tnaum-ms Mar 24, 2026
eadb2e8
fix(#11): use SCRATCHPAD_LANGUAGE_ID constant + l10n update
tnaum-ms Mar 24, 2026
b22a2d3
chore: prettier formatting
tnaum-ms Mar 24, 2026
2c2169a
Step 6: DocumentDB Scratchpad β€” File type, CodeLens, execution engine…
tnaum-ms Mar 24, 2026
76d72fe
chore: version bump to 0.8.0-beta
tnaum-ms Mar 24, 2026
46e3caf
Merge remote-tracking branch 'origin/next' into feature/shell-integra…
tnaum-ms Mar 24, 2026
aca6c12
feat: add SchemaStore singleton with debounced notifications (Step 6.…
tnaum-ms Mar 24, 2026
8efdc62
refactor: delegate ClusterSession schema to SchemaStore (Step 6.1 WI-2)
tnaum-ms Mar 24, 2026
1e82214
feat: feed scratchpad results to SchemaStore (Step 6.1 WI-3)
tnaum-ms Mar 24, 2026
a422d80
feat: clear SchemaStore on disconnect/drop (Step 6.1 WI-4)
tnaum-ms Mar 24, 2026
0373d3f
style: fix lint errors (inline type imports, strict equality)
tnaum-ms Mar 24, 2026
700a4fd
fix: replace unnecessary lazy import with static import in deleteClient
tnaum-ms Mar 24, 2026
d756cb6
fix: tighten WithId<Document> type predicate with _id check
tnaum-ms Mar 24, 2026
900c690
style: import ordering (prettier)
tnaum-ms Mar 24, 2026
d6fcbf4
feat: Shared Schema Cache (SchemaStore) β€” Step 6.1 (#538)
tnaum-ms Mar 24, 2026
53d4823
Merge remote-tracking branch 'origin/next' into feature/shell-integra…
tnaum-ms Mar 24, 2026
0ceca45
schema store: add memory monitoring with getStats, telemetry, and out…
tnaum-ms Mar 24, 2026
720ac52
schema store: wire ClusterSession.closeSession to tab disposal
tnaum-ms Mar 24, 2026
b8fade6
schema store: add 'Clear Schema Cache' command
tnaum-ms Mar 24, 2026
6fd8948
style: prettier formatting and l10n bundle update
tnaum-ms Mar 24, 2026
e796403
feat(scratchpad): Phase 1 β€” worker thread scaffold
tnaum-ms Mar 25, 2026
088fed0
feat(scratchpad): Phase 2 β€” main thread integration
tnaum-ms Mar 25, 2026
c82ed50
feat(scratchpad): Phase 3 β€” worker disposal + lifecycle wiring
tnaum-ms Mar 25, 2026
c415bf7
feat(scratchpad): Phase 5 β€” SchemaStore doc cap + connection sync
tnaum-ms Mar 25, 2026
bd7c3a8
fix(scratchpad): use EJSON.parse for BSON type fidelity in schema ana…
tnaum-ms Mar 25, 2026
3663860
feat(scratchpad): phased progress notifications
tnaum-ms Mar 25, 2026
e88d390
fix(scratchpad): proper log levels, progress UX, cancel handling
tnaum-ms Mar 25, 2026
c95c106
fix(scratchpad): fix editor close detection + add schema stats command
tnaum-ms Mar 25, 2026
a1fe892
fix(scratchpad): normalize CursorIterationResult to plain Array befor…
tnaum-ms Mar 25, 2026
4909cb2
fix(scratchpad): unwrap CursorIterationResult { documents } wrapper
tnaum-ms Mar 25, 2026
6a825a6
fix(scratchpad): show authoritative result type in output header
tnaum-ms Mar 25, 2026
2f4d90a
fix(scratchpad): show result metadata for untyped results (.toArray, …
tnaum-ms Mar 25, 2026
479257b
fix(scratchpad): polish output headers, logging, schema stats display
tnaum-ms Mar 26, 2026
ef2cc9b
feat(scratchpad): modal connect dialog + multi-statement documentation
tnaum-ms Mar 26, 2026
e2db9fe
fix(scratchpad): use generic 'client' terminology in logs and comments
tnaum-ms Mar 26, 2026
2ff3165
fix(scratchpad): clean up worker on init failure to prevent stranded …
tnaum-ms Mar 26, 2026
12a02e1
fix(scratchpad): use canonical EJSON for worker IPC to preserve BSON …
tnaum-ms Mar 26, 2026
450443e
chore(scratchpad): add TODO comments for unwired displayBatchSize field
tnaum-ms Mar 26, 2026
10976e1
fix(scratchpad): localize user-visible error messages in ScratchpadEv…
tnaum-ms Mar 26, 2026
7eba164
chore: l10n
tnaum-ms Mar 26, 2026
137ddc1
feat(scratchpad): enhance telemetry for scratchpad execution and work…
tnaum-ms Mar 27, 2026
f30c7b6
feat(scratchpad): add runMode parameter to executeScratchpadCode for …
tnaum-ms Mar 27, 2026
986e2b8
fix(scratchpad): tighten cursor unwrap to require full CursorIteratio…
tnaum-ms Mar 27, 2026
497ff53
fix(scratchpad): use generic 'Operation timed out' message for sendRe…
tnaum-ms Mar 27, 2026
ed12046
fix(scratchpad): pass actual duration to formatError instead of hardc…
tnaum-ms Mar 27, 2026
f9cfe22
perf(scratchpad): use partial Fisher-Yates for randomSample
tnaum-ms Mar 27, 2026
94acf44
feat(scratchpad): persistent worker thread for scratchpad execution (…
tnaum-ms Mar 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .azure-pipelines/compliance/CredScanSuppressions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
"_justification": "No need to scan external node modules."
},
{
"file": "test\\mongoGetCommand.test.ts",
"_justification": "Fake credentials used for unit tests."
},
{
"file": "src\\documentdb\\scrapbook\\mongoConnectionStrings.test.ts",
"file": "src\\documentdb\\mongoConnectionStrings.test.ts",
"_justification": "Fake credentials used for unit tests."
},
{
Expand Down
34 changes: 33 additions & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GitHub Copilot Instructions for vscode-documentdb

VS Code Extension for Azure Cosmos DB and MongoDB. TypeScript (strict mode), React webviews, Jest testing.
VS Code Extension for Azure Cosmos DB and the MongoDB API. TypeScript (strict mode), React webviews, Jest testing.

## Critical Build Commands

Expand Down Expand Up @@ -32,6 +32,12 @@ Before finishing work on a PR, agents **must** run the following steps in order:

> ⚠️ **An agent must not finish or terminate until all three steps above have been run and pass successfully.** Skipping these steps leads to CI failures.

## Git Safety

- **Never use `git add -f`** to force-add files. If `git add` refuses a file, it is likely in `.gitignore` for a reason (e.g., `docs/plan/`, `docs/analysis/`, build outputs). Do NOT override this with `-f`.
- When `git add` warns that a path is ignored, **stop and inform the user** instead of force-adding.
- Files in `docs/plan/` and `docs/analysis/` are **local planning documents** that must not be committed to the repository.

## Project Structure

| Folder | Purpose |
Expand Down Expand Up @@ -178,6 +184,32 @@ For Discovery View, both `treeId` and `clusterId` are sanitized (all `/` replace

See `src/tree/models/BaseClusterModel.ts` and `docs/analysis/08-cluster-model-simplification-plan.md` for details.

## Terminology

This is a **DocumentDB** extension that uses the **MongoDB-compatible wire protocol**.

- Use **"DocumentDB"** when referring to the database service itself.
- Use **"MongoDB API"** or **"DocumentDB API"** when referring to the wire protocol, query language, or API compatibility layer.
- **Never use "MongoDB" alone** as a product name in code, comments, docs, or user-facing strings.

| βœ… Do | ❌ Don't |
| ---------------------------------------------------- | -------------------------------- |
| `// Query operators supported by the DocumentDB API` | `// MongoDB query operators` |
| `// BSON types per the MongoDB API spec` | `// Uses MongoDB's $match stage` |
| `documentdbQuery` (variable name) | `mongoQuery` |

This applies to: code comments, JSDoc/TSDoc, naming (prefer `documentdb` prefix), user-facing strings, docs, and test descriptions.

## TDD Contract Tests

Test suites prefixed with `TDD:` (e.g., `describe('TDD: Completion Behavior', ...)`) are **behavior contracts** written before the implementation. If a `TDD:` test fails after a code change:

1. **Do NOT automatically fix the test.**
2. **Stop and ask the user** whether the behavior change is intentional.
3. The user decides: update the contract (test) or fix the implementation.

This applies to any test whose name starts with `TDD:`, regardless of folder location.

## Additional Patterns

For detailed patterns, see:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ jobs:
- name: πŸ“¦ Install Dependencies (npm ci)
run: npm ci --prefer-offline --no-audit --no-fund --progress=false --verbose

- name: πŸ”¨ Build Workspace Packages
run: npm run build --workspaces --if-present

- name: 🌐 Check Localization Files
run: npm run l10n:check

Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

/docs/analysis/
/docs/plan/

# User-specific files
*.suo
*.user
Expand Down Expand Up @@ -157,6 +160,9 @@ PublishScripts/
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Include our monorepo packages at the root
!/packages/
!/packages/**
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable files
Expand Down Expand Up @@ -268,6 +274,7 @@ dist
stats.json
*.tgz
*.zip
*.tsbuildinfo

# Scrapbooks
*.mongo
Expand Down
64 changes: 33 additions & 31 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "explicit"
},
"editor.detectIndentation": false,
"editor.formatOnSave": true,
"editor.formatOnPaste": false,
"editor.insertSpaces": true,
"editor.tabSize": 4,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"search.exclude": {
"out": true,
"**/node_modules": true,
".vscode-test": true
},
"typescript.preferences.importModuleSpecifier": "relative",
"typescript.tsdk": "node_modules/typescript/lib",
"antlr4.generation": {
// Settings for "ANTLR4 grammar syntax support" extension
"mode": "internal",
"listeners": true,
"visitors": false
},
"vscode-nmake-tools.workspaceBuildDirectories": ["."],
"vscode-nmake-tools.installOsRepoRustHelperExtension": false,
"sarif-viewer.connectToGithubCodeScanning": "off"
// "eslint.workingDirectories": [
// ".", "src"
// ]
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "explicit"
},
"editor.detectIndentation": false,
"editor.formatOnSave": true,
"editor.formatOnPaste": false,
"editor.insertSpaces": true,
"editor.tabSize": 4,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"search.exclude": {
"out": true,
"**/node_modules": true,
".vscode-test": true
},
"typescript.preferences.importModuleSpecifier": "relative",
"typescript.tsdk": "node_modules/typescript/lib",
"antlr4.generation": {
// Settings for "ANTLR4 grammar syntax support" extension
"mode": "internal",
"listeners": true,
"visitors": false
},
"vscode-nmake-tools.workspaceBuildDirectories": ["."],
"vscode-nmake-tools.installOsRepoRustHelperExtension": false,
"sarif-viewer.connectToGithubCodeScanning": "off",
"jest.runMode": "deferred",
"testing.automaticallyOpenTestResults": "neverOpen"
// "eslint.workingDirectories": [
// ".", "src"
// ]
}
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,12 @@ Your feedback, contributions, and ideas shape the future of the extension.

# Prerequisites

- **Mongo Shell Requirement (Optional)**: Some advanced commands in the Mongo [scrapbook](#mongo-scrapbooks), as well as use of the MongoDB shell, require installing [MongoDB shell](https://docs.mongodb.com/manual/installation/).
- **Shell Requirement (Optional)**: Use of the DocumentDB shell requires installing [mongosh](https://www.mongodb.com/docs/mongodb-shell/install/).

## Known Issues

Here are some known issues and limitations to be aware of when using the DocumentDB VS Code extension:

- **Escaped Characters in Scrapbooks**: Scrapbook support for escaped characters is preliminary. Use double escaping for newlines (`\\n` instead of `\n`).

<!-- region exclude-from-marketplace -->

#### References
Expand Down
8 changes: 2 additions & 6 deletions extension.bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,12 @@ export { AzureAccountTreeItemBase, createAzureClient } from '@microsoft/vscode-a
// eslint-disable-next-line no-restricted-imports -- bundle intentionally re-exports many helpers for tests; nonNull helpers are provided locally in this repo
export * from '@microsoft/vscode-azext-utils';
export { isWindows, wellKnownEmulatorPassword } from './src/constants';
export { connectToClient, isCosmosEmulatorConnectionString } from './src/documentdb/scrapbook/connectToClient';
export { MongoCommand } from './src/documentdb/scrapbook/MongoCommand';
export { connectToClient, isCosmosEmulatorConnectionString } from './src/documentdb/connectToClient';
export {
addDatabaseToAccountConnectionString,
encodeMongoConnectionString,
getDatabaseNameFromConnectionString,
} from './src/documentdb/scrapbook/mongoConnectionStrings';
export * from './src/documentdb/scrapbook/registerScrapbookCommands';
export { findCommandAtPosition, getAllCommandsFromText } from './src/documentdb/scrapbook/ScrapbookHelpers';
export { ShellScriptRunner as MongoShell } from './src/documentdb/scrapbook/ShellScriptRunner';
} from './src/documentdb/mongoConnectionStrings';
export { activateInternal, deactivateInternal } from './src/extension';
export { ext } from './src/extensionVariables';
export { SettingUtils } from './src/services/SettingsService';
Expand Down
Loading
Loading