Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-2765

Upgrade to BSON v6

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintableJSON

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: None
    • Component/s: None

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

      Unable to find source-code formatter for language: typescript. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      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:

      https://github.com/realm/realm-js/blob/1e1e48a0f906d471b4a046168ed8cd628ef2d70f/packages/realm/src/bson.ts#L27-L30

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Archiver:
            marc.greenfield@mongodb.com Marc Greenfield

              Created:
              Updated:
              Resolved:
              Archived: