Skip to content

chore: CHARTS-10161 Update react-scripts to v5 #104

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

Merged
merged 4 commits into from
Feb 24, 2025

Conversation

khanguslee
Copy link
Collaborator

As per the dependabot alert in https://github.com/mongodb-js/charts-embed-sdk/security/dependabot/708 there was a high severity bug in the webpack-dev-middleware package that we were using. The only package that uses this is the react-scripts package. To update the underlying package, I followed these changelogs:

When updating 3 -> 4:

There seemed to be an update to css-loader causing the images not inside the /src directory to not be resolved. As per facebook/create-react-app#9870 I put the images inside the /src directory inside a new /images directory.

When updating 4-> 5:

Webpack was updated to v5 which meant a bunch of polyfills were no longer supplied by default. Since we are using react-scripts, we cannot directly update the webpack config. A workaround for this is to alias the npm packages to the corresponding browserify packages.

Test Steps

  1. Go to the timeline charts example
  2. npm install
  3. npm start
  4. Go to http://localhost:3000/

Copy link
Collaborator

@giulianocelani giulianocelani left a comment

Choose a reason for hiding this comment

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

LGTM 👍

* chore: Update chart examples to use parcel v2 package

* chore: Ignore new parcel cache directory

* chore: Update dashboard examples to use parcel v2 package

* chore: Update chart examples to use parcel v2.13.3 package

* chore: Update dashboard examples to use parcel v2.13.3 package
Copy link
Collaborator

@mongo-J mongo-J left a comment

Choose a reason for hiding this comment

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

LGTM, nice work 👍

@mongo-J mongo-J merged commit c0c5438 into master Feb 24, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants