* fix: don't resolve `filter`ed files
- if they're `exclude`d / not `include`d, then we shouldn't be processing them
- we're already not transforming them, so this just applies the same exclusion to resolving
- this is _partly_ a regression from b0e39228b639229ce29d5d8d0b4bd236e4b20852, as that removed the `allImportedFiles` Set that previously filtered out files not in the `tsconfig` `include`
- but that _itself_ was a regression that was removed -- files that didn't pass `filter` should have _never_ been resolved
- basically, the `allImportedFiles` regression was covering up this long-standing bug
- also move `.d.ts` check to above the `filter` check
- we shouldn't be adding declarations to the `cache`, in particular as we don't process declarations, so they'll never be marked as dirty
- having this check above the `filter` should be slighltly more efficient as well (as would not having these files in the cache graph)
types: be more specific with `filter`'s type
- no need for this to be `any`
* build
- patch release has been waiting for a few weeks
* pub: release v0.34.1
- patch bump with the past few fixes
- bump internal rpt2 version to 0.34.0
* 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>
- and build
- v21 broke `graphlib`'s internal usage of `lodash` with its breaking
change, and v22 has another breaking change to fix that
- notably, this was breaking rpt2 imports for some users because rpt2
bundles in `graphlib` etc, meaning the nuances of the bundling got
leaked to consumers, and, in fact, broke their builds
- another upside to unbundling