11 Commits

Author SHA1 Message Date
Anton Gilgur
3ef3289fc1
fix: add compatibility checks w/ semver (#424)
* hotfix: `this.load` was added in Rollup `2.60.0`; don't run on older versions

- this is my bad, I didn't realize `this.load` came out _much_ later than `this.resolve`
  - c.f. https://github.com/rollup/rollup/blob/master/CHANGELOG.md#2600

- since we're backward-compatible w/ Rollup `1.26.3`, add in a version check for the type-only fix
  - the type-only fix will error out in Rollup versions less than `2.60.0`, so instead of erroring out, just skip this functionality

- TODO: should move back to using `semver` that was removed in 08d2f5bcad7cb9a9a0974f3707a27d29dd89da7c

* deps: add back `semver` and use for version checking

- reverts the `semver` removal in 08d2f5bcad7cb9a9a0974f3707a27d29dd89da7c
  - add back the TS version range check

- add a Rollup version range check, fixing an old issue
- check `this.load` Rollup version with `semver` instead of string comparison

- add `semver` to `external`s list
  - also remove `resolve` as it's no longer used as of 74f6761ff63863cdb3e92ca1f33640fe6f4fc7db
  - and re-organize the list so that Node built-ins are in one section while deps are in another
    - makes it clearer what we're marking as external

* dx: add a nice warning when `this.load` is not supported

- so it doesn't just silently skip the type-only fix on Rollup versions <2.60.0

* fix(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 fail
  - add these vars as (namespaced) globals in the Jest config so that they can be used in tests too
  - if they don't exist on `global` (or if `global` doesn't exist), then use the built strings instead
  - see in-line comments for more details

- also reorder `re` placement to match the usage order in the code
- and fix lint issues (`no-string-literal`)

Co-authored-by: Eugene Zolenko <zolenkoe@gmail.com>
2022-09-20 13:15:10 -06:00
ezolenko
76274d421b - updating dependencies 2020-08-07 12:04:35 -06:00
ezolenko
69502e151b - updating dependencies 2020-03-26 23:55:01 -06:00
Tiger Oakes
c6c733fcb5 Use imports with @rollup/pluginutils 2020-03-26 11:07:35 -07:00
Eugene Zolenko
2d33064031 - adding all imports to rollup watch #147, #7 2019-03-25 16:25:03 -06:00
Eugene Zolenko
05779f671e - fix for linter 2018-09-25 16:09:56 -06:00
Eugene Zolenko
4195cb85b0 - adapting #92, fix for #88
- updating dependencies
2018-09-25 16:06:27 -06:00
ezolenko
f57f8e7fb9 - updating dependencies 2018-02-01 20:57:19 -07:00
Eugene Zolenko
0cd14dd42f - source maps
- package lock
2017-10-31 11:18:16 -06:00
Eugene Zolenko
4a0de146fd - formatting 2017-10-24 10:08:16 -06:00
Eugene Zolenko
388b5da6a1 - npm script for self building with output of previous build
- own version in debug output
2017-10-23 17:30:29 -06:00