Closed agilgur5 closed 2 years ago
btw, there is no reason not to bump minimum rollup version if we need to use anything new, I expect most people either update whole build toolchain, or freeze the lot. Well, all sane people would anyway... :)
btw, there is no reason not to bump minimum rollup version if we need to use anything new
Yea I figure, given how old the current min is, but that also would technically be a breaking change, so also wouldn't want to do so without good reason. So far, I haven't encountered anything that needed new APIs though (which is surprising, because as a Rollup user, it seemed like I had to update quite a lot for Rollup 2, but now, as a plugin developer, I'm not seeing the same need to upgrade 🤷 )
Summary
Clean up some old backward-compat checks that are no longer necessary for the minimum version of Rollup that rpt2 requires
Details
we require Rollup
>=1.26.3
in the peerDeps and the README and have for years now2.75.7
, so this is a pretty low target)this.meta
was added tooptions
in1.1.0
: https://github.com/rollup/rollup/blob/master/CHANGELOG.md#110this.addWatchFile
was added at least in1.0.0
: https://github.com/rollup/rollup/blob/master/CHANGELOG.md#100this.error
andthis.warn
were added totransform
in0.41.0
: https://github.com/rollup/rollup/blob/master/CHANGELOG.md#0410this simplifies some of the code a decent bit,
RollupContext
in particularbuildEnd
in #345modify tests to account for these changes; basically just simplify them
Future Work
lodash
usage_.isFunction
usage can be replaced with a check for the opposite condition, i.e.typeof message === "string" ? message : message()
_.merge
,_.isEqual
, and_.compact
would be the only ones leftover after