[COMPASS-7131] Investigate changes in NODE-5040: Add color to BSON inspect functions Created: 21/Aug/23  Updated: 06/Nov/23  Resolved: 06/Nov/23

Status: Closed
Project: Compass
Component/s: None
Affects Version/s: None
Fix Version/s: No version

Type: Investigation Priority: Major - P3
Reporter: PM Bot Assignee: Unassigned
Resolution: Done Votes: 0
Labels: first-responder, node-driver
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on NODE-5040 Add color to BSON inspect functions Closed
Documentation Changes: Not Needed

 Description   

Use case

When printing out BSON values in Node.js they appear all one color. Node.js colors the various types of javascript values and we can harness that for BSON types.

POC: https://github.com/mongodb/js-bson/compare/main...feat/add-color

AC

  • Use Node.js stylize function in inspect methods
  • Ensure we fallback to an empty function in web environments
  • TBD


 Comments   
Comment by Le Roux Bodenstein [ 06/Nov/23 ]

Compass seems to already use colour when inspecting BSON types.

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