Skip to content

test: update target flag tests for webpack 5.108#4797

Merged
alexander-akait merged 1 commit into
mainfrom
claude/resolve-failed-tests-a3uggh
Jul 3, 2026
Merged

test: update target flag tests for webpack 5.108#4797
alexander-akait merged 1 commit into
mainfrom
claude/resolve-failed-tests-a3uggh

Conversation

@alexander-akait

Copy link
Copy Markdown
Member

Summary

CI on #4792 fails (and #4795 is blocked) because webpack 5.108 changed target behavior in two ways that broke test/build/target/flag-test/target-flag.test.js:

  • webpack 5.108 introduces the universal, deno and bun targets, so the "Unknown target 'invalid'" stderr snapshots no longer match.
  • Combining targets like node + web no longer fails with "no default script chunk format available" — webpack now builds them successfully with universal ESM output, so the "should throw an error for incompatible multiple targets" test gets exit code 0 instead of 2.

Changes

  • Bump webpack to 5.108.3 in package-lock.json (already allowed by the ^5.107.2 range; snapshots are keyed per webpack major and must match the locked version).
  • Regenerate the two "Unknown target" stderr snapshots to include the new universal, deno and bun target descriptions.
  • Replace the "should throw an error for incompatible multiple targets" test with "should allow multiple different targets", asserting that node + web now builds successfully.

Testing

Full jest suite passes locally with webpack 5.108.3 (727 passed, 330/330 snapshots).

Once merged, Dependabot can rebase #4792 and #4795 and their CI should go green.

🤖 Generated with Claude Code

https://claude.ai/code/session_012iKSSr35Ue6UtyA6rcw6UA


Generated by Claude Code

webpack 5.108 introduces the universal, deno and bun targets and
supports combining targets like node and web via universal ESM
output, which broke the target flag tests:

- update the "Unknown target" stderr snapshots to include the new
  universal, deno and bun entries
- replace the "should throw an error for incompatible multiple
  targets" test with "should allow multiple different targets",
  since node + web now builds successfully
- bump webpack to 5.108.3 in the lockfile so the snapshots match
  the installed version

Fixes the failing CI on #4792 and unblocks #4795.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iKSSr35Ue6UtyA6rcw6UA
Copilot AI review requested due to automatic review settings July 3, 2026 21:08
@changeset-bot

changeset-bot Bot commented Jul 3, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 65bb2ad

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@linux-foundation-easycla

Copy link
Copy Markdown

CLA Not Signed

One or more co-authors of this pull request were not found. You must specify co-authors in commit message trailer via:

Co-authored-by: name <email>

Supported Co-authored-by: formats include:

  1. Anything <id+login@users.noreply.github.com> - it will locate your GitHub user by id part.
  2. Anything <login@users.noreply.github.com> - it will locate your GitHub user by login part.
  3. Anything <public-email> - it will locate your GitHub user by public-email part. Note that this email must be made public on Github.
  4. Anything <other-email> - it will locate your GitHub user by other-email part but only if that email was used before for any other CLA as a main commit author.
  5. login <any-valid-email> - it will locate your GitHub user by login part, note that login part must be at least 3 characters long.

Alternatively, if the co-author should not be included, remove the Co-authored-by: line from the commit message.

Please update your commit message(s) by doing git commit --amend and then git push [--force] and then request re-running CLA check via commenting on this pull request:

/easycla

@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.43%. Comparing base (3bfa81c) to head (65bb2ad).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4797   +/-   ##
=======================================
  Coverage   93.43%   93.43%           
=======================================
  Files          14       14           
  Lines        5420     5420           
  Branches      788      788           
=======================================
  Hits         5064     5064           
  Misses        354      354           
  Partials        2        2           

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3bfa81c...65bb2ad. Read the comment docs.

🚀 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

Choose a reason for hiding this comment

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

Pull request overview

Updates the --target flag test suite to match webpack 5.108’s updated target behavior and refreshes related snapshots/lockfile state so CI can pass against the newer webpack.

Changes:

  • Adjust --target tests to treat node + web as a valid multi-target combination (exit code 0).
  • Regenerate “Unknown target” stderr snapshots to include newly supported targets (universal, deno, bun).
  • Update the lockfile to resolve to webpack 5.108.3 and reflect related transitive dependency changes.

Reviewed changes

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

File Description
test/build/target/flag-test/target-flag.test.js Updates multi-target test expectations to reflect webpack 5.108 behavior.
test/build/target/flag-test/snapshots/target-flag.test.js.snap.webpack5 Refreshes snapshots for updated “Unknown target” output and removes now-obsolete error snapshot.
package-lock.json Locks to webpack 5.108.3 and updates related dependency graph entries.

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

@alexander-akait alexander-akait merged commit b4ea5a7 into main Jul 3, 2026
19 of 20 checks passed
@alexander-akait alexander-akait deleted the claude/resolve-failed-tests-a3uggh branch July 3, 2026 21:32
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.

3 participants