Skip to content

Conversation

@pkuczynski
Copy link
Collaborator

@pkuczynski pkuczynski commented Nov 9, 2025

Description of change

Following #11713, applies similar changes in the jsdoc

Pull-Request Checklist

  • Code is up-to-date with the master branch
  • This pull request links relevant issues as Fixes #00000
  • There are new or updated unit tests validating the change
  • Documentation has been updated to reflect this change

Summary by CodeRabbit

  • Documentation
    • Improved grammar and wording in internal code comments and docblocks across various database drivers and decorators for clearer, more consistent documentation.
    • Adjusted inline descriptions for index/constraint and tree-related annotations to improve readability.

Note: These are documentation-only edits; no public APIs, behavior, or functionality were changed.

@pkuczynski pkuczynski self-assigned this Nov 9, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 9, 2025

Walkthrough

This PR applies grammar and JSDoc wording fixes across multiple files (indefinite article corrections, punctuation, and minor phrasing) with no changes to code logic, signatures, or runtime behavior.

Changes

Cohort / File(s) Summary
Decorator Grammar Fixes
src/decorator/tree/TreeChildren.ts, src/decorator/tree/TreeParent.ts
Corrected JSDoc article/grammar in tree decorators' comments.
Query Runner Documentation Fixes
src/driver/aurora-mysql/AuroraMysqlQueryRunner.ts, src/driver/mysql/MysqlQueryRunner.ts, src/driver/oracle/OracleQueryRunner.ts, src/driver/sap/SapQueryRunner.ts, src/driver/sqlserver/SqlServerQueryRunner.ts, src/query-runner/QueryRunner.ts
Fixed grammar in JSDoc lines (e.g., "an unique" → "a unique") for unique-constraint methods.
MongoDB Documentation Updates
src/driver/mongodb/MongoQueryRunner.ts, src/driver/mongodb/typings.ts
Reworded connect/release method comments and corrected index/option comment wording ("an unique" → "a unique").
SQLite Query Runner Comments
src/driver/sqlite-abstract/AbstractSqliteQueryRunner.ts
Adjusted JSDoc formatting/whitespace for dropUniqueConstraint(s) comments.
Spanner Query Runner Documentation
src/driver/spanner/SpannerQueryRunner.ts
Improved article usage in createCheckConstraint JSDoc.
Test File
test/functional/entity-schema/uniques/uniques-basic.ts
Cosmetic line replacement only; no behavioral change.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Areas to spot-check:

  • JSDoc lines for unique constraint methods across query runners.
  • MongoDB typings comment for CreateIndexesOptions.unique.

Possibly related PRs

Suggested labels

documentation

Suggested reviewers

  • alumni
  • gioboa
  • naorpeled

Poem

🐰 A nibble of grammar, a hop and a cheer,
"an" where it needed, and commas appear,
JSDoc now tidy, the code stays the same,
I hop off to hide my carrot of fame 🌿

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs: fix typos in the js documentation' directly and accurately summarizes the main change across all files: correcting grammar and punctuation in JSDoc comments throughout the codebase.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cc8ea32 and 01023f5.

📒 Files selected for processing (3)
  • src/driver/mongodb/MongoQueryRunner.ts (3 hunks)
  • src/driver/sap/SapQueryRunner.ts (1 hunks)
  • src/driver/sqlserver/SqlServerQueryRunner.ts (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • src/driver/mongodb/MongoQueryRunner.ts
  • src/driver/sap/SapQueryRunner.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/driver/sqlserver/SqlServerQueryRunner.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
  • GitHub Check: tests-linux (20) / mysql_mariadb
  • GitHub Check: tests-linux (20) / cockroachdb
  • GitHub Check: tests-linux (20) / postgres (17)
  • GitHub Check: tests-linux (20) / mysql_mariadb_latest
  • GitHub Check: tests-linux (18) / sqlite
  • GitHub Check: tests-linux (20) / mssql
  • GitHub Check: tests-linux (18) / postgres (17)
  • GitHub Check: tests-linux (18) / sap
  • GitHub Check: tests-linux (18) / postgres (14)
  • GitHub Check: tests-linux (18) / sqljs
  • GitHub Check: tests-linux (18) / oracle
  • GitHub Check: tests-linux (18) / mysql_mariadb
  • GitHub Check: tests-linux (18) / better-sqlite3
  • GitHub Check: tests-linux (18) / mssql
  • GitHub Check: tests-linux (18) / mongodb
  • GitHub Check: tests-linux (18) / mysql_mariadb_latest
  • GitHub Check: tests-windows / sqljs
  • GitHub Check: tests-windows / sqlite
  • GitHub Check: tests-windows / better-sqlite3
  • GitHub Check: Analyze (javascript-typescript)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 9, 2025

typeorm-sql-js-example

npm i https://pkg.pr.new/typeorm/typeorm@11754

commit: 6ccd4ed

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/driver/mysql/MysqlQueryRunner.ts (1)

2009-2018: Grammar: dropUniqueConstraints comment should be plural without article.

Use “Drops unique constraints.”

Apply this diff:

-    /**
-     * Drops a unique constraints.
-     */
+    /**
+     * Drops unique constraints.
+     */
src/driver/aurora-mysql/AuroraMysqlQueryRunner.ts (1)

1623-1628: Grammar: Fix "Drops a unique constraints." to "Drops unique constraints." across all driver query runners.

The sweep confirmed this grammar error exists in 5 locations across multiple driver implementations. Apply the same fix to all instances:

  • src/driver/aurora-mysql/AuroraMysqlQueryRunner.ts:1623
  • src/driver/sqlserver/SqlServerQueryRunner.ts:2314
  • src/driver/sap/SapQueryRunner.ts:2148
  • src/driver/mongodb/MongoQueryRunner.ts:998
  • src/driver/mysql/MysqlQueryRunner.ts:2009
-    /**
-     * Drops a unique constraints.
-     */
+    /**
+     * Drops unique constraints.
+     */
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3ac6053 and cc8ea32.

📒 Files selected for processing (13)
  • src/decorator/tree/TreeChildren.ts (1 hunks)
  • src/decorator/tree/TreeParent.ts (1 hunks)
  • src/driver/aurora-mysql/AuroraMysqlQueryRunner.ts (2 hunks)
  • src/driver/mongodb/MongoQueryRunner.ts (3 hunks)
  • src/driver/mongodb/typings.ts (1 hunks)
  • src/driver/mysql/MysqlQueryRunner.ts (2 hunks)
  • src/driver/oracle/OracleQueryRunner.ts (2 hunks)
  • src/driver/sap/SapQueryRunner.ts (1 hunks)
  • src/driver/spanner/SpannerQueryRunner.ts (1 hunks)
  • src/driver/sqlite-abstract/AbstractSqliteQueryRunner.ts (2 hunks)
  • src/driver/sqlserver/SqlServerQueryRunner.ts (1 hunks)
  • src/query-runner/QueryRunner.ts (1 hunks)
  • test/functional/entity-schema/uniques/uniques-basic.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-07-27T20:50:10.364Z
Learnt from: alumni
Repo: typeorm/typeorm PR: 11581
File: docs/docs/drivers/postgres.md:23-23
Timestamp: 2025-07-27T20:50:10.364Z
Learning: The correct data source type for Aurora PostgreSQL in TypeORM is `aurora-postgres`, not `aurora-data-api-pg`. The `aurora-data-api-pg` driver was renamed to `aurora-postgres` according to the CHANGELOG.md. This is defined in the DatabaseType union type and AuroraPostgresConnectionOptions interface.

Applied to files:

  • src/driver/aurora-mysql/AuroraMysqlQueryRunner.ts
📚 Learning: 2025-07-27T17:29:18.547Z
Learnt from: alumni
Repo: typeorm/typeorm PR: 11581
File: docs/docs/drivers/mongodb.md:9-13
Timestamp: 2025-07-27T17:29:18.547Z
Learning: TypeORM supports MongoDB driver versions "^5.8.0 || ^6.0.0" according to the peerDependencies in package.json. The v4 driver is NOT supported. Always check package.json for accurate peer dependency information.

Applied to files:

  • src/driver/mongodb/MongoQueryRunner.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: tests-windows / sqljs
  • GitHub Check: tests-windows / sqlite
  • GitHub Check: tests-windows / better-sqlite3
🔇 Additional comments (13)
src/driver/spanner/SpannerQueryRunner.ts (1)

1148-1149: JSDoc grammar fix looks good.

Clearer phrasing; no behavior change.

src/decorator/tree/TreeParent.ts (1)

7-9: Improved JSDoc article usage — OK

Reads well and accurately describes the decorator.

test/functional/entity-schema/uniques/uniques-basic.ts (1)

23-24: Test description change is benign

No functional impact; keeps intent clear.

src/driver/oracle/OracleQueryRunner.ts (1)

1904-1905: LGTM (singular form is correct).

“Drops a unique constraint.” matches the method and reads well.

src/driver/mongodb/typings.ts (1)

2757-2760: Grammar fix LGTM.

Docstring now reads naturally; no functional/type impact. One ask: this file is a copied upstream typing — confirm we're okay diverging here, or note that future upstream syncs won’t overwrite this edit.

src/driver/aurora-mysql/AuroraMysqlQueryRunner.ts (1)

1611-1616: LGTM: singular form fixed correctly.

src/query-runner/QueryRunner.ts (1)

388-394: LGTM: corrected article for singular case.

src/driver/mysql/MysqlQueryRunner.ts (1)

1997-2006: LGTM: singular form fixed correctly.

src/driver/sqlite-abstract/AbstractSqliteQueryRunner.ts (2)

864-864: LGTM!

The JSDoc comment for dropUniqueConstraint is clear and accurately describes the method behavior.


885-885: Grammar correction in JSDoc looks good.

The JSDoc for dropUniqueConstraints has been corrected to accurately describe the method (drops rather than creates). The fix addresses the typo mentioned in the PR objectives.

src/driver/mongodb/MongoQueryRunner.ts (3)

536-536: Consider minor grammar adjustment in JSDoc.

The reworded comment is clear but has a minor grammatical issue: "its single connection already created" should be "a single connection is already created" for better readability. However, since this is a documentation pass, the current phrasing is acceptable.


541-544: LGTM!

The JSDoc and inline comment for the release() method clearly explain that MongoDB maintains a single connection and doesn't support connection release operations. This is accurate and helpful documentation.


986-986: LGTM!

The JSDoc for dropUniqueConstraint is accurate. While the method throws an error (as MongoDB doesn't support schema operations), the documentation correctly describes what the operation would do if it were supported.

pkuczynski and others added 3 commits November 9, 2025 09:55
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@coveralls
Copy link

coveralls commented Nov 9, 2025

Coverage Status

coverage: 76.433%. remained the same
when pulling 01023f5 on pkuczynski:typos
into 3ac6053 on typeorm:master.

Copy link
Collaborator

@gioboa gioboa left a comment

Choose a reason for hiding this comment

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

Thanks for your help @pkuczynski

@michaelbromley michaelbromley merged commit 6381c8d into typeorm:master Nov 9, 2025
62 checks passed
ThbltLmr pushed a commit to ThbltLmr/typeorm that referenced this pull request Dec 2, 2025
mgohin pushed a commit to mgohin/typeorm that referenced this pull request Jan 15, 2026
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.

5 participants