ezolenko / rollup-plugin-typescript2

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

fix: add compatibility checks w/ `semver` #424

Closed agilgur5 closed 1 year ago

agilgur5 commented 1 year ago

Summary

Add several compatibility checks using semver

Details

A few commits here:

Review Notes

Put a few commits together b/c these are all very related (would be dependent on each other) and only make a few changes to the source code anyway.

I also built the dist/ files to make sure that adding semver and $ROLLUP_VERSION_RANGE works. NOTE that this may need to be rebuilt prior to release if other PRs are merged in

Oddly enough, adding semver as an external removes it from the builds. When not an external though, it gets added to the builds (additions in the git diff).... Not sure what's going on there exactly... Maybe it's only partially rolled up currently? package-lock.json changes shows it was in the dependency tree already, but I only saw it in devDeps 🤔 Not sure why it was in the build. Making it external makes it more logical at least (and allows users to override the dep etc per https://github.com/ezolenko/rollup-plugin-typescript2/pull/80#issuecomment-584451607)

agilgur5 commented 1 year ago

Ack, integration tests fail because the $TS_VERSION_RANGE and $ROLLUP_VERSION_RANGE are not substituted yet in the tests (they're only replaced in the built files)... will need to handle that somehow...

agilgur5 commented 1 year ago

Fixed the tests and lint issues now