mozilla / webextension-polyfill

A lightweight polyfill library for Promise-based WebExtension APIs in Chrome
Mozilla Public License 2.0
2.61k stars 210 forks source link

fix: Remove webpack and webpack-cli dependencies #614

Closed Gudahtt closed 1 month ago

Gudahtt commented 1 month ago

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

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Rob--W commented 1 month ago

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 commented 1 month ago

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.