Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add compatibility checks w/ semver #424

Merged
merged 5 commits into from
Sep 20, 2022

Commits on Sep 17, 2022

  1. 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 08d2f5b
    agilgur5 committed Sep 17, 2022
    Configuration menu
    Copy the full SHA
    385ab72 View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2022

  1. deps: add back semver and use for version checking

    - reverts the `semver` removal in 08d2f5b
      - 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 74f6761
      - 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
    agilgur5 committed Sep 18, 2022
    Configuration menu
    Copy the full SHA
    f99272b View commit details
    Browse the repository at this point in the history
  2. 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
    agilgur5 committed Sep 18, 2022
    Configuration menu
    Copy the full SHA
    dd18e4b View commit details
    Browse the repository at this point in the history
  3. 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`)
    agilgur5 committed Sep 18, 2022
    Configuration menu
    Copy the full SHA
    2e39986 View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2022

  1. Configuration menu
    Copy the full SHA
    e5d69c4 View commit details
    Browse the repository at this point in the history