-
-
Notifications
You must be signed in to change notification settings - Fork 61
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 the rollup-plugin-typescript2 objectHashIgnoreUnknownHack warning #339
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/egoist/bili/ns68hjy49 |
Codecov Report
@@ Coverage Diff @@
## master #339 +/- ##
==========================================
+ Coverage 76.16% 76.26% +0.09%
==========================================
Files 11 11
Lines 428 434 +6
Branches 161 165 +4
==========================================
+ Hits 326 331 +5
- Misses 97 98 +1
Partials 5 5
Continue to review full report at Codecov.
|
hi @chocolateboy. Thanks for PR. What about we upgrade the bili internal rtp2 to latest version and set |
@fi3ework That's fine by me, but I think you'd need to stop requiring/supporting the user-installed version, which would at least be a breaking change. The internal version is a dev dependency, so I assume it's only used for tests? Otherwise, because there's no constraint on the user-installed version of rpt2 (i.e. it's not a peer dependency), users could end up using an old version (< v0.26) without enabling this option and things would break. |
P.S. If the idea is to make TypeScript work out of the box, without the user needing to install anything, it might be worth looking at another plugin, as suggested here. |
Looked a bit at the source code. rtp2 is required from user-land so actually rpt2 is an useless dep for bili now. It could be removed. For test cases, they will require rpt2 from
This could be a break change. May could be used in next major version 😊 LGTM |
Best reviewed: commit by commit
Optimal code review plan
|
rollup-plugin-typescript2 < v0.26 needs the `objectHashIgnoreUnknownHack` option to be enabled to correctly handle async plugins, but it's no longer needed (and causes a warning) if the user has a more recent version installed. this PR detects the version of the plugin, if installed, and enables/disables the option accordingly.
🎉 This PR is included in version 4.9.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
rollup-plugin-typescript2 < v0.26 needs the
objectHashIgnoreUnknownHack
option to be enabled to correctly handle async functions in the plugin configuration, but it's no longer needed (and causes a warning) if the user has a more recent version installed.This PR detects the version of the plugin, if installed, and enables/disables the option accordingly.
Manually tested against rpt2 v0.25.3 and v0.27.0.
Closes #305