Skip to content

test(test262): assert two more errors webpack reports at build time - #21906

Merged
alexander-akait merged 1 commit into
mainfrom
test/unskip-script-await-using
Sep 1, 2026
Merged

alexander-akait merged 1 commit into
mainfrom
test/unskip-script-await-using

Conversation

@alexander-akait

@alexander-akait alexander-akait commented Sep 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Two entries in the test262 skip lists no longer describe what webpack does, so the suite was skipping behaviour it already has.

import-defer-of-missing-module-fails.js and module-code/instn-star-binding.js move from knownBugs to linkErrorsAtBuildTime, the existing list for cases where webpack — like rollup, esbuild and bun — resolves linking at build time and reports there rather than throwing at runtime. A module that fails to resolve is a build error whether or not the import is deferred, and assigning to a namespace import has been one since #21867. The suite now asserts webpack reports both instead of skipping them.

What kind of change does this PR introduce?

test

Did you add tests for your changes?

This PR is only test changes — test/test262.spectest.js. Both cases pass on this branch, across the development and production scenarios. Because membership of linkErrorsAtBuildTime is itself what turns on exportsPresence: "error", the classification would be self-confirming if checked through the suite alone, so both were also built with a real webpack() under default options, where they error on their own: Module not found: Error: Can't resolve './missing.js' and Assignment to the imported binding 'ns'. A namespace import is immutable, ….

Does this PR introduce a breaking change?

No. Nothing outside test/ changes.

If relevant, what needs to be documented once your changes are merged or what have you already documented?

n/a

Use of AI

AI (Claude Code) was used to re-probe the remaining skip-list entries with their filter removed, and to check each candidate against a real build rather than against the suite alone — which matters here, since the harness enables exportsPresence: "error" for linkErrorsAtBuildTime members and would otherwise make that classification self-confirming. Several candidates the first sweep called green were rejected on exactly that ground, and one further candidate — un-skipping the top-level await using Script-goal case — was proposed, pushed, then reverted after CI disproved it: the local run had scored a host SyntaxError from an older Node as the expected parse error. All findings and reasoning were reviewed by me before committing.

@changeset-bot

changeset-bot Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 6ff35e7

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

@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

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

Install it locally:

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

@codecov

codecov Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.10%. Comparing base (5e6c4d7) to head (6ff35e7).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #21906   +/-   ##
=======================================
  Coverage   95.10%   95.10%           
=======================================
  Files         703      703           
  Lines       90747    90747           
  Branches    27390    27390           
=======================================
  Hits        86303    86303           
  Misses       4444     4444           
Flag Coverage Δ
css-parsing 24.77% <ø> (ø)
html5lib 29.88% <ø> (ø)
integration 88.63% <ø> (ø)
syntax-equivalence 79.75% <ø> (ø)
test262 44.57% <ø> (+0.03%) ⬆️
unit 56.77% <ø> (ø)

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

☔ View full report in Codecov by Harness.
📢 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.

@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Generated code size

Comparing 6ff35e7 merged into 8d1ab53 against 8d1ab53. Merging this pull request will not change the code webpack generates.

Changed New Deleted Unchanged Gzip change Raw change Gzip new/gone Raw new/gone
Cases 0 0 0 1978 — — — —
Assets 0 0 0 7287 — — — —
Runtimes 0 0 0 2282 — — — —

Gzip change decides — it is what a user downloads, and a re-encoding can cut raw bytes while costing wire bytes. Raw change is the tiebreak: it is what the generator wrote, so it is what has to be decompressed and parsed. Both are over assets both runs emit; bytes an added or deleted case brings with it are counted apart, under new/gone. Brotli and zstd are per asset in the table below.

No asset changed size.

No runtime gained or lost a runtime module.

Built test/configCases with the defaults a user gets: 1978 case(s), 7287 asset(s), 76 emitted nothing.

@coderabbitai

coderabbitai Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: c5fa0796-34ac-47ef-99eb-32a70c12f7e7

📥 Commits

Reviewing files that changed from the base of the PR and between c56be98 and 6ff35e7.

📒 Files selected for processing (1)
  • test/test262.spectest.js

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

Changes

Test262 classification

Layer / File(s) Summary
Update test classifications
test/test262.spectest.js
Two tests now require build-time link errors and no longer remain in the knownBugs skip list. Other import-defer entries remain skipped.

Suggested reviewers: hai-x

Merge Risk: ⚪ Minimal · up to 6ff35

This change updates tests to cover behavior webpack already provides and does not modify production code or user-facing behavior; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title uses the required Conventional Commit format and accurately describes the two build-time error assertions. The branch prefix is not provided, so the type-prefix match cannot be verified. Provide the branch name or branch prefix to verify that the test type matches it.
✅ Passed checks (3 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
  • Fix all pre-merge checks with AI

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

A module that fails to resolve is a build error whether or not the import
is deferred, and assigning to a namespace import is one since #21867.
Both were skipped as bugs; now the suite checks webpack reports them.
@alexander-akait
alexander-akait force-pushed the test/unskip-script-await-using branch from c56be98 to 6ff35e7 Compare September 1, 2026 16:25
@codspeed

codspeed Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Merging this PR will regress 1 benchmark

⚡ 1 improved benchmark
❌ 1 regressed benchmark
✅ 326 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Memory benchmark "asset-modules-bytes", scenario '{"name":"mode-production","mode":"production"}' 5.9 MB 7.4 MB -20.05%
⚡ Memory benchmark "wasm-modules-sync", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 331.9 KB 209.8 KB +58.24%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing test/unskip-script-await-using (6ff35e7) with main (5e6c4d7)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (8d1ab53) during the generation of this report, so 5e6c4d7 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Types Coverage

Coverage after merging test/unskip-script-await-using into main will be
99.23%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
bin
   webpack.js98.82%100%100%98.82%103
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.js100%100%100%100%
examples/markdown
   webpack.config.mjs100%100%100%100%
examples/module-federation
   test.filter.js100%100%100%100%
examples/reexport-components
   test.filter.js100%100%100%100%
examples/typescript
   test.filter.js100%100%100%100%
examples/typescript-non-erasable
   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-emscripten
   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%42
   ChunkGraph.js100%100%100%100%
   ChunkGroup.js100%100%100%100%
   ChunkTemplate.js100%100%100%100%
   CircularModulesPlugin.js99.35%100%100%99.35%244
   CleanPlugin.js99.12%100%100%99.12%212, 232
   CodeGenerationResults.js100%100%100%100%
   CompatibilityPlugin.js100%100%100%100%
   Compilation.js98.53%100%100%98.53%1736, 2055, 2062, 2070, 2092, 2095, 3034, 3513–3514, 3546, 4380, 4413, 4466–4467, 4471, 4476, 4492–4493, 4507–4508, 4513–4514, 5036, 5062, 5872, 5904, 5921, 5939, 5955, 5970, 5995–5996, 5998, 6333, 6338, 6344, 6347, 6354, 6366, 6368, 6372, 6390, 6405, 6439, 6495, 6519, 6635, 818–819
   Compiler.js99.56%100%100%99.56%1174–1175, 1183
   ConcatenationScope.js99.12%100%100%99.12%303
   ConditionalInitFragment.js100%100%100%100%
   ConstPlugin.js100%100%100%100%
   ContextExclusionPlugin.js100%100%100%100%
   ContextModule.js99.88%100%100%99.88%1554
   ContextModuleFactory.js97.29%100%100%97.29%289, 465, 486, 491, 532, 543, 545, 549, 558–559
   ContextReplacementPlugin.js100%100%100%100%
   DefinePlugin.js99.13%100%100%99.13%1124, 197–198, 214, 233, 307
   DependenciesBlock.js100%100%100%100%
   Dependency.js98.54%100%100%98.54%498, 545
   DependencyTemplate.js100%100%100%100%
   DependencyTemplates.js100%100%100%100%
   DotenvPlugin.js98.07%100%100%98.07%395, 443, 456–457
   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.js99.26%100%100%99.26%415, 431, 763, 860, 878, 922, 927
   ExportsInfoApiPlugin.js100%100%100%100%
   ExternalModule.js98.76%100%100%98.76%1340, 1343, 590–594, 596, 756
   ExternalModuleFactoryPlugin.js100%100%100%100%
   ExternalsPlugin.js100%100%100%100%
   FileSystemInfo.js99.53%100%100%99.53%187, 2464–2465, 2468, 2479, 2490, 2501, 285, 3944, 3959, 3983
   FlagAllModulesAsUsedPlugin.js100%100%100%100%
   FlagDependencyExportsPlugin.js98.36%100%100%98.36%505, 514, 517, 521, 533
   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%
   LazyBarrel.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.51%100%100%98.51%1317, 1322, 1382, 1396, 1458, 1467
   ModuleFactory.js100%100%100%100%
   ModuleFilenameHelpers.js98.90%100%100%98.90%111, 113
   ModuleGraph.js99.78%100%100%99.78%1180
   ModuleGraphConnection.js100%100%100%100%
   ModuleInfoHeaderPlugin.js100%100%100%100%
   ModuleNotFoundError.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.72%100%100%99.72%729
   MultiStats.js100%100%100%100%
   MultiWatching.js100%100%100%100%
   NoEmitOnErrorsPlugin.js100%100%100%100%
   NodeStuffPlugin.js100%100%100%100%
   NormalModule.js97.99%100%100%97.99%1040, 1043, 1060, 1077, 1325, 1359, 1375, 1830, 2126, 2131–2141, 29
   NormalModuleFactory.js99.01%100%100%99.01%1341, 1790, 1801, 1811, 1862–1864, 1871, 732, 744
   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.js99.80%100%100%99.80%694
   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.js95.78%100%100%95.78%314, 380, 389, 392, 416, 434, 455–456, 479, 499–500, 536–537, 560, 573–574, 646, 659, 680, 699
   RuntimeTemplate.js99.63%100%100%99.63%350, 3684, 4284, 4296, 4301, 4303, 4308
   SelfModuleFactory.js100%100%100%100%
   SingleEntryPlugin.js100%100%100%100%
   SourceMapDevToolModuleOptionsPlugin.js100%100%100%100%
   SourceMapDevToolPlugin.js98.63%100%100%98.63%229, 233, 235, 429, 440, 899
   Stats.js100%100%100%100%
   Template.js100%100%100%100%
   TemplatedPathPlugin.js99.48%100%100%99.48%366–367
   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%375
   cli.js98.63%100%100%98.63%10, 117, 547, 579, 629, 903
   index.js99.73%100%100%99.73%184
   validateSchema.js94.67%100%100%94.67%100, 87, 89, 98
   webpack.js97.12%100%100%97.12%10, 274, 296, 298
lib/asset
   AssetBytesGenerator.js100%100%100%100%
   AssetBytesParser.js100%100%100%100%
   AssetGenerator.js100%100%100%100%
   AssetModule.js100%100%100%100%
   AssetModulesPlugin.js98.15%100%100%98.15%338, 362, 365, 495, 57, 62
   AssetParser.js100%100%100%100%
   AssetSourceGenerator.js100%100%100%100%
   AssetSourceParser.js100%100%100%100%
   RawDataUrlModule.js100%100%100%100%
   WebManifestGenerator.js100%100%100%100%
   WebManifestParser.js100%100%100%100%
lib/async-modules
   AsyncModuleHelpers.js100%100%100%100%
   AwaitDependenciesInitFragment.js100%100%100%100%
   InferAsyncModulesPlugin.js100%100%100%100%
   isGeneratorLowered.js100%100%100%100%
lib/bun
   BunTargetPlugin.js100%100%100%100%
lib/cache
   AddBuildDependenciesPlugin.js100%100%100%100%
   AddManagedPathsPlugin.js100%100%100%100%
   IdleFileCachePlugin.js97.92%100%100%97.92%75, 87, 95
   MemoryCachePlugin.js92%100%100%92%33, 42
   MemoryWithGcCachePlugin.js93.42%100%100%93.42%107, 121–122, 131, 89
   PackFileCacheStrategy.js96.52%100%100%96.52%1317, 1417, 1421, 1483, 1719, 1803, 1826, 1858, 682, 701,

@alexander-akait alexander-akait changed the title test(test262): un-skip a stale entry and assert two build-time errors test(test262): assert two more errors webpack reports at build time Sep 1, 2026
@alexander-akait
alexander-akait merged commit d6e86c0 into main Sep 1, 2026
67 checks passed
@alexander-akait
alexander-akait deleted the test/unskip-script-await-using branch September 1, 2026 19:45
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