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

feat: return revert function for registers #604

Merged
merged 2 commits into from Apr 11, 2021

Conversation

antfu
Copy link
Contributor

@antfu antfu commented Mar 27, 2021

https://github.com/ariporad/pirates#usage

Allowing users to revert the hook registrations.

@codecov
Copy link

codecov bot commented Mar 27, 2021

Codecov Report

Merging #604 (c5591a7) into main (38b66f3) will increase coverage by 0.08%.
The diff coverage is 0.00%.

❗ Current head c5591a7 differs from pull request most recent head ce826a3. Consider uploading reports for the commit ce826a3 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #604      +/-   ##
==========================================
+ Coverage   81.87%   81.95%   +0.08%     
==========================================
  Files          55       55              
  Lines        5571     5808     +237     
  Branches     1314     1314              
==========================================
+ Hits         4561     4760     +199     
- Misses        726      764      +38     
  Partials      284      284              
Impacted Files Coverage Δ
src/register.ts 0.00% <0.00%> (ø)
src/util/formatTokens.ts 70.58% <0.00%> (-10.06%) ⬇️
src/parser/util/identifier.ts 90.90% <0.00%> (-4.10%) ⬇️
src/util/shouldElideDefaultExport.ts 77.77% <0.00%> (-3.48%) ⬇️
src/util/getClassInfo.ts 87.21% <0.00%> (-1.93%) ⬇️
src/parser/plugins/jsx/index.ts 91.33% <0.00%> (-1.48%) ⬇️
src/parser/plugins/flow.ts 63.72% <0.00%> (-1.28%) ⬇️
src/identifyShadowedGlobals.ts 87.80% <0.00%> (-1.09%) ⬇️
src/parser/traverser/expression.ts 88.10% <0.00%> (-0.11%) ⬇️
src/Options.ts 100.00% <0.00%> (ø)
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 38b66f3...ce826a3. Read the comment docs.

@github-actions
Copy link

Benchmark results

Before this PR: 253.8 thousand lines per second
After this PR: 251.9 thousand lines per second

Measured change: 0.73% slower (2.02% slower to 0.16% faster)
Summary: Likely no significant difference

Copy link
Owner

@alangpierce alangpierce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@alangpierce alangpierce merged commit debd5ca into alangpierce:main Apr 11, 2021
@antfu antfu deleted the feat/register-revert branch April 11, 2021 03:14
alangpierce added a commit that referenced this pull request Apr 11, 2021
From #604, use `for...of` rather than `.forEach`.

From #540, exclude optional chaining snippets in `removeToken`, switch JSX test
to actually test JSX.
alangpierce added a commit that referenced this pull request Apr 11, 2021
From #604, use `for...of` rather than `.forEach`.

From #540, exclude optional chaining snippets in `removeToken`, switch JSX test
to actually test JSX.
alangpierce added a commit that referenced this pull request Apr 11, 2021
From #604, use `for...of` rather than `.forEach`.

From #540, exclude optional chaining snippets in `removeToken`, switch JSX test
to actually test JSX.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants