fix: pass explicit include globs to rollup-plugin-typescript2#906
Merged
JohnMcLear merged 1 commit intomainfrom Apr 7, 2026
Merged
fix: pass explicit include globs to rollup-plugin-typescript2#906JohnMcLear merged 1 commit intomainfrom
JohnMcLear merged 1 commit intomainfrom
Conversation
rollup-plugin-typescript2@0.36 depends on @rollup/pluginutils@^4.1.2, whose picomatch build does not support extglobs. Its default include pattern is `*.ts+(|x)` — under pluginutils@4 that pattern matches nothing, so the plugin silently skips every .ts file in the project. rollup then falls back to parsing index.ts as raw JavaScript and dies on the first `type` declaration: RollupError: index.ts (42:5): Expected ';', '}' or <eof> Pass an explicit non-extglob include so the filter actually matches. The previous attempt (PR #905) fixed the tsconfig include list but did not address the plugin-side filter, so CI publish kept failing on exactly the same line. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Review Summary by QodoFix rollup-plugin-typescript2 include glob pattern for pluginutils@4
WalkthroughsDescription• Fix TypeScript plugin include glob pattern incompatibility • Explicitly specify include/exclude globs for rollup-plugin-typescript2 • Resolve picomatch extglob support limitation in @rollup/pluginutils@4 • Prevent silent .ts file skipping causing build failures Diagramflowchart LR
A["rollup-plugin-typescript2@0.36"] -->|depends on| B["@rollup/pluginutils@4"]
B -->|picomatch limitation| C["Extglobs not supported"]
C -->|causes| D["Default pattern fails"]
D -->|results in| E["TypeScript files skipped"]
E -->|leads to| F["Build error at type declaration"]
G["Explicit include/exclude globs"] -->|fixes| F
File Changes1. rollup.config.cjs.js
|
Review Summary by QodoFix rollup-plugin-typescript2 include glob pattern compatibility
WalkthroughsDescription• Fix TypeScript plugin include glob pattern incompatibility • Explicitly pass non-extglob patterns to rollup-plugin-typescript2 • Resolve silent .ts file skipping causing build failures • Add exclude pattern for .d.ts declaration files Diagramflowchart LR
A["rollup-plugin-typescript2@0.36"] -->|depends on| B["@rollup/pluginutils@4"]
B -->|picomatch no extglobs| C["Default pattern fails"]
C -->|silently skips| D[".ts files"]
D -->|fallback to raw JS| E["Build crashes"]
F["Explicit include globs"] -->|replaces| C
F -->|enables matching| D
D -->|TypeScript parsing| G["Build succeeds"]
File Changes1. rollup.config.cjs.js
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewⓘ The new review experience is currently in Beta. Learn more |
Code Review by Qodo
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
PR #905 fixed the tsconfig `include` list but the plugin-side filter was the real culprit, so CI publish kept failing on the exact same line.
Reproduced in a clean clone of `main` and verified the fix builds.
Test plan
🤖 Generated with Claude Code