Repository navigation
build(deps): declare terser-webpack-plugin as a dev dependency - #1794
Merged
Merged
Conversation
The plugin is only required by config/webpack.config.js. Listing it under dependencies made Dependabot classify webpack's toolchain, including webpack-dev-server, as runtime code. The installed dependency tree is unchanged.
Harry19081
added a commit
that referenced
this pull request
Sep 14, 2026
Resolve the pnpm-lock.yaml conflict with #1793 (drop the unused node-sass peer) and #1794 (move terser-webpack-plugin to devDependencies). Start from this branch's lockfile and reconcile it to develop's manifest with pnpm 9.15.4 `install --lockfile-only` (prefer-offline off). All 20 patched package versions are kept; the header and importers match develop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
terser-webpack-pluginsits independencies, but onlyconfig/webpack.config.jsrequires it. It never reaches the app bundle. Dependabot classifies alerts by whether a package is reachable fromdependencies, and this plugin's peerwebpackpulls inwebpack-cliandwebpack-dev-server. As a result, 15 open alerts in pure build and dev-server tooling are labeled runtime: fast-uri, browserslist, baseline-browser-mapping, qs, uuid, and ws.That hides the few alerts that really do ship in the desktop app. The only vulnerable runtime reachability left without this plugin is
@xmldom/xmldom(via mammoth),linkify-it, andprismjs.Solution
Move
terser-webpack-plugin(same^5.3.10specifier) fromdependenciestodevDependencies, next towebpackand the other build plugins. The lockfile change is limited to moving the same importer entry between the two blocks.packagesandsnapshotsare untouched, so every install resolves and links exactly the same tree.Potential risks
pnpm install --prodorNODE_ENV=production. No workflow, script, or config does that, and webpack itself is already a devDependency, so such an install could not build anyway.scripts/ci,scripts/quality,config/dependency-cruiser.cjs, andknip.json; none reads thedependencies/devDependenciessplit.pnpm-lock.yaml. This PR's hunks sit in the importer blocks, away from theirs, but a rebase conflict would be resolved withpnpm install --lockfile-only.Verification
pnpm install --lockfile-only(fresh registry metadata) produces only the 3-line importer move, and re-running it leaves the lockfile unchanged.packagesandsnapshotsare identical to develop, andpnpm install --frozen-lockfilesucceeds.pnpm why terser-webpack-pluginlists it under devDependencies. Recomputing reachability fromdependencieson the develop lockfile, the vulnerable runtime set shrinks to@xmldom/xmldom,linkify-it, andprismjs.package.json; no TypeScript or Rust was staged), but thePre-commit hook ran.trailer is not appended in a worktree.