Skip to content

fix(mongodb-schema): follow up migration with small bug fixes COMPASS-10911 - #843

Open
dudaschar wants to merge 10 commits into
mainfrom
COMPASS-10911-follow-up
Open

fix(mongodb-schema): follow up migration with small bug fixes COMPASS-10911#843
dudaschar wants to merge 10 commits into
mainfrom
COMPASS-10911-follow-up

Conversation

@dudaschar

Copy link
Copy Markdown
Collaborator

Description

Tackling code review suggestions from PR #842, also bringing mongodb-schema version to be same as last published package.

Open Questions

Checklist

@dudaschar
dudaschar requested a review from gribnoysup July 29, 2026 12:19
@dudaschar dudaschar self-assigned this Jul 29, 2026
Copilot AI review requested due to automatic review settings July 29, 2026 12:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-schema from 0.2.0 to 12.7.0 across 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants