Skip to content

fix: pin rollup-plugin-typescript2's include patterns explicitly - #2927

Merged
kt3k merged 1 commit into
mainfrom
fix/rollup-ts-include-glob
Jul 29, 2026
Merged

fix: pin rollup-plugin-typescript2's include patterns explicitly#2927
kt3k merged 1 commit into
mainfrom
fix/rollup-ts-include-glob

Conversation

@kt3k

@kt3k kt3k commented Jul 29, 2026

Copy link
Copy Markdown
Member

rollup-plugin-typescript2's default include glob (*.ts+(|x)) relies on picomatch's extglob handling. picomatch >=2.3.0 changed that behavior so the pattern no longer matches .ts files at all — verified locally:

picomatch('**/*.ts+(|x)')('src/core.ts')
// 2.2.2 -> true
// 2.3.2 -> false

Without a match, rollup receives raw TypeScript source instead of the transformed output and fails with Unexpected token. This is currently blocking #2918 (picomatch 2.2.2 → 2.3.2).

Passing explicit, non-extglob include patterns sidesteps the broken interaction entirely, regardless of which picomatch version ends up resolved.

rollup-plugin-typescript2's default include glob (*.ts+(|x)) relies on
picomatch's extglob handling. picomatch >=2.3.0 changed that behavior
so the pattern no longer matches .ts files, causing rollup to receive
raw TypeScript source and fail with 'Unexpected token'. Passing plain
include globs sidesteps the extglob pattern entirely.
@kt3k
kt3k merged commit 1c5cf37 into main Jul 29, 2026
2 checks passed
@kt3k
kt3k deleted the fix/rollup-ts-include-glob branch July 29, 2026 06: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.

1 participant