[COMPASS-7124] Update `mongodb-schema` to work in browser environment without poly fills Created: 17/Aug/23  Updated: 06/Nov/23  Resolved: 30/Oct/23

Status: Closed
Project: Compass
Component/s: Schema, Tech debt
Affects Version/s: None
Fix Version/s: 1.41.0

Type: Task Priority: Major - P3
Reporter: Rhys Howell Assignee: Anna Henningsen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: COMPASS-7020
Story Points: 3
Documentation Changes: Not Needed
Sprint: Iteration Minmi, Iteration Nodosaurus

 Description   

In recent changes: https://github.com/mongodb-js/mongodb-schema/pull/183
We updated to use node `streams` instead of streams. This has the consequence that browsers won't be able to use it without having polyfills.

This ticket involves updating the stream usage to one that doesn't need polyfills. Let's also add a browser based test so this can't regress in future from other packages.



 Comments   
Comment by Githook User [ 06/Nov/23 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: chore(deps): bump mongodb-schema to 12.0.0 COMPASS-7124 (#5033)
Branch: beta-releases
https://github.com/mongodb-js/compass/commit/799870d761f4a95391672193f480b4effe6080fc

Comment by Githook User [ 01/Nov/23 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: chore(deps): bump mongodb-schema to 12.0.0 COMPASS-7124 (#5033)
Branch: bulk-update-modal
https://github.com/mongodb-js/compass/commit/799870d761f4a95391672193f480b4effe6080fc

Comment by Githook User [ 31/Oct/23 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: chore(deps): bump mongodb-schema to 12.0.0 COMPASS-7124 (#5033)
Branch: feature/COMPASS-7335
https://github.com/mongodb-js/compass/commit/799870d761f4a95391672193f480b4effe6080fc

Comment by Githook User [ 30/Oct/23 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: chore(deps): bump mongodb-schema to 12.0.0 COMPASS-7124 (#5033)
Branch: main
https://github.com/mongodb-js/compass/commit/799870d761f4a95391672193f480b4effe6080fc

Comment by Githook User [ 30/Oct/23 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna@addaleax.net', 'username': 'addaleax'}

Message: chore(deps): bump mongodb-schema to 12.0.0 COMPASS-7124
Branch: 7124-dev
https://github.com/mongodb-js/compass/commit/8148c706904304edd7fed4fd9a7cd152c4396896

Comment by Githook User [ 30/Oct/23 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna@addaleax.net', 'username': 'addaleax'}

Message: feat!: drop streams support COMPASS-7124 (#208)

We don't really need streams usage anymore and can just drop it. That's
an easy way to ensure that we don't have any dependencies that require
Node.js-specific builtins or polyfills of those.
Branch: main
https://github.com/mongodb-js/mongodb-schema/commit/773c684c57bd619c033b3a791b4cff50fd84483f

Comment by Githook User [ 30/Oct/23 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna@addaleax.net', 'username': 'addaleax'}

Message: feat!: drop streams support COMPASS-7124

We don't really need streams usage anymore and can just drop it. That's
an easy way to ensure that we don't have any dependencies that require
Node.js-specific builtins or polyfills of those.
Branch: 7124-dev
https://github.com/mongodb-js/mongodb-schema/commit/cfbf1a658431876e757a2906f9b32526d062f375

Comment by Anna Henningsen [ 18/Aug/23 ]

The comment that triggered this suggested using stream-browserify, but just a note, that package is only a wrapper around readable-stream with legacy handling. We shouldn’t need any legacy streams handling here and can just use readable-stream on its own.

Generated at Wed Feb 07 22:45:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.