Skip to content

Update dependency webpack to v5.107.0#2030

Open
red-hat-konflux[bot] wants to merge 1 commit into
release-4.19from
konflux/mintmaker/release-4.19/webpack-5.x
Open

Update dependency webpack to v5.107.0#2030
red-hat-konflux[bot] wants to merge 1 commit into
release-4.19from
konflux/mintmaker/release-4.19/webpack-5.x

Conversation

@red-hat-konflux
Copy link
Copy Markdown
Contributor

@red-hat-konflux red-hat-konflux Bot commented Jun 3, 2026

This PR contains the following updates:

Package Change Age Confidence
webpack 5.106.25.107.0 age confidence

Release Notes

webpack/webpack (webpack)

v5.107.0

Compare Source

Minor Changes
  • Add module.generator.javascript.anonymousDefaultExportName option to control whether webpack sets .name to "default" for anonymous default export functions and classes per ES spec. Defaults to true for applications and false for libraries (when output.library is set) to avoid unnecessary bundle size overhead. Also extract anonymous default export .name fix-up into a shared runtime helper (__webpack_require__.dn), replacing repeated inline Object.defineProperty / Object.getOwnPropertyDescriptor calls with a single short call per module to reduce output size. (by @​xiaoxiaojx in #​20894)

  • Support module concatenation (scope hoisting) for CSS modules with text, css-style-sheet, style, and link export types (by @​xiaoxiaojx in #​20851)

  • The generator.exportsConvention function form for CSS modules now accepts string[] in addition to string. (by @​alexander-akait in #​20914)

  • Add linkInsert hook to CssLoadingRuntimeModule.getCompilationHooks(compilation) so plugin developers can control where stylesheet <link> elements are inserted into the document. (by @​alexander-akait in #​20947)

  • Add CssModulesPlugin.getCompilationHooks(compilation).orderModules hook. (by @​alexander-akait in #​20978)

  • Add a pure parser option for css/module and css/auto types matching postcss-modules-local-by-default's pure mode: every selector must contain at least one local class or id, otherwise webpack emits a build error. (by @​alexander-akait in #​20946)

  • Support CSS Modules @value identifiers as @import URLs and inside url() functions, e.g. @value path: "./other.css"; @&#8203;import path; and @value bg: "./image.png"; .a { background: url(bg); } (by @​alexander-akait in #​20925)

  • Add experimental TypeScript support via experiments.typescript: true (auto-enabled by experiments.futureDefaults). Uses Node.js's built-in module.stripTypeScriptTypes (Node.js >= 22.6 with the stable mode: "strip" API, including Node.js 26) to transform .ts, .cts, .mts, data:text/typescript, and data:application/typescript modules — no type checking, only erasable TypeScript (types, generics, import type, casts). .tsx/JSX and non-erasable syntax (enum, namespace, parameter-property constructors, decorator metadata) are NOT supported; use a TSX-capable loader (e.g. ts-loader, swc-loader) for those. (by @​alexander-akait in #​20964)

  • Added an experiments.html flag that reserves the html module type for the first-class HTML entry-point support. (by @​aryanraj45 in #​20902)

  • Preserve defer / source import phase keywords on external dependencies in ESM output, the same way import attributes are preserved. (by @​alexander-akait in #​20934)

  • Support the #__NO_SIDE_EFFECTS__ annotation to mark functions as pure for better tree-shaking. (by @​hai-x in #​20775)

  • Add module.generator.html.extract for HTML modules and the matching output.htmlFilename / output.htmlChunkFilename filename templates (defaults derived from output.filename / output.chunkFilename with .js swapped for .html, mirroring the CSS pipeline). When extraction is on, the parsed and URL-rewritten HTML is emitted as a standalone .html output file alongside the module's JavaScript export. (by @​alexander-akait in #​20979)

  • Add "module-sync" to default conditionNames for resolver defaults to align with Node.js, which exposes the module-sync community condition for synchronously-loadable ESM. (by @​alexander-akait in #​20933)

Patch Changes
  • Fix CSS modules composes so composes: foo from "./self.module.css" from inside self.module.css no longer creates a duplicate module instance. Fix CSS modules composes parsing so local() and global() function wrappers are tracked per class name. Fix CSS modules composes: ... from "<file>" so the composed files load in an order consistent with every rule's local composes order, instead of source first-appearance order. (by @​alexander-akait in #​20929)

  • Avoid emitting the __webpack_require__ runtime in CSS bundles when all imported CSS modules were concatenated into the same scope. (by @​alexander-akait in #​20936)

  • Recompute the CSS chunk's [contenthash] and the rendered CSS bytes when an asset referenced by url()/src()/string in CSS changes its hashed filename. (by @​alexander-akait in #​20938)

  • Embed an inline sourceMappingURL data URI inside the CSS when the parser.exportType option are text, style, or css-style-sheet. Also merge @imported CSS at build time for text and css-style-sheet exportTypes so the bundle ships a single accurate inline source map covering every contributing file. Map each generated CSS-module class export line in the JS bundle back to its selector position in the original CSS file (e.g. btn: "...".btn { ... }). (by @​alexander-akait in #​20886)

  • Fix CSS modules deduplication so a .module.<ext> file imported both directly (JS) and via icss (composes from / :import) becomes a single module instance. (by @​alexander-akait in #​20929)

  • Preserve @charset at-rule when CSS modules use exportType: "text". (by @​alexander-akait in #​20912)

  • Resolve [hash]/[fullhash] placeholders in output.publicPath when generating url() references for experiments.css. (by @​alexander-akait in #​20879)

  • Fix HMR for concatenated CSS modules with style exportType by using stable per-module identifiers for injected style elements and tracking inner module IDs of concatenated modules in HMR records (by @​xiaoxiaojx in #​20911)

  • Fix CSS Modules @value resolution when the same local name is imported from multiple modules. (by @​alexander-akait in #​20940)

  • Fix typeof ns.default / ns.default instanceof X on a static import defer * as ns from "./mod" for default-only and default-with-named external modules under optimization.concatenateModules. The concatenated-module rewrite was collapsing ns.default to the deferred-namespace proxy itself instead of routing through the optimized .a getter (which lazily evaluates the module and returns its default value), so typeof ns.default observed "object" (the proxy) rather than the type of the default. The dynamic exportsType already used .a correctly; default-only and default-with-named now match. (by @​alexander-akait in #​20910)

  • Make import defer * as ns more spec-compliant: ns.x = value no longer triggers module evaluation (per the TC39 import-defer [[Set]] algorithm), and the deferred namespace is now a distinct object from the eager namespace, with the same Deferred Module Namespace Exotic Object shared across defer-import call sites for the same module. (by @​alexander-akait in #​20913)

  • Fixed spec deviations in the deferred namespace object returned by __webpack_require__.z (import defer * as ns / import.defer(...)). (by @​alexander-akait in #​20910)

  • Drop the __webpack_require__, __webpack_require__.d, and __webpack_require__.o runtime helpers from library: { type: "module" } bundles when the on-demand exports source they were emitted for ends up dropped (e.g. a single concatenated entry without an IIFE). (by @​alexander-akait in #​20901)

  • Resolve the static specifier of a dynamic import() whose argument is a side-effect-free SequenceExpression, e.g. import((1, 0, "./mod.js")) is now treated the same as import("./mod.js") instead of being rejected as unresolvable. (by @​alexander-akait in #​20917)

  • Stable shared module ids and runtime-chunk emission order. (by @​imccausl in #​20860)

  • Fix snapshot validity check for context dependencies in watch mode by treating watchpack's existence-only entries ({}) as cache misses. (by @​alexander-akait in #​20916)

  • Support no-expression template literals in computed member access (e.g. import.meta[`url`]). (by @​alexander-akait in #​20889)

  • Improve tree-shaking in isPure: handle more expression types (ArrayExpression, ObjectExpression, NewExpression, ChainExpression, UnaryExpression (safe operators), MetaProperty, TaggedTemplateExpression, BinaryExpression (strict equality)), prevent /*#__PURE__*/ comments from leaking across ObjectExpression properties, and detect PURE comments inside TemplateLiteral interpolations. (by @​alexander-akait in #​20723)

  • Reject new import.defer(...) and new import.source(...) as a parse-time SyntaxError, matching the spec — ImportCall is a CallExpression and is not a valid operand of new. Parenthesized forms (new (import.defer(...))) remain valid and continue to throw TypeError at runtime as before. (by @​alexander-akait in #​20917)

  • Escape # characters that appear inside a path-shaped request's directory portion before passing the request to the resolver, so projects located in directories like /home/user/proj#1 (and tools like webpack-dev-server that build entry requests with query strings) resolve correctly. The escape only kicks in when the request contains both a # in the path portion and a ? query string — paths without a query keep their existing semantics. (by @​alexander-akait in #​20980)

  • Silence unhandled rejection from the prefetch trigger when chunk loading fails. The ensureChunkHandlers.prefetch runtime created Promise.all(promises).then(...) whose result is discarded by __webpack_require__.e. If chunk loading rejected (e.g. chunkLoadTimeout), that dangling chain produced an unhandled rejection. Prefetch is best-effort, so a no-op rejection handler is now attached. (by @​alexander-akait in #​20898)

  • Align require() of an ES module with Node.js's require(esm) "module.exports" named-export convention. When CommonJS require() resolves to an ES module that exports a binding with the literal string name "module.exports" (e.g. export { value as "module.exports" }), require() now returns the value of that export instead of the module's namespace object — matching Node.js v22.12+/v23+ behavior and easing migration of dual ESM/CJS libraries that rely on module.exports = …. The unwrap applies to plain require(), require().foo, calls (require()(…)), destructuring, and to CJS wrappers like module.exports = require(esm) / exports.x = require(esm). (by @​alexander-akait in #​20981)

  • Remove outdated @types/eslint-scope package from dependencies. (by @​alexander-akait in #​20869)

  • Fix export * resolution when a star-reexported module re-exports a name back to the importer cyclically. Previously, in a graph where a does export * from "./b"; export * from "./c"; and b does export { foo } from "./a"; while c provides the actual foo binding, webpack hoisted foo from b into a's namespace without per-name cycle detection — emitting a getter chain (a.foob.fooa.foo) that threw "Maximum call stack size exceeded" at runtime. The TC39 ResolveExport algorithm requires the cyclic branch to return null and the star loop to fall through to the non-cyclic source. (by @​alexander-akait in #​20959)

  • Preserve using declaration initializers when the inner graph optimization is enabled. (by @​hai-x in #​20906)

  • Fixed typescript types. (by @​alexander-akait in #​20880)

  • Bump webpack-sources to ^3.4.1 and feed asset bytes into hashes via the new Source.prototype.buffers() API. For large ConcatSource/ReplaceSource outputs this avoids the intermediate Buffer.concat that source.buffer() performs, removing a peak-memory spike equal to the source's total size on each hashed asset (AssetGenerator.getFullContentHash, CssIcssExportDependency content hashing, and RealContentHashPlugin). A small benchmark on a 64 MiB ConcatSource shows ~64 MiB lower peak external memory and ~45% faster hashing. (by @​alexander-akait in #​20897)


Configuration

📅 Schedule: Branch creation - Every minute ( * * * * * ) in timezone UTC, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

To execute skipped test pipelines write comment /ok-to-test.


Documentation

Find out how to configure dependency updates in MintMaker documentation or see all available configuration options in Renovate documentation.

Summary by CodeRabbit

  • Chores
    • Updated development tool dependencies to latest minor version.

Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 3, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: fb4720bc-8bba-476c-9ef6-50e426ed9655

📥 Commits

Reviewing files that changed from the base of the PR and between 09c6a7f and c4d873a.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • package.json

📝 Walkthrough

Walkthrough

Webpack dev dependency version incremented from 5.106.2 to 5.107.0 in package.json. This is a straightforward patch-level dependency update with no configuration, script, or other dependency changes.

Changes

Webpack Version Bump

Layer / File(s) Summary
Webpack version increment
package.json
Webpack dependency updated from version 5.106.2 to 5.107.0.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested labels

lgtm, approved

Suggested reviewers

  • syedriko
  • xrajesh

Poem

🐰 A webpack so nimble, so sprightly and spry,
From five-point-one-oh-six it takes to the sky!
Point one-zero-seven, a hop and a bound,
Bundle with vigor—no errors around!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: updating the webpack dependency to v5.107.0, which is the sole modification in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch konflux/mintmaker/release-4.19/webpack-5.x

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci Bot requested review from kyoto and xrajesh June 3, 2026 12:17
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Jun 3, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kyoto for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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.

0 participants