Skip to content

Upgrade to BSON v6 #6561

@kraenhansen

Description

@kraenhansen

The public types emitted for bson.d.ts are wrong:

export declare namespace BSON {
    const ObjectId: typeof bson.ObjectID; // 👈 notice the capital D in ID
    type ObjectId = bson.ObjectId;
    const ObjectID: typeof bson.ObjectID;
    type ObjectID = bson.ObjectID;
    // ...
}

This is really weird since we're importing the right type from the namespace:

export const ObjectId = bson.ObjectId;
export type ObjectId = bson.ObjectId;
export const ObjectID = bson.ObjectID;
export type ObjectID = bson.ObjectID;

We should be able to upgrade to bson@6 by now and this will fix the issue since that has removed ObjectID (capital D) entirely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    First-Good-IssueFirst Good Issue - Relatively easy issue for new contributers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions