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

fix(NODE-5048): webpack unable to bundle import with leading 'node:' #564

Merged
merged 2 commits into from Feb 16, 2023

Conversation

nbbeeken
Copy link
Contributor

Description

What is changing?

  • Remove 'node:' from crypto import
  • Change rollup plugin to also remove 'node:'
  • Added an example webpack config bundling bson
    • New evergreen task:
      • takes the current bson src
      • runs rollup and npm pack to get a tgz of lib
      • installs the tgz as a dependency of the webpack project
      • tries to build using webpack
  • Added webpack documentation to readme.md

What is the motivation for this change?

It may not be immediately clear what the workarounds are for making webpack compatible with BSON. So we're now integration testing and documenting the expected path.

Double check the following

  • Ran npm run 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 added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Feb 15, 2023
Copy link
Contributor

@baileympearson baileympearson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Just some comments about whether or not we document webpack support.

README.md Outdated Show resolved Hide resolved
@@ -0,0 +1,14 @@
# Webpack BSON setup example
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as before, I don't think we should officially document this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is documentation for us to know the flags changed from the default config

Co-authored-by: Bailey Pearson <bailey.pearson@mongodb.com>
@baileympearson baileympearson merged commit 3aed24a into main Feb 16, 2023
@baileympearson baileympearson deleted the NODE-5048-rm-crypto-bundle-testing branch February 16, 2023 18:09
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
2 participants