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

Return hook result inside promise with async timer end #4010

Merged
merged 1 commit into from Mar 24, 2021

Conversation

SuperOleg39
Copy link
Contributor

@SuperOleg39 SuperOleg39 commented Mar 24, 2021

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:

Fix after #4004

Description

#4004 replace plugin hooks result promises, and forget to return original promises payload.
For this reason, rollup builds with perf option, and with @rollup/plugin-typescript for example, was broken - because load plugin hook can return modified input, and this input has been discarded.

@codecov
Copy link

codecov bot commented Mar 24, 2021

Codecov Report

Merging #4010 (5e83e83) into master (f67e6c9) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4010      +/-   ##
==========================================
- Coverage   97.24%   97.21%   -0.03%     
==========================================
  Files         192      192              
  Lines        6760     6762       +2     
  Branches     1973     1973              
==========================================
  Hits         6574     6574              
- Misses         99      101       +2     
  Partials       87       87              
Impacted Files Coverage Δ
src/utils/timers.ts 57.35% <0.00%> (-1.74%) ⬇️

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 f67e6c9...5e83e83. Read the comment docs.

Copy link
Member

@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

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

Thanks

@lukastaegert lukastaegert merged commit 9d87d93 into rollup:master Mar 24, 2021
@lukastaegert
Copy link
Member

Reminds me, we should think about a testing strategy for this option

@gluck
Copy link
Contributor

gluck commented Mar 29, 2021

Apologies for the issue, it was really obvious and I missed it 😭

SuperOleg39 referenced this pull request Jan 18, 2022
* refactor: performance timers for node.js and browser

* simplify, add return types

* refactor: replace object with array

* refactor: replace fn.apply with spread

* refactor: use map

* nit

* export performance object

* type fixes

* fix browser perf test, add comment

* export entire process object

* remove type assertion in rollup.config

* remove comment

* extract interface

* check for performance object in alternative environments

Co-authored-by: Lukas Taegert-Atkinson <lukastaegert@users.noreply.github.com>
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

3 participants