Skip to content

[TIDAL] Fix Rollup build by setting explicit TypeScript include globs - #384

Merged
lorgan3 merged 1 commit into
masterfrom
fix-rollup-typescript-include
Jun 15, 2026
Merged

lorgan3 merged 1 commit into
masterfrom
fix-rollup-typescript-include

Conversation

@lorgan3

@lorgan3 lorgan3 commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

Description

yarn build has been failing with Error: Unexpected token (Note that you need plugins to import files that are not JavaScript) on every Node version (16/20/24).

Root cause: rollup-plugin-typescript2@0.32.1 relies on a default include extglob (["*.ts+(|x)", "**/*.ts+(|x)"]). The recent picomatch bump to 2.3.2 (pulled in via #380) no longer matches that empty-alternation extglob, so the plugin's filter skipped every .ts file, the TypeScript was never compiled, and Rollup tried to parse raw TS.

Fix: set explicit, plain include: ['**/*.ts', '**/*.tsx'] globs on the plugin, sidestepping the broken default. Verified yarn build now produces all three bundles (cjs/es/umd) on Node 24.

Manual check

  • N/a, adding a build step to ci in a follow up

Checklist for a thorough manual check

@lorgan3 lorgan3 self-assigned this Jun 15, 2026
rollup-plugin-typescript2's default include extglob ("**/*.ts+(|x)") no
longer matches any file under picomatch >=2.3.2 (pulled in via #380), so
the plugin skipped every .ts file and `yarn build` failed with
"Unexpected token". Setting plain `**/*.ts`/`**/*.tsx` globs restores a
working build.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lorgan3
lorgan3 force-pushed the fix-rollup-typescript-include branch from 2199a66 to 4070ca7 Compare June 15, 2026 13:06
@lorgan3
lorgan3 marked this pull request as ready for review June 15, 2026 13:27
@lorgan3
lorgan3 requested a review from a team as a code owner June 15, 2026 13:27
@lorgan3
lorgan3 requested review from BeirlaenAaron, KristofColpaert, eniskraasniqi1, farazatarodi, jelledc, lowiebenoot and qubis741 and removed request for a team June 15, 2026 13:27
@lorgan3
lorgan3 merged commit ee64a9c into master Jun 15, 2026
3 of 4 checks passed
@lorgan3
lorgan3 deleted the fix-rollup-typescript-include branch June 15, 2026 13:42
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