Closed agilgur5 closed 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...
Fixed the tests and lint issues now
Summary
Add several compatibility checks using
semver
Details
A few commits here:
hotfix:
this.load
was added in Rollup2.60.0
; don't run on older versionsthis.load
came out much later thanthis.resolve
1.26.3
, add in a version check for the type-only fix2.60.0
, so instead of erroring out, just skip this functionalitysemver
that was removed in 08d2f5bcad7cb9a9a0974f3707a27d29dd89da7cdeps: add back
semver
and use for version checkingsemver
removal in 08d2f5bcad7cb9a9a0974f3707a27d29dd89da7c$ROLLUP_VERSION_RANGE
, fixes #9this.load
Rollup version withsemver
instead of string comparisonsemver
toexternal
s listresolve
as it's no longer used as of #367dx: add a nice warning when
this.load
is not supportedfix(test): add globals for strings that are replaced during build
TS_VERSION_RANGE
,ROLLUP_VERSION_RANGE
,RPT2_VERSION
were previously only defined during builds, so would cause tests to failglobal
(or ifglobal
doesn't exist), then use the built strings insteadre
placement to match the usage order in the codeno-string-literal
)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 addingsemver
and$ROLLUP_VERSION_RANGE
works. NOTE that this may need to be rebuilt prior to release if other PRs are merged inOddly enough, adding
semver
as anexternal
removes it from the builds. When not anexternal
though, it gets added to the builds (additions in thegit 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 itexternal
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)