Skip to content

Update lock file (npm audit fix)#3510

Merged
swissspidy merged 3 commits into
v7from
chore/update-lock-file
May 4, 2026
Merged

Update lock file (npm audit fix)#3510
swissspidy merged 3 commits into
v7from
chore/update-lock-file

Conversation

@swissspidy
Copy link
Copy Markdown
Collaborator

@swissspidy swissspidy commented May 4, 2026

For release preparation.

Updates a test as well:

After running npm audit fix , the following key dependencies were updated:

• webpack from 5.95.0 to 5.106.2
• terser-webpack-plugin from 5.3.10 to 5.5.0
• terser from 5.30.3 to 5.46.2

In the failing test should produce valid JavaScript when eval-cheap-source-map and minimization are used , devtool is set to eval-cheap-source-map and minimize
is
true . Under this setting, modules are bundled and wrapped in eval("...") statements.

Previously, the compilation produced 4 files:

  1. service-worker.js
  2. service-worker.js.LICENSE.txt (extracted comments from service-worker.js )
  3. webpackEntry.js
  4. webpackEntry.js.LICENSE.txt (extracted comments from webpackEntry.js )

However, in the newer version of Terser / terser-webpack-plugin , the comments inside the eval(...) strings are correctly ignored during comment extraction (since
they
are inside a string literal rather than top-level code comments in the chunk). Consequently, webpackEntry.js.LICENSE.txt is no longer created, resulting in exactly 3
files.

This is standard, correct, and expected behavior for the updated webpack and terser versions.

The Solution

I updated the assertion in the test suite under inject-manifest.js#L825-L830 to reflect the correct file count:

           const files = await globby('**', {cwd: outputDir});
-          expect(files).to.have.length(4);
+          expect(files).to.have.length(3);

@swissspidy swissspidy merged commit b6b696c into v7 May 4, 2026
6 checks passed
@swissspidy swissspidy deleted the chore/update-lock-file branch May 4, 2026 18:25
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.

1 participant