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): upgrade rpts2 / object-hash to support async rollup plugins #506

Merged

Commits on Feb 12, 2020

  1. (fix): upgrade rpts2 / object-hash to support async rollup plugins

    - object-hash v2.0.2 adds/fixes support for async functions
    - rpts2 v0.26.0 upgrades object-hash to v2.0.2
      - rpts2 currently bundles several of its dependencies, so they can't be
        overridden manually and that's also why the object-hash change isn't
        visible in the yarn.lock file
    
    - previously, TSDX users who wanted to use rollup plugins (via
      tsdx.config.js) that use async/await internally (e.g.
      rollup-plugin-copy, rollup-plugin-url, rollup-plugin-visualizer,
      rollup-plugin-smart-asset, etc, etc, etc), would run into
      'Unknown object type "asyncfunction"' from object-hash as rpts2
      hashes the rollup config itself for caching
      - the only fix was to hackily override the rpts2 config in
        tsdx.config.js (which requires brittle copy+paste as its config
        isn't exposed) and then use a config option of rpts2,
        objectHashIgnoreUnknownHack (which is hacky, per the name)
        - this could cause stale cache issues, or, if used with clean,
          would disable the cache entirely, both of which are suboptimal
          experiences
      - now this really common issue is solved and there's no hacking
        needed to use plugins that make use of async/await
    
    NOTE: this does not affect source code that uses async/await, that
    was already supported, this just affects plugins (in tsdx.config.js)
    that use async/await
    agilgur5 committed Feb 12, 2020
    Configuration menu
    Copy the full SHA
    21d23fb View commit details
    Browse the repository at this point in the history