ezolenko / rollup-plugin-typescript2

Rollup plugin for typescript with compiler errors.
MIT License
822 stars 71 forks source link

fix: add `realpath` to host to properly resolve monorepos / symlinks #332

Closed agilgur5 closed 2 years ago

agilgur5 commented 2 years ago

Summary

Implement realpath in host.ts to properly resolve symlinks, i.e. for monorepos

While the code for this is tiny, this is a pretty huge bugfix given the number of users that have run into this here and downstream (in microbundle, TSDX, etc) -- glad to finally fix such a common error!

Details

See my root cause analysis in https://github.com/ezolenko/rollup-plugin-typescript2/issues/234#issuecomment-1139202740 for (much) more details

Review Notes

References

Downstream fixes:

agilgur5 commented 2 years ago

I fixed the tests I added for this on Windows (which I suspected might error there).

Just need #331 to be merged so that this can be rebased on top, then everything should pass. CI is currently failing on Windows due to https://github.com/ezolenko/rollup-plugin-typescript2/pull/329#issuecomment-1138876847 being merged early and master being currently broken as a result, not because of this PR.

ezolenko commented 2 years ago

This one needs a release I guess

agilgur5 commented 2 years ago

This one needs a release I guess

yep, that it would.

think I'll get a few more PRs in today for bugfixes if you want to batch a few things together instead

ezolenko commented 2 years ago

Ok, let me know when you have everything you had in mind in.

agilgur5 commented 2 years ago

@ezolenko #334 and #338 were the last two fixes I was looking to get in, so ready for a batched release now πŸ‘

Note that you'll need to do a build && build-self beforehand as I didn't do that in my PRs (I normally leave dist/ for the release process to handle)

(Anything else that I'm working on is going to take longer to figure out the right approach, fix, and test, but think I've made great progress on bug squashing so far!)

agilgur5 commented 2 years ago

Released in 0.32.0 πŸŽ‰

Just so you know, I edited the release notes to add sections by order of importance. This is similar to how I organized releases in TSDX. Would like to automate this, but I've never quite gotten around to release automation in OSS and my changelog generator is outdated now.

Also as a heads up, GitHub's auto-generated release notes seem to only include PRs, meaning it missed all the direct commits that you made. For the most part, those don't necessarily need call-outs in the release notes and can be seen in the full changelog (alternatively, we could also expand the "Internal" section and put a spoiler/<details> tag around it), but some, like the dependency updates -- which occasionally cause breaking changes (like in the case of @rollup/pluginutils's createFilter https://github.com/ezolenko/rollup-plugin-typescript2/issues/216#issuecomment-1140024487) -- may be better to include in the release notes just in case.