fix(mongodb-schema): follow up migration with small bug fixes COMPASS-10911 - #843
Open
dudaschar wants to merge 10 commits into
Open
fix(mongodb-schema): follow up migration with small bug fixes COMPASS-10911#843dudaschar wants to merge 10 commits into
dudaschar wants to merge 10 commits into
Conversation
added 7 commits
July 29, 2026 09:56
Contributor
There was a problem hiding this comment.
Pull request overview
This PR follows up on the mongodb-schema migration work by aligning the in-repo package version with the last published @mongodb-js/mongodb-schema release, and fixing a handful of correctness issues in schema conversion/ordering and TypeScript type generation.
Changes:
- Bump
@mongodb-js/mongodb-schemafrom0.2.0to12.7.0across the monorepo (and update lockfile accordingly). - Fix TypeScript generation correctness (array union parentheses + quoting non-identifier field names) and add a syntax-validity check in tests.
- Improve abort-signal handling during schema analysis and add coverage for stable ordering when keys differ only by case.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/mql-typescript/package.json | Updates devDependency on @mongodb-js/mongodb-schema to ^12.7.0. |
| packages/mongodb-ts-autocomplete/package.json | Updates dependency on @mongodb-js/mongodb-schema to ^12.7.0. |
| packages/mongodb-schema/test/field-order.test.ts | Adds regression test ensuring stable ordering for case-differing keys. |
| packages/mongodb-schema/test/bloated.test.ts | Adds abort-signal behavior tests for SchemaAnalyzer.analyzeDoc(). |
| packages/mongodb-schema/src/to-typescript.ts | Fixes array union formatting and quotes invalid TS property keys. |
| packages/mongodb-schema/src/to-typescript.spec.ts | Adds a TypeScript parse/transpile-based validity check and expands coverage for quoted field names. |
| packages/mongodb-schema/src/schema-converters/internal-to-mongodb.ts | Propagates AbortSignal through array item parsing. |
| packages/mongodb-schema/src/schema-analyzer.ts | Makes comparator stable for case-insensitive equal keys; ensures abort checks actually propagate by awaiting allowAbort(signal). |
| packages/mongodb-schema/package.json | Bumps package version to 12.7.0. |
| package-lock.json | Locks updated versions for the bumped package and its consumers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
gribnoysup
approved these changes
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Tackling code review suggestions from PR #842, also bringing mongodb-schema version to be same as last published package.
Open Questions
Checklist