GeezerVison is showing github.com — test(library): import LibraryType from the declarations that export it by alexander-akait · Pull Request #22093 · webpack/webpack
Conversation
alexander-akait
commented
Sep 13, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
lint is failing on main in its lint:types-test stage, and every branch off main inherits it:
test/configCases/library/script-type-keeps-script-output/webpack.config.js(23,35):
error TS2694: Namespace 'exports' has no exported member 'LibraryType'.
LibraryType is exported from declarations/WebpackOptions but not re-exported from the package root, so reading it off import("../../../../") does not resolve. Point the one JSDoc tag at the declarations instead, which is what test/configCases/externals/side-effects-library-types/webpack.config.js:17 already does for the same type. One line, no behaviour change.
Introduced in #22088; noticed because it was the only thing left red on #22092.
What kind of change does this PR introduce?
test
Did you add tests for your changes?
n/a — it repairs the type annotation of an existing case, configCases/library/script-type-keeps-script-output, which still passes (12 checks across the normal and persistent-cache suites). The check this fixes is lint:types-test itself, which now passes locally where it failed before.
Does this PR introduce a breaking change?
No — a JSDoc type reference in one test config; nothing webpack emits 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 was used. It read the failing lint job, established the error was on main rather than in the branch it was working on, found the type's real export site and the existing convention for referencing it, made the change and confirmed lint:types-test passes; I reviewed the result before opening this.
Generated by Claude Code
Summary by CodeRabbit
- Documentation
- Corrected the JSDoc type reference for the
expectScriptOutput parameter.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
`LibraryType` is exported from `declarations/WebpackOptions`, not from the
package root, so reading it off the root failed `lint:types-test` with
TS2694 and took every branch off `main` with it.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Sep 13, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
 
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID: 6d3f3244-4e44-40c6-b2a7-656a2262fdb0
📥 Commits
Reviewing files that changed from the base of the PR and between 5a41278 and 3bc8388.
📒 Files selected for processing (1)
test/configCases/library/script-type-keeps-script-output/webpack.config.js
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
📝 Walkthrough
Walkthrough
The change updates one JSDoc import in the library script output configuration. It references WebpackOptions.LibraryType from the declarations module.
Changes
Library script output configuration
| Layer / File(s) |
Summary |
Correct the LibraryType JSDoc import test/configCases/library/script-type-keeps-script-output/webpack.config.js |
The type parameter documentation now imports LibraryType from declarations/WebpackOptions instead of the package root. |
Priority: ⬇️ Low
Change: Other
Merge Risk: ⚪ Minimal · up to 3bc83
This change only corrects a JSDoc type import and does not affect webpack behavior or emitted output.
🚥 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 test change. The available context does not include the branch prefix, so the required type-prefix match cannot be v… |
Provide the branch name or branch prefix to verify that test matches it. |
✅ Passed checks (3 passed)
| Check name |
Status |
Explanation |
| Description Check |
✅ Passed |
Check skipped - CodeRabbit’s high-level summary is enabled. |
| 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. |
Full details: Title check
Explanation
The title uses the required Conventional Commit format and accurately describes the test change. The available context does not include the branch prefix, so the required type-prefix match cannot be verified.
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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
This PR is packaged and the instant preview is available (3bc8388).
Install it locally:
npm i -D webpack@https://pkg.pr.new/webpack@3bc8388
yarn add -D webpack@https://pkg.pr.new/webpack@3bc8388
pnpm add -D webpack@https://pkg.pr.new/webpack@3bc8388
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Types CoverageCoverage after merging test/library-type-declaration-import into main will be
Coverage Report<| File | Stmts | Branches | Funcs | Lines | Uncovered Lines |
|---|
| bin | | webpack.js | 98.82% | 100% | 100% | 98.82% | 103 | | examples | | build-common.js | 100% | 100% | 100% | 100% | | | buildAll.js | 100% | 100% | 100% | 100% | | | examples.js | 100% | 100% | 100% | 100% | | | template-common.js | 98.21% | 100% | 100% | 98.21% | 72 | | examples/custom-javascript-parser | | test.filter.js | 100% | 100% | 100% | 100% | | | examples/custom-javascript-parser/internals | | acorn-parse.js | 100% | 100% | 100% | 100% | | | meriyah-parse.js | 100% | 100% | 100% | 100% | | | oxc-parse.js | 100% | 100% | 100% | 100% | | | examples/markdown | | webpack.config.mjs | 100% | 100% | 100% | 100% | | | examples/module-federation | | test.filter.js | 100% | 100% | 100% | 100% | | | examples/reexport-components | | test.filter.js | 100% | 100% | 100% | 100% | | | examples/typescript | | test.filter.js | 100% | 100% | 100% | 100% | | | examples/typescript-non-erasable | | test.filter.js | 50% | 100% | 100% | 50% | 5 | | examples/virtual-modules | | test.filter.js | 100% | 100% | 100% | 100% | | | examples/wasm-bindgen-esm | | test.filter.js | 100% | 100% | 100% | 100% | | | examples/wasm-complex | | test.filter.js | 100% | 100% | 100% | 100% | | | examples/wasm-emscripten | | test.filter.js | 100% | 100% | 100% | 100% | | | examples/wasm-simple | | test.filter.js | 100% | 100% | 100% | 100% | | | examples/wasm-simple-source-phase | | test.filter.js | 100% | 100% | 100% | 100% | | | lib | | APIPlugin.js | 100% | 100% | 100% | 100% | | | AsyncDependenciesBlock.js | 100% | 100% | 100% | 100% | | | AutomaticPrefetchPlugin.js | 93.94% | 100% | 100% | 93.94% | 59, 62 | | BannerPlugin.js | 100% | 100% | 100% | 100% | | | Cache.js | 98.25% | 100% | 100% | 98.25% | 104 | | CacheFacade.js | 100% | 100% | 100% | 100% | | | Chunk.js | 99.72% | 100% | 100% | 99.72% | 42 | | ChunkGraph.js | 100% | 100% | 100% | 100% | | | ChunkGroup.js | 100% | 100% | 100% | 100% | | | ChunkTemplate.js | 100% | 100% | 100% | 100% | | | CircularModulesPlugin.js | 99.50% | 100% | 100% | 99.50% | 289 | | CleanPlugin.js | 97.81% | 100% | 100% | 97.81% | 111, 125, 128, 212, 232 | | CodeGenerationResults.js | 100% | 100% | 100% | 100% | | | CompatibilityPlugin.js | 100% | 100% | 100% | 100% | | | Compilation.js | 98.62% | 100% | 100% | 98.62% | 1757, 2078, 2085, 2093, 2115, 2118, 3057, 3536–3537, 3569, 4158, 4162, 4261, 4282, 4409, 4448, 4455, 4508–4509, 4513, 4518, 4534–4535, 4549–4550, 4555–4556, 5079, 5105, 5946, 5963, 5981, 5997, 6012, 6037, 6040, 6408, 6411–6412, 6417, 6432, 6515, 6539, 6653, 837–838 | | Compiler.js | 98.82% | 100% | 100% | 98.82% | 1113, 1150, 1153, 1333–1334, 1342, 844, 930, 971 | | ConcatenationScope.js | 99.10% | 100% | 100% | 99.10% | 293 | | ConditionalInitFragment.js | 100% | 100% | 100% | 100% | | | ConstPlugin.js | 100% | 100% | 100% | 100% | | | ContextExclusionPlugin.js | 100% | 100% | 100% | 100% | | | ContextModule.js | 99.88% | 100% | 100% | 99.88% | 1489 | | ContextModuleFactory.js | 95.66% | 100% | 100% | 95.66% | 230, 257, 276, 280–281, 289, 465, 486, 491, 532, 543, 545, 549, 552, 558–559 | | ContextReplacementPlugin.js | 100% | 100% | 100% | 100% | | | CopyPlugin.js | 99.79% | 100% | 100% | 99.79% | 160 | | DefinePlugin.js | 99.14% | 100% | 100% | 99.14% | 1127, 200–201, 217, 236, 310 | | DependenciesBlock.js | 100% | 100% | 100% | 100% | | | Dependency.js | 98.54% | 100% | 100% | 98.54% | 498, 545 | | DependencyTemplate.js | 100% | 100% | 100% | 100% | | | DependencyTemplates.js | 100% | 100% | 100% | 100% | | | DotenvPlugin.js | 98.07% | 100% | 100% | 98.07% | 395, 443, 456–457 | | DynamicEntryPlugin.js | 100% | 100% | 100% | 100% | | | EntryOptionPlugin.js | 100% | 100% | 100% | 100% | | | EntryPlugin.js | 100% | 100% | 100% | 100% | | | Entrypoint.js | 100% | 100% | 100% | 100% | | | EnvironmentPlugin.js | 97.14% | 100% | 100% | 97.14% | 49 | | ErrorHelpers.js | 100% | 100% | 100% | 100% | | | EvalDevToolModulePlugin.js | 100% | 100% | 100% | 100% | | | EvalSourceMapDevToolPlugin.js | 100% | 100% | 100% | 100% | | | ExportsInfo.js | 99.26% | 100% | 100% | 99.26% | 415, 431, 763, 860, 878, 922, 927 | | ExportsInfoApiPlugin.js | 100% | 100% | 100% | 100% | | | ExternalModule.js | 98.76% | 100% | 100% | 98.76% | 1352, 1355, 591–595, 597, 757 | | ExternalModuleFactoryPlugin.js | 100% | 100% | 100% | 100% | | | ExternalsPlugin.js | 100% | 100% | 100% | 100% | | | FileSystemInfo.js | 99.75% | 100% | 100% | 99.75% | 187, 285, 3947, 3962, 3986, 3989 | | FlagAllModulesAsUsedPlugin.js | 100% | 100% | 100% | 100% | | | FlagDependencyExportsPlugin.js | 95.64% | 100% | 100% | 95.64% | 119, 130, 147, 167, 171, 50, 52, 533, 538, 54, 545, 560, 563, 57 | | FlagDependencyUsagePlugin.js | 100% | 100% | 100% | 100% | | | FlagEntryExportAsUsedPlugin.js | 100% | 100% | 100% | 100% | | | Generator.js | 100% | 100% | 100% | 100% | | | HotModuleReplacementPlugin.js | 100% | 100% | 100% | 100% | | | HotUpdateChunk.js | 100% | 100% | 100% | 100% | | | IgnorePlugin.js | 100% | 100% | 100% | 100% | | | IgnoreWarningsPlugin.js | 100% | 100% | 100% | 100% | | | InitFragment.js | 100% | 100% | 100% | 100% | | | JavascriptMetaInfoPlugin.js | 100% | 100% | 100% | 100% | | | LazyBarrel.js | 100% | 100% | 100% | 100% | | | LibraryTemplatePlugin.js | 100% | 100% | 100% | 100% | | | LoaderOptionsPlugin.js | 100% | 100% | 100% | 100% | | | LoaderTargetPlugin.js | 100% | 100% | 100% | 100% | | | MainTemplate.js | 100% | 100% | 100% | 100% | | | ManifestPlugin.js | 100% | 100% | 100% | 100% | | | Module.js | 98.50% | 100% | 100% | 98.50% | 1326, 1331, 1390, 1404, 1466, 1475 | | ModuleFactory.js | 100% | 100% | 100% | 100% | | | ModuleFilenameHelpers.js | 98.90% | 100% | 100% | 98.90% | 111, 113 | | ModuleGraph.js | 99.78% | 100% | 100% | 99.78% | 1180 | | ModuleGraphConnection.js | 100% | 100% | 100% | 100% | | | ModuleInfoHeaderPlugin.js | 100% | 100% | 100% | 100% | | | ModuleNotFoundError.js | 100% | 100% | 100% | 100% | | | ModuleProfile.js | 100% | 100% | 100% | 100% | | | ModuleSourceTypeConstants.js | 100% | 100% | 100% | 100% | | | ModuleTemplate.js | 100% | 100% | 100% | 100% | | | ModuleTypeConstants.js | 100% | 100% | 100% | 100% | | | MultiCompiler.js | 98.88% | 100% | 100% | 98.88% | 462, 542, 729, 794 | | MultiStats.js | 100% | 100% | 100% | 100% | | | MultiWatching.js | 93.75% | 100% | 100% | 93.75% | 37, 71 | | NoEmitOnErrorsPlugin.js | 100% | 100% | 100% | 100% | | | NodeStuffPlugin.js | 100% | 100% | 100% | 100% | | | NormalModule.js | 98.11% | 100% | 100% | 98.11% | 1045, 1048, 1067, 1084, 1354, 1388, 1404, 1863, 2159, 2164–2172, 2174, 29 | | NormalModuleFactory.js | 98.01% | 100% | 100% | 98.01% | 1341, 1644, 1661, 1670, 1674, 1702, 1709, 1713, 1718, 1730, 1741, 1790, 1801, 1811, 1862–1864, 1871, 732, 744 | | NormalModuleReplacementPlugin.js | 100% | 100% | 100% | 100% | | | NullFactory.js | 100% | 100% | 100% | 100% | | | OptimizationStages.js | 100% | 100% | 100% | 100% | | | OptionsApply.js | 100% | 100% | 100% | 100% | | | Parser.js | 100% | 100% | 100% | 100% | | | PlatformPlugin.js | 100% | 100% | 100% | 100% | | | PrefetchPlugin.js | 100% | 100% | 100% | 100% | | | ProgressPlugin.js | 99.80% | 100% | 100% | 99.80% | 694 | | ProvidePlugin.js | 100% | 100% | 100% | 100% | | | RawModule.js | 100% | 100% | 100% | 100% | | | RecordIdsPlugin.js | 100% | 100% | 100% | 100% | | | RequestShortener.js | 100% | 100% | 100% | 100% | | | ResolverFactory.js | 100% | 100% | 100% | 100% | | | RuntimeGlobals.js | 100% | 100% | 100% | 100% | | | RuntimeModule.js | 100% | 100% | 100% | 100% | | | RuntimePlugin.js | 95.47% | 100% | 100% | 95.47% | 318, 394, 403, 406, 419–420, 434, 452, 473–474, 497, 517–518, 554–555, 578, 591–592, 664, 677, 698, 717 | | RuntimeTemplate.js | 99.66% | 100% | 100% | 99.66% | 352, 3740, 4577, 4589, 4594, 4596, 4601 | | SelfModuleFactory.js | 100% | 100% | 100% | 100% | | | SingleEntryPlugin.js | 100% | 100% | 100% | 100% | | | SourceMapDevToolModuleOptionsPlugin.js | 100% | 100% | 100% | 100% | | | SourceMapDevToolPlugin.js | 97.25% | 100% | 100% | 97.25% | 229, 233, 235, 429, 440, 469, 572, 575–576, 899, 920, 923 | | Stats.js | 100% | 100% | 100% | 100% | | | Template.js | 100% | 100% | 100% | 100% | | | TemplatedPathPlugin.js | 99.48% | 100% | 100% | 99.48% | 366–367 | | UseStrictPlugin.js | 100% | 100% | 100% | 100% | | | WarnCaseSensitiveModulesPlugin.js | 100% | 100% | 100% | 100% | | | WarnDeprecatedOptionPlugin.js | 100% | 100% | 100% | 100% | | | WarnNoModeSetPlugin.js | 100% | 100% | 100% | 100% | | | WatchIgnorePlugin.js | 100% | 100% | 100% | 100% | | | Watching.js | 100% | 100% | 100% | 100% | | | WebpackError.js | 100% | 100% | 100% | 100% | | | WebpackIsIncludedPlugin.js | 100% | 100% | 100% | 100% | | | WebpackOptionsApply.js | 100% | 100% | 100% | 100% | | | WebpackOptionsDefaulter.js | 100% | 100% | 100% | 100% | | | buildChunkGraph.js | 99.87% | 100% | 100% | 99.87% | 375 | | cli.js | 98.63% | 100% | 100% | 98.63% | 10, 117, 547, 579, 629, 903 | | index.js | 99.73% | 100% | 100% | 99.73% | 184 | | validateSchema.js | 94.67% | 100% | 100% | 94.67% | 100, 87, 89, 98 | | webpack.js | 97.12% | 100% | 100% | 97.12% | 10, 274, 296, 298 | | lib/asset | | AssetBytesGenerator.js | 100% | 100% | 100% | 100% | | | AssetBytesParser.js | 100% | 100% | 100% | 100% | | | AssetGenerator.js | 100% | 100% | 100% | 100% | | | AssetModule.js | 100% | 100% | 100% | 100% | | | AssetModulesPlugin.js | 98.15% | 100% | 100% | 98.15% | 338, 362, 365, 495, 57, 62 | | AssetParser.js | 100% | 100% | 100% | 100% | | | AssetSourceGenerator.js | 100% | 100% | 100% | 100% | | | AssetSourceParser.js | 100% | 100% | 100% | 100% | | | RawDataUrlModule.js | 100% | 100% | 100% | 100% | | | WebManifestGenerator.js | 100% | 100% | 100% | 100% | | | WebManifestParser.js | 100% | 100% | 100% |
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
codecov
Bot
commented
Sep 13, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.96%. Comparing base (5a41278) to head (3bc8388).
Additional details and impacted files
@@ Coverage Diff @@
## main #22093 +/- ##
=======================================
Coverage 94.96% 94.96%
=======================================
Files 729 729
Lines 97509 97509
Branches 29696 29696
=======================================
+ Hits 92596 92600 +4
+ Misses 4913 4909 -4
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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
alexander-akait
added a commit
that referenced
this pull request
Sep 13, 2026
`LibraryType` is exported from `declarations/WebpackOptions.d.ts`, not
re-exported from the package root, so `lint:types-test` fails on `main`
with TS2694. Same one-line change as #22093, ported here to unblock this
PR's `lint` rather than wait on that PR to land.
Generated code size
Comparing 3bc8388 merged into 5a41278 against 5a41278. Merging this pull request will not change the code webpack generates.
| What moved |
Cases |
Assets |
Gzip |
Raw |
Case source |
| Changed, same case source |
0 |
0 |
— |
— |
— |
| Changed, case source moved |
0 |
0 |
— |
— |
— |
| New |
0 |
0 |
— |
— |
— |
| Deleted |
0 |
0 |
— |
— |
— |
| Unchanged |
— |
7645 |
— |
— |
— |
Changed, same case source is the row that is webpack's doing — those assets are built from byte-identical module source, so what moved is what webpack generates. Changed, case source moved is mostly a case this pull request edited: Case source is how many bytes of module source those cases gained, which is what their output delta has to be read against, and a bundle that grew by less than its case did is not a regression. New and Deleted are whole assets rather than deltas, so a pull request adding cases cannot bury a real change. Gzip decides — it is what a user downloads, and a re-encoding can cut raw bytes while costing wire bytes; raw is the tiebreak, and brotli and zstd are per asset below.
No asset changed size.
No runtime gained or lost a runtime module.
Built test/configCases with the defaults a user gets: 2150 case(s), 7645 asset(s), 87 emitted nothing.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Merging this PR will degrade performance by 20.79%
⚠️ 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
⚡ 2 improved benchmarks
❌ 1 regressed benchmark
✅ 391 untouched benchmarks
⏩ 6 skipped benchmarks1
Performance Changes
Tip Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing test/library-type-declaration-import (3bc8388) with main (2cf714f)2
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
alexander-akait
added a commit
that referenced
this pull request
Sep 13, 2026
* fix(parser): answer an absent export from the spec namespace
A static reference to a name the module does not export read and wrote the
exports object, so every name `Object.prototype` carries — `__proto__`,
`toString`, `constructor` — showed through where the spec reports undefined,
and a write quietly created a property instead of failing. Route those names
through the namespace, which answers both as the spec does.
Unskips `module-code/namespace/internals/{get-str-not-found,set}.js` and
`module-code/export-expname-binding-index.js`.
* test(library): import LibraryType from the declarations that export it
`LibraryType` is exported from `declarations/WebpackOptions.d.ts`, not
re-exported from the package root, so `lint:types-test` fails on `main`
with TS2694. Same one-line change as #22093, ported here to unblock this
PR's `lint` rather than wait on that PR to land.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|