deps: upgrade rpt2 to latest v0.32.0 to fix monorepos #967
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.
Intro
Hi 👋 , by way of introduction, I help maintain
rollup-plugin-typescript2
and also formerly solo-maintained TSDX for ~1.5 years (the creator hasn't been involved in years and his abusiveness was central to me leaving OSS for over a year), so I'm very familiar with the internals ofmicrobundle
as well.I was investigating ezolenko/rollup-plugin-typescript2#295 and found that
microbundle
is on an older version of rpt2, causing several issues in this repo.Summary
Upgrade rpt2 to v0.32.0 to fix various monorepo issues
Details
rpt2 v0.30.0 supports compiling files outside of the project directory with no additional configuration (e.g. of
rootDir
) as it upgraded its dep of@rollup/pluginutils
to v4, which had a breaking change affectingcreateFilter
in fix(pluginutils)!: don't add cwd to absolute or patterns that start with a glob rollup/plugins#517@rollup/pluginutils
allows transforming files outside of the project dirrpt2 v0.32.0 supports symlinks, such as with monorepos built w/ pnpm
previously, microbundle was using rpt2 v0.29.0, which is about ~1.5 years out-of-date
References
microbundle
uses outdated version of rpt2 ezolenko/rollup-plugin-typescript2#295 (comment) which references Breaks when trying to import typescript outside of directory #808 and duplicated Is it possible to make this plugin transpile files from outside the root of the package (f. ex. in a monorepo setup)? ezolenko/rollup-plugin-typescript2#216 (comment)realpath
to host to properly resolve monorepos / symlinks ezolenko/rollup-plugin-typescript2#332Testing
It doesn't look like
microbundle
's fixtures support monorepos yet (would require setting up symlinks orpnpm
etc), so as a result I didn't add a whole test suite for that which would've made this PR significantly more complex and involved in the internals of the testing set-up.Once I set-up an integration test for this in rpt2, I could contribute a similar fixture downstream here, but it may require a different CI workflow to not break the existing test set-up