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: Remove webpack and webpack-cli dependencies #614

Merged

Conversation

Gudahtt
Copy link
Contributor

@Gudahtt Gudahtt commented May 14, 2024

Changes made in #597 accidentally resulted in webpack and webpack-cli being added as dependencies in the manifest of the published package. This problem can be seen in v0.11.0. For more information, see #604.

webpack and webpack-cli are used for bundler smoke tests that are run in CI. Rather than being installed during CI, these dependencies are now included in devDependencies. A new npm script has been added for running this script as well, to ensure that these dependencies are on the PATH when this script is run.

The CircleCI config and the contributor docs have been updated to use the new npm script. You can test it by running
npm run test-module-bundlers-smoketest.

Fixes #604

Changes made in mozilla#597 accidentally resulted in `webpack` and
`webpack-cli` being added as dependencies in the manifest of the
published package. This problem can be seen in v0.11.0. For more
information, see mozilla#604.

`webpack` and `webpack-cli` are used for bundler smoke tests that are
run in CI. Rather than being installed during CI, these dependencies
are now included in `devDependencies`. A new npm script has been added
for running this script as well, to ensure that these dependencies are
on the PATH when this script is run.

The CircleCI config and the contributor docs have been updated to use
the new npm script. You can test it by running
`npm run test-module-bundlers-smoketest`.

Fixes mozilla#604
Copy link

codecov bot commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.71%. Comparing base (89a7281) to head (789c249).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #614   +/-   ##
=======================================
  Coverage   90.71%   90.71%           
=======================================
  Files           1        1           
  Lines         140      140           
=======================================
  Hits          127      127           
  Misses         13       13           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Gudahtt Gudahtt marked this pull request as ready for review May 14, 2024 14:08
@@ -63,10 +63,7 @@ commands:
run_test_bundlers:
description: rerun unit tests on webpack and browserify bundled files
steps:
- run: npm install browserify webpack webpack-cli
Copy link
Member

Choose a reason for hiding this comment

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

The fix for the bug is to add --no-save here, as mentioned at #604 (comment)

@Rob--W Rob--W merged commit 08c7650 into mozilla:master May 14, 2024
3 checks passed
@Rob--W
Copy link
Member

Rob--W commented May 14, 2024

Thanks for the analysis and fix. Although --no-save could have fixed the issue, adding it to devDependencies signals more clearly that it is a potential dependency in any test. It would also make it easier to identify external regressions in the smoke tests, hence I merged this PR instead of adding a --no-save fix.

@Gudahtt
Copy link
Contributor Author

Gudahtt commented May 14, 2024

Thanks! Good point that --no-save would have been simpler, I forgot that flag existed. I prefer this fix for the same reasons you mentioned though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoiding listing WebPack as a production dependency
2 participants