Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(NODE-4144): remove all symbol properties #4351

Merged
merged 4 commits into from
Dec 11, 2024
Merged

Conversation

nbbeeken
Copy link
Contributor

@nbbeeken nbbeeken commented Dec 10, 2024

Description

Similar to: #4133

What is changing?

  • Remove all symbol class properties in favor of private and internal marked string properties
Is there new documentation needed for these changes?

No

What is the motivation for this change?

Symbol class properties were introduced to the driver before we adopted typescript and API-extractor to clearly indicate the accessibility of driver APIs. The symbol properties provided implied privacy, making properties non-trivial to access. Today we have the power of typescript private/protected and API-extractor's type deletion feature for APIs marked internal. With these tools, we can remove symbol properties in favor of appropriately marked string properties. This makes debugging internals easier by making inspection and assertion far more simple.

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@nbbeeken nbbeeken changed the title refactor(WIP): remove all symbol properties refactor(NODE-4144): remove all symbol properties Dec 11, 2024
src/error.ts Outdated Show resolved Hide resolved
src/error.ts Outdated Show resolved Hide resolved
src/error.ts Outdated Show resolved Hide resolved
src/mongo_client.ts Show resolved Hide resolved
src/operations/operation.ts Show resolved Hide resolved
src/sdam/topology.ts Show resolved Hide resolved
src/sessions.ts Show resolved Hide resolved
src/sessions.ts Outdated Show resolved Hide resolved
@nbbeeken nbbeeken marked this pull request as ready for review December 11, 2024 16:40
@baileympearson baileympearson self-assigned this Dec 11, 2024
@baileympearson baileympearson added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Dec 11, 2024
src/change_stream.ts Outdated Show resolved Hide resolved
src/change_stream.ts Outdated Show resolved Hide resolved
src/cmap/connection_pool.ts Show resolved Hide resolved
src/encrypter.ts Outdated Show resolved Hide resolved
src/error.ts Outdated Show resolved Hide resolved
src/error.ts Outdated Show resolved Hide resolved
src/error.ts Outdated Show resolved Hide resolved
src/mongo_client.ts Show resolved Hide resolved
src/sessions.ts Outdated Show resolved Hide resolved
src/change_stream.ts Outdated Show resolved Hide resolved
baileympearson
baileympearson previously approved these changes Dec 11, 2024
@baileympearson baileympearson merged commit f6d7868 into main Dec 11, 2024
31 checks passed
@baileympearson baileympearson deleted the rm-symbols branch December 11, 2024 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Primary Review In Review with primary reviewer, not yet ready for team's eyes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants