Skip to content

fix: handle watchpack existence-only timestamp entries#20916

Merged
alexander-akait merged 5 commits into
mainfrom
claude/fix-issue-16886-nV4hO
May 6, 2026
Merged

fix: handle watchpack existence-only timestamp entries#20916
alexander-akait merged 5 commits into
mainfrom
claude/fix-issue-16886-nV4hO

Conversation

@alexander-akait

Copy link
Copy Markdown
Member

addFileTimestamps and addContextTimestamps accept watchpack-style
ExistenceOnlyTimeEntry ({}) values, but the cache types previously
narrowed away that variant via cast. Downstream code then treated {}
as a fully-populated timestamp, so snapshot validity checks compared
"no info" against snapshots that do have a timestamp / timestampHash
and falsely invalidated the snapshot — most visibly causing loaders that
call addContextDependency to rerun once after the first change.

FileTimestamp and ContextTimestamp now include ExistenceOnlyTimeEntry,
the lying casts in the add* methods are gone, and every cache lookup
uses an isExistenceOnly check to fall back to a fresh on-disk read
when the cached entry is {} or otherwise lacks data the snapshot
expects (e.g. { safeTime } without a timestampHash).

Adds:

  • test/watchCases/context/loader-context-dep-no-rerun/ end-to-end
    reproduction.
  • FileSystemInfo unit tests covering addFileTimestamps /
    addContextTimestamps with {} and { safeTime } entries, both for
    snapshot validity and for getFileTimestamp / getContextTimestamp.

Closes #16886

https://claude.ai/code/session_013yfLZ8H2qzN2Ya61m3rN3P

`addFileTimestamps` and `addContextTimestamps` accept watchpack-style
`ExistenceOnlyTimeEntry` (`{}`) values, but the cache types previously
narrowed away that variant via cast. Downstream code then treated `{}`
as a fully-populated timestamp, so snapshot validity checks compared
"no info" against snapshots that do have a `timestamp` / `timestampHash`
and falsely invalidated the snapshot — most visibly causing loaders that
call `addContextDependency` to rerun once after the first change.

`FileTimestamp` and `ContextTimestamp` now include `ExistenceOnlyTimeEntry`,
the lying casts in the `add*` methods are gone, and every cache lookup
uses an `isExistenceOnly` check to fall back to a fresh on-disk read
when the cached entry is `{}` or otherwise lacks data the snapshot
expects (e.g. `{ safeTime }` without a `timestampHash`).

Adds:
- `test/watchCases/context/loader-context-dep-no-rerun/` end-to-end
  reproduction.
- `FileSystemInfo` unit tests covering `addFileTimestamps` /
  `addContextTimestamps` with `{}` and `{ safeTime }` entries, both for
  snapshot validity and for `getFileTimestamp` / `getContextTimestamp`.

Closes #16886

https://claude.ai/code/session_013yfLZ8H2qzN2Ya61m3rN3P
Adds three new watch cases and extends the existing one:

- `loader-context-dep-no-rerun` now also covers a real dir change after
  the fix has been kicking in (loader must re-run) and a follow-up
  unrelated edit (loader must stay cached) — guards against the fix
  over-suppressing legitimate invalidations.
- `loader-file-dep-no-rerun` mirrors the scenario for `addDependency` on
  a single file, exercising the file-side `_fileTimestamps` cache.
- `loader-context-dep-multi` runs two loaders, each with its own
  `addContextDependency`, and asserts that a change inside one dir
  re-runs only the matching loader, while an unrelated edit re-runs
  neither.
- `loader-context-dep-add-delete` covers add/delete inside the watched
  dir and an unrelated edit between them.

https://claude.ai/code/session_013yfLZ8H2qzN2Ya61m3rN3P
`addMissingDependency` records files/directories that don't exist yet but
should be watched. When watchpack later populates `_fileTimestamps` with
an `ExistenceOnlyTimeEntry` (`{}`) for such a path, the snapshot create
and check sites used `Boolean(cache)` directly — which is `true` for
`{}` even though the path does not actually exist — and falsely flipped
the `existence` value, invalidating the snapshot.

Both the snapshot CREATE and CHECK paths for `missingExistence` now
treat existence-only entries as a cache miss and re-stat the file,
matching the behavior already applied elsewhere.

Adds:
- `test/watchCases/context/loader-missing-dep/` covering an
  `addMissingDependency` loader across an unrelated edit, the missing
  path being created, and another unrelated edit.
- Two unit tests in `FileSystemInfo.unittest.js`: snapshot stays valid
  when watchpack reports `{}` for a still-missing dep, and is correctly
  invalidated when the missing path actually appears.

https://claude.ai/code/session_013yfLZ8H2qzN2Ya61m3rN3P
Copilot AI review requested due to automatic review settings May 5, 2026 21:51
@changeset-bot

changeset-bot Bot commented May 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9bf94d1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
webpack Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

This PR is packaged and the instant preview is available (cb824e5).

Install it locally:

  • npm
npm i -D webpack@https://pkg.pr.new/webpack@cb824e5
  • yarn
yarn add -D webpack@https://pkg.pr.new/webpack@cb824e5
  • pnpm
pnpm add -D webpack@https://pkg.pr.new/webpack@cb824e5

@codecov

codecov Bot commented May 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.90698% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.35%. Comparing base (b6f54d9) to head (9bf94d1).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
lib/FileSystemInfo.js 77.90% 19 Missing ⚠️

❌ Your patch check has failed because the patch coverage (77.90%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #20916      +/-   ##
==========================================
- Coverage   91.37%   91.35%   -0.02%     
==========================================
  Files         563      566       +3     
  Lines       55822    56001     +179     
  Branches    14788    14866      +78     
==========================================
+ Hits        51006    51160     +154     
- Misses       4816     4841      +25     
Flag Coverage Δ
integration 90.30% <75.58%> (-0.02%) ⬇️
test262 45.81% <20.93%> (-0.07%) ⬇️
unit 36.22% <75.58%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes watch-mode snapshot invalidation when watchpack provides partial timestamp entries (notably existence-only {}), which previously caused context-dependent loaders to spuriously rerun once after the first change. The PR updates FileSystemInfo cache typing/lookup behavior to treat such entries as “no usable info” and fall back to on-disk reads, and adds both unit and end-to-end watch case coverage for the regression.

Changes:

  • Extend FileTimestamp/ContextTimestamp handling to include watchpack existence-only entries and bypass them during cache lookups and snapshot validity checks.
  • Add FileSystemInfo unit tests covering {} and { safeTime } watchpack entries for snapshot validity and timestamp getters.
  • Add new watch-mode end-to-end repro cases for addContextDependency, plus related dependency-watch scenarios.

Reviewed changes

Copilot reviewed 39 out of 39 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.changeset/fix-context-dependency-rerun-watch-mode.md Patch changeset describing the watchpack existence-only entry fix and user-visible impact.
lib/FileSystemInfo.js Core fix: accept {} in timestamp caches and treat existence-only / insufficient entries as cache misses during snapshotting and validation.
test/FileSystemInfo.unittest.js Adds unit tests to ensure {} / { safeTime } watchpack entries don’t falsely invalidate snapshots and that getters fall back to disk.
test/watchCases/context/loader-context-dep-add-delete/0/directory/a.txt Seed context directory contents for add/delete watch case.
test/watchCases/context/loader-context-dep-add-delete/0/index.js Watch e2e assertions for add/delete inside context dir vs unrelated edits.
test/watchCases/context/loader-context-dep-add-delete/0/loader.js Loader using addContextDependency and directory read to observe dir contents.
test/watchCases/context/loader-context-dep-add-delete/0/unrelated.js Unrelated module used to trigger rebuilds without touching the context dir.
test/watchCases/context/loader-context-dep-add-delete/1/directory/b.txt Step file added to the watched directory to trigger invalidation.
test/watchCases/context/loader-context-dep-add-delete/2/unrelated.js Step-only unrelated edit to ensure no spurious rerun.
test/watchCases/context/loader-context-dep-add-delete/3/directory/b.txt Step deletion marker (DELETE) to remove b.txt and trigger invalidation.
test/watchCases/context/loader-context-dep-multi/0/dir-a/seed-a.txt Seed file for loader A watched directory.
test/watchCases/context/loader-context-dep-multi/0/dir-b/seed-b.txt Seed file for loader B watched directory.
test/watchCases/context/loader-context-dep-multi/0/index.js Watch e2e assertions that only the loader whose context dir changed reruns.
test/watchCases/context/loader-context-dep-multi/0/loader-a.js Loader A: addContextDependency on dir-a.
test/watchCases/context/loader-context-dep-multi/0/loader-b.js Loader B: addContextDependency on dir-b.
test/watchCases/context/loader-context-dep-multi/0/unrelated.js Unrelated module used to trigger rebuilds without touching either watched dir.
test/watchCases/context/loader-context-dep-multi/1/dir-a/added.txt Step change inside dir-a to trigger only loader A rerun.
test/watchCases/context/loader-context-dep-multi/2/dir-b/added.txt Step change inside dir-b to trigger only loader B rerun.
test/watchCases/context/loader-context-dep-multi/3/unrelated.js Step-only unrelated edit to ensure neither loader reruns.
test/watchCases/context/loader-context-dep-no-rerun/0/directory/a.txt Seed file for single watched directory.
test/watchCases/context/loader-context-dep-no-rerun/0/index.js Watch e2e assertions that unrelated edits don’t rerun an addContextDependency loader.
test/watchCases/context/loader-context-dep-no-rerun/0/loader.js Loader: addContextDependency on directory/.
test/watchCases/context/loader-context-dep-no-rerun/0/unrelated.js Unrelated module used to trigger rebuilds without touching the context dir.
test/watchCases/context/loader-context-dep-no-rerun/1/unrelated.js Step-only unrelated edit to ensure loader output is cached.
test/watchCases/context/loader-context-dep-no-rerun/2/unrelated.js Step-only unrelated edit to ensure loader output is cached.
test/watchCases/context/loader-context-dep-no-rerun/3/directory/b.txt Step adds a file inside watched dir to trigger loader invalidation.
test/watchCases/context/loader-context-dep-no-rerun/4/unrelated.js Step-only unrelated edit after real change to ensure loader stays cached.
test/watchCases/context/loader-file-dep-no-rerun/0/index.js Watch e2e assertions for addDependency only rerunning when tracked file changes.
test/watchCases/context/loader-file-dep-no-rerun/0/loader.js Loader: addDependency on a specific file.
test/watchCases/context/loader-file-dep-no-rerun/0/tracked.txt Initial tracked file contents.
test/watchCases/context/loader-file-dep-no-rerun/0/unrelated.js Unrelated module used to trigger rebuilds without touching tracked file.
test/watchCases/context/loader-file-dep-no-rerun/1/unrelated.js Step-only unrelated edit to ensure loader output is cached.
test/watchCases/context/loader-file-dep-no-rerun/2/tracked.txt Step changes tracked file contents to force loader rerun.
test/watchCases/context/loader-missing-dep/0/index.js Watch e2e assertions for addMissingDependency invalidating only when the missing path appears.
test/watchCases/context/loader-missing-dep/0/loader.js Loader: addMissingDependency on a file that appears in a later step.
test/watchCases/context/loader-missing-dep/0/unrelated.js Unrelated module used to trigger rebuilds without touching the missing path.
test/watchCases/context/loader-missing-dep/1/unrelated.js Step-only unrelated edit to ensure loader output is cached while target is still missing.
test/watchCases/context/loader-missing-dep/2/future.json Step creates previously-missing dependency file.
test/watchCases/context/loader-missing-dep/3/unrelated.js Step-only unrelated edit to ensure loader stays cached after the missing file exists.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/FileSystemInfo.js Outdated
Comment on lines 2718 to 2723
if (cacheUsable) {
this._resolveContextTimestamp(
/** @type {ContextFileSystemInfoEntry} */
(cache),
(fullCache),
callback
);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in a727318. Updated the callback param JSDoc to ResolvedContextTimestamp and the cast on the snapshot store to ResolvedContextFileSystemInfoEntry | null.


Generated by Claude Code

Comment thread lib/FileSystemInfo.js Outdated
Comment on lines 2681 to 2693
const cacheUsable = cache !== undefined && !isExistenceOnly(cache);
const fullCache =
/** @type {ContextFileSystemInfoEntry | null | undefined} */ (
cacheUsable ? cache : undefined
);
if (
cache !== undefined &&
(resolved = getResolvedTimestamp(cache)) !== undefined
cacheUsable &&
(resolved = getResolvedTimestamp(
/** @type {ContextFileSystemInfoEntry | null} */ (fullCache)
)) !== undefined
) {
contextTimestamps.set(path, resolved);
} else {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good catch — fixed in a727318. The CREATE path now also detects usableCache.timestampHash === undefined (mirroring the cacheLacksHash logic on the CHECK path) and routes those entries through _readFreshContextTimestamp so the snapshot always stores a complete entry. Added a unit test (snapshot creation re-reads disk when cache for a context dir lacks timestampHash) that pre-populates the cache with { safeTime: 1 } and asserts the resulting snapshot has a timestampHash.


Generated by Claude Code

@codspeed-hq

codspeed-hq Bot commented May 5, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 57.45%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 5 improved benchmarks
❌ 8 regressed benchmarks
✅ 131 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Memory benchmark "devtool-eval", scenario '{"name":"mode-development","mode":"development"}' 599.4 KB 845.8 KB -29.14%
Memory benchmark "side-effects-reexport", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 1,542.1 KB 850.7 KB +81.27%
Memory benchmark "devtool-eval-source-map", scenario '{"name":"mode-development","mode":"development"}' 1,399.3 KB 1,020.5 KB +37.12%
Memory benchmark "asset-modules-inline", scenario '{"name":"mode-development","mode":"development"}' 2.1 MB 2.7 MB -23.59%
Memory benchmark "concatenate-modules", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 177.3 KB 253.5 KB -30.05%
Memory benchmark "json-modules", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 292.2 KB 185.8 KB +57.26%
Memory benchmark "asset-modules-source", scenario '{"name":"mode-development","mode":"development"}' 4,722.5 KB 565 KB ×8.4
Memory benchmark "devtool-eval-source-map", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 857.3 KB 282.4 KB ×3
Memory benchmark "react", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 170.3 KB 239.1 KB -28.75%
Memory benchmark "asset-modules-source", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 156.8 KB 368.6 KB -57.45%
Memory benchmark "concatenate-modules", scenario '{"name":"mode-development","mode":"development"}' 552.7 KB 756.3 KB -26.92%
Memory benchmark "three-long", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 858.3 KB 1,143.8 KB -24.96%
Memory benchmark "future-defaults", scenario '{"name":"mode-development","mode":"development"}' 1.4 MB 1.8 MB -26.28%

Comparing claude/fix-issue-16886-nV4hO (9bf94d1) with main (ead3dc9)

Open in CodSpeed

…Hash

Addresses two issues flagged in PR review on the snapshot CREATE path
for context timestamps:

1. The intermediate callback was typed as `FileTimestamp` /
   `FileSystemInfoEntry` even though it operates on context entries.
   Updated to `ResolvedContextTimestamp` /
   `ResolvedContextFileSystemInfoEntry`.
2. `cacheUsable` only filtered out existence-only (`{}`) entries. A
   `{ safeTime }` cache entry without `timestampHash` was passed
   through `getResolvedTimestamp` and stored directly into the
   snapshot, defeating directory-change detection because future
   snapshot validity relies on `timestampHash`. The CREATE path now
   detects `usableCache.timestampHash === undefined` and routes those
   paths through `_readFreshContextTimestamp`, mirroring the CHECK
   site.

Also adds a unit test that pre-populates the cache with `{ safeTime }`
and asserts the resulting snapshot stores a complete entry with
`timestampHash`.

https://claude.ai/code/session_013yfLZ8H2qzN2Ya61m3rN3P

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 39 out of 39 changed files in this pull request and generated 1 comment.

Comment on lines +8 to +15
this.fs.stat(target, (_err, stat) => {
callback(
null,
`module.exports = ${JSON.stringify({
exists: Boolean(stat),
random: Math.random()
})};`
);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 9bf94d1. The loader now forwards non-ENOENT errors via callback(err) and only treats ENOENT (and the success path) as the "missing or stat'd" cases.


Generated by Claude Code

- Regenerate `types.d.ts` after the `FileTimestamp` / `ContextTimestamp`
  union changes (caught by `lint:special`).
- Narrow `getFileTimestamp` callback typing to
  `FileSystemInfoEntry | "ignore" | null` since existence-only entries
  are filtered before the callback fires.
- Fix the `loader-missing-dep` watch loader to forward non-ENOENT
  filesystem errors instead of silently treating every error as
  "missing" (caught by Copilot review on a727318).

https://claude.ai/code/session_013yfLZ8H2qzN2Ya61m3rN3P
@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

Types Coverage

Coverage after merging claude/fix-issue-16886-nV4hO into main will be
98.92%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
bin
   webpack.js98.77%100%100%98.77%91
examples
   build-common.js100%100%100%100%
   buildAll.js100%100%100%100%
   examples.js100%100%100%100%
   template-common.js98.21%100%100%98.21%72
examples/custom-javascript-parser
   test.filter.js100%100%100%100%
examples/custom-javascript-parser/internals
   acorn-parse.js100%100%100%100%
   meriyah-parse.js100%100%100%100%
   oxc-parse.js91.30%100%100%91.30%140, 142–143, 145, 147, 153–154, 161, 168, 90
examples/markdown
   webpack.config.mjs100%100%100%100%
examples/typescript
   test.filter.js50%100%100%50%5
examples/virtual-modules
   test.filter.js100%100%100%100%
examples/wasm-bindgen-esm
   test.filter.js100%100%100%100%
examples/wasm-complex
   test.filter.js100%100%100%100%
examples/wasm-simple
   test.filter.js100%100%100%100%
examples/wasm-simple-source-phase
   test.filter.js100%100%100%100%
lib
   APIPlugin.js100%100%100%100%
   AsyncDependenciesBlock.js100%100%100%100%
   AutomaticPrefetchPlugin.js100%100%100%100%
   BannerPlugin.js100%100%100%100%
   Cache.js98.21%100%100%98.21%101
   CacheFacade.js100%100%100%100%
   Chunk.js99.72%100%100%99.72%37
   ChunkGraph.js100%100%100%100%
   ChunkGroup.js100%100%100%100%
   ChunkTemplate.js100%100%100%100%
   CleanPlugin.js98.72%100%100%98.72%206, 226, 382
   CodeGenerationResults.js100%100%100%100%
   CompatibilityPlugin.js100%100%100%100%
   Compilation.js98.55%100%100%98.55%1554, 1850, 1857, 1865, 1887, 2783, 3208, 3870, 3899, 3952–3953, 3957, 3962, 3978–3979, 3993–3994, 3999–4000, 4477, 4503, 493, 498, 5211, 5292, 5307, 5332–5333, 5335, 5659, 5664, 5670, 5673, 5685, 5687, 5691, 5707, 5722, 5754, 5808, 5832, 5946, 712–713
   Compiler.js99.55%100%100%99.55%1116–1117, 1125
   ConcatenationScope.js98.59%100%100%98.59%189
   ConditionalInitFragment.js100%100%100%100%
   ConstPlugin.js100%100%100%100%
   ContextExclusionPlugin.js100%100%100%100%
   ContextModule.js100%100%100%100%
   ContextModuleFactory.js97.75%100%100%97.75%258, 393, 418, 443, 447, 458
   ContextReplacementPlugin.js100%100%100%100%
   DefinePlugin.js98.92%100%100%98.92%158–159, 175, 194, 268
   DependenciesBlock.js100%100%100%100%
   Dependency.js98.20%100%100%98.20%379, 425
   DependencyTemplate.js100%100%100%100%
   DependencyTemplates.js100%100%100%100%
   DotenvPlugin.js97.88%100%100%97.88%237, 378, 391–392
   DynamicEntryPlugin.js100%100%100%100%
   EntryOptionPlugin.js100%100%100%100%
   EntryPlugin.js100%100%100%100%
   Entrypoint.js100%100%100%100%
   EnvironmentPlugin.js97.14%100%100%97.14%49
   ErrorHelpers.js100%100%100%100%
   EvalDevToolModulePlugin.js100%100%100%100%
   EvalSourceMapDevToolPlugin.js100%100%100%100%
   ExportsInfo.js100%100%100%100%
   ExportsInfoApiPlugin.js100%100%100%100%
   ExternalModule.js98.89%100%100%98.89%399–403, 542
   ExternalModuleFactoryPlugin.js100%100%100%100%
   ExternalsPlugin.js100%100%100%100%
   FileSystemInfo.js99.50%100%100%99.50%182, 2252–2253, 2256, 2267, 2278, 2289, 278, 3694, 3709, 3733
   FlagAllModulesAsUsedPlugin.js100%100%100%100%
   FlagDependencyExportsPlugin.js98.74%100%100%98.74%399, 401, 405
   FlagDependencyUsagePlugin.js100%100%100%100%
   FlagEntryExportAsUsedPlugin.js100%100%100%100%
   Generator.js100%100%100%100%
   HotModuleReplacementPlugin.js100%100%100%100%
   HotUpdateChunk.js100%100%100%100%
   IgnorePlugin.js100%100%100%100%
   IgnoreWarningsPlugin.js100%100%100%100%
   InitFragment.js100%100%100%100%
   JavascriptMetaInfoPlugin.js100%100%100%100%
   LibraryTemplatePlugin.js100%100%100%100%
   LoaderOptionsPlugin.js100%100%100%100%
   LoaderTargetPlugin.js100%100%100%100%
   MainTemplate.js100%100%100%100%
   ManifestPlugin.js100%100%100%100%
   Module.js98.50%100%100%98.50%1304, 1309, 1370, 1384, 1446, 1455
   ModuleFactory.js100%100%100%100%
   ModuleFilenameHelpers.js98.85%100%100%98.85%106, 108
   ModuleGraph.js99.73%100%100%99.73%1004
   ModuleGraphConnection.js100%100%100%100%
   ModuleInfoHeaderPlugin.js100%100%100%100%
   ModuleProfile.js100%100%100%100%
   ModuleSourceTypeConstants.js100%100%100%100%
   ModuleTemplate.js100%100%100%100%
   ModuleTypeConstants.js100%100%100%100%
   MultiCompiler.js99.69%100%100%99.69%645
   MultiStats.js100%100%100%100%
   MultiWatching.js100%100%100%100%
   NoEmitOnErrorsPlugin.js100%100%100%100%
   NodeStuffPlugin.js100%100%100%100%
   NormalModule.js97.78%100%100%97.78%1020, 1036, 1123, 1774, 1779–1789, 708, 711, 728, 745, 986
   NormalModuleFactory.js99.47%100%100%99.47%1067, 1376, 466, 478
   NormalModuleReplacementPlugin.js100%100%100%100%
   NullFactory.js100%100%100%100%
   OptimizationStages.js100%100%100%100%
   OptionsApply.js100%100%100%100%
   Parser.js100%100%100%100%
   PlatformPlugin.js100%100%100%100%
   PrefetchPlugin.js100%100%100%100%
   ProgressPlugin.js98.75%100%100%98.75%446–447, 452, 454, 518
   ProvidePlugin.js100%100%100%100%
   RawModule.js100%100%100%100%
   RecordIdsPlugin.js100%100%100%100%
   RequestShortener.js100%100%100%100%
   ResolverFactory.js100%100%100%100%
   RuntimeGlobals.js100%100%100%100%
   RuntimeModule.js100%100%100%100%
   RuntimePlugin.js100%100%100%100%
   RuntimeTemplate.js100%100%100%100%
   SelfModuleFactory.js100%100%100%100%
   SingleEntryPlugin.js100%100%100%100%
   SourceMapDevToolModuleOptionsPlugin.js100%100%100%100%
   SourceMapDevToolPlugin.js99.16%100%100%99.16%267–268, 610
   Stats.js100%100%100%100%
   Template.js100%100%100%100%
   TemplatedPathPlugin.js98.86%100%100%98.86%134–135
   UseStrictPlugin.js100%100%100%100%
   WarnCaseSensitiveModulesPlugin.js100%100%100%100%
   WarnDeprecatedOptionPlugin.js100%100%100%100%
   WarnNoModeSetPlugin.js100%100%100%100%
   WatchIgnorePlugin.js100%100%100%100%
   Watching.js100%100%100%100%
   WebpackError.js100%100%100%100%
   WebpackIsIncludedPlugin.js100%100%100%100%
   WebpackOptionsApply.js100%100%100%100%
   WebpackOptionsDefaulter.js100%100%100%100%
   buildChunkGraph.js99.87%100%100%99.87%325
   cli.js98.71%100%100%98.71%117, 469, 501, 543, 813
   index.js100%100%100%100%
   validateSchema.js94.67%100%100%94.67%100, 87, 89, 98
   webpack.js97.22%100%100%97.22%196, 218, 220
lib/asset
   AssetBytesGenerator.js100%100%100%100%
   AssetBytesParser.js100%100%100%100%
   AssetGenerator.js100%100%100%100%
   AssetModulesPlugin.js97.77%100%100%97.77%285, 309, 312, 364, 40
   AssetParser.js100%100%100%100%
   AssetSourceGenerator.js100%100%100%100%
   AssetSourceParser.js100%100%100%100%
   RawDataUrlModule.js100%100%100%100%
lib/async-modules
   AsyncModuleHelpers.js100%100%100%100%
   AwaitDependenciesInitFragment.js100%100%100%100%
   InferAsyncModulesPlugin.js100%100%100%100%
lib/cache
   AddBuildDependenciesPlugin.js100%100%100%100%
   AddManagedPathsPlugin.js100%100%100%100%
   IdleFileCachePlugin.js97.92%100%100%97.92%71, 83, 91
   MemoryCachePlugin.js95.83%100%100%95.83%33
   MemoryWithGcCachePlugin.js93.15%100%100%93.15%106, 113–114, 122, 89
   PackFileCacheStrategy.js96.40%100%100%96.40%1250, 1350, 1354, 1416, 628, 647, 657–659, 661, 677–678, 683, 686, 688, 693, 698, 722, 728, 762, 768, 774, 779, 790, 799, 804–805, 807, 824, 830–831, 833
   ResolverCachePlugin.js100%100%100%100%
   getLazyHashedEtag.js100%100%100%100%
   mergeEtags.js100%100%100%100%
lib/config
   browserslistTargetHandler.js100%100%100%100%
   defaults.js99.14%100%100%99.14%1314–1316, 1324, 271, 274, 279, 283, 472
   normalization.js99%100%100%99%191–192, 258, 273
   target.js100%100%100%100%
lib/container
   ContainerEntryDependency.js100%100%100%100%
   ContainerEntryModule.js100%100%100%100%
   ContainerEntryModuleFactory.js100%100%100%100%
   ContainerExposedDependency.js100%100%100%100%
   ContainerPlugin.js100%100%100%100%
   ContainerReferencePlugin.js100%100%100%100%
   FallbackDependency.js100%100%100%100%
   FallbackItemDependency.js100%100%100%100%
   FallbackModule.js100%100%100%100%
   FallbackModuleFactory.js100%100%100%100%
   HoistContainerReferencesPlugin.js100%100%100%100%
   ModuleFederationPlugin.js100%100%100%100%
   RemoteModule.js100%100%100%100%
   RemoteRuntimeModule.js100%100%100%100%
   

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 39 out of 40 changed files in this pull request and generated no new comments.

@alexander-akait alexander-akait merged commit cb824e5 into main May 6, 2026
62 of 65 checks passed
@alexander-akait alexander-akait deleted the claude/fix-issue-16886-nV4hO branch May 6, 2026 15:18
aryanraj45 pushed a commit to aryanraj45/webpack that referenced this pull request May 8, 2026
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.

Webpack 5 LoaderContext: addContextDependency causes loader to rerun once after any change in watch mode

2 participants