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

await act(async () => ...) #14853

Merged
merged 71 commits into from Apr 2, 2019
Merged

Commits on Feb 12, 2019

  1. hacked up act(async () => {...})

    Sunil Pai committed Feb 12, 2019
    Copy the full SHA
    9791a6b View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2019

  1. move stuff around

    Sunil Pai committed Feb 14, 2019
    Copy the full SHA
    49876c3 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    d16525a View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    0a1b308 View commit details
    Browse the repository at this point in the history
  4. merge changes

    Sunil Pai committed Feb 14, 2019
    Copy the full SHA
    5cf26ba View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2019

  1. Copy the full SHA
    d2ea31e View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    c7e07c7 View commit details
    Browse the repository at this point in the history
  3. move testutils.act back into testutils

    Sunil Pai committed Feb 15, 2019
    Copy the full SHA
    3c4142b View commit details
    Browse the repository at this point in the history
  4. move into scheduler, rename some bits

    Sunil Pai committed Feb 15, 2019
    Copy the full SHA
    331d9eb View commit details
    Browse the repository at this point in the history
  5. smaller bundle

    Sunil Pai committed Feb 15, 2019
    Copy the full SHA
    d0daebf View commit details
    Browse the repository at this point in the history
  6. a comment for why we don't do typeof === 'function'

    Sunil Pai committed Feb 15, 2019
    Copy the full SHA
    00c2fd6 View commit details
    Browse the repository at this point in the history
  7. fix test

    Sunil Pai committed Feb 15, 2019
    Copy the full SHA
    788fd73 View commit details
    Browse the repository at this point in the history
  8. pass tests - fire, prod

    Sunil Pai committed Feb 15, 2019
    Copy the full SHA
    cd2f191 View commit details
    Browse the repository at this point in the history
  9. lose actContainerElement

    Sunil Pai committed Feb 15, 2019
    Copy the full SHA
    6af7e80 View commit details
    Browse the repository at this point in the history
  10. tighter

    Sunil Pai committed Feb 15, 2019
    Copy the full SHA
    a8fb80b View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2019

  1. write a test for TestRenderer

    it's an odd one, because not only does sync act not flush effects correctly, but the async one does (wut). verified it's fine with the dom version.
    Sunil Pai committed Feb 16, 2019
    Copy the full SHA
    955d590 View commit details
    Browse the repository at this point in the history
  2. lint

    Sunil Pai committed Feb 16, 2019
    Copy the full SHA
    ee8086a View commit details
    Browse the repository at this point in the history
  3. rewrote to move flushing logic closer to the renderer

    the scheduler's `flushPassiveEffects` didn't work as expected for the test renderer, so I decided to go back to the hack (rendering a dumb container) This also makes reactdom not as heavy (by a few bytes, but still).
    Sunil Pai committed Feb 16, 2019
    Copy the full SHA
    441e597 View commit details
    Browse the repository at this point in the history
  4. move it around so the delta isn't too bad

    Sunil Pai committed Feb 16, 2019
    Copy the full SHA
    c07174b View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2019

  1. Copy the full SHA
    95bffdf View commit details
    Browse the repository at this point in the history
  2. cleanups

    fix promise chaining
    propagate errors correctly
    test for thenable the 'right' way
    more tests!
    tidier!
    ponies!
    Sunil Pai committed Feb 25, 2019
    Copy the full SHA
    0fe5318 View commit details
    Browse the repository at this point in the history
  3. Stray comment

    Sunil Pai committed Feb 25, 2019
    Copy the full SHA
    c0a4573 View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2019

  1. recursively flush effects

    Sunil Pai committed Feb 28, 2019
    Copy the full SHA
    1b1a896 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    06d8391 View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2019

  1. Copy the full SHA
    6c2bcc5 View commit details
    Browse the repository at this point in the history
  2. fixed tests

    Sunil Pai committed Mar 1, 2019
    Copy the full SHA
    3028209 View commit details
    Browse the repository at this point in the history
  3. lint, move noop.act into react-reconciler

    Sunil Pai committed Mar 1, 2019
    Copy the full SHA
    7da103b View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2019

  1. Copy the full SHA
    cc51fca View commit details
    Browse the repository at this point in the history
  2. pass fb lint

    we could have globally changed our eslint config to assume Promise is available, but that means we expect a promise polyfill on the page, and we don't yet. this code is triggered only in jest anyway, and we're fairly certain Promise will be available there. hence, the once-off disable for the check
    Sunil Pai committed Mar 4, 2019
    Copy the full SHA
    91a3ff4 View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2019

  1. Copy the full SHA
    a5e84e2 View commit details
    Browse the repository at this point in the history
  2. shorter timers, fix a test, test for Promise

    Sunil Pai committed Mar 6, 2019
    Copy the full SHA
    8688517 View commit details
    Browse the repository at this point in the history

Commits on Mar 8, 2019

  1. use global.Promise for existence check

    Sunil Pai committed Mar 8, 2019
    Copy the full SHA
    308d14f View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    edfafa5 View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2019

  1. Copy the full SHA
    13f43fd View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2019

  1. flush microtasks

    Sunil Pai committed Mar 13, 2019
    Copy the full SHA
    6283cf4 View commit details
    Browse the repository at this point in the history
  2. a version that works in browsers (that support postMessage)

    I also added a sanity fixture inside fixtures/dom/ mostly for me.
    Sunil Pai committed Mar 13, 2019
    Copy the full SHA
    38bf178 View commit details
    Browse the repository at this point in the history
  3. hoist flushEffectsAndMicroTasks

    Sunil Pai committed Mar 13, 2019
    Copy the full SHA
    ab521ce View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2019

  1. pull out tick logic from ReactFiberScheduler

    Sunil Pai committed Mar 14, 2019
    Copy the full SHA
    ae46998 View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2019

  1. fix await act (...sync) hanging

    - fix a hang when awaiting sync logic
    - a better async/await test for test renderer
    Sunil Pai committed Mar 15, 2019
    Copy the full SHA
    2779bae View commit details
    Browse the repository at this point in the history
  2. feedback changes

    - use node's setImmediate if available
    - a warning if MessageChannel isn't available
    - rename some functions
    Sunil Pai committed Mar 15, 2019
    Copy the full SHA
    d36b8d5 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    3766812 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    f66ed55 View commit details
    Browse the repository at this point in the history
  5. prettier

    the prettiest, even.
    Sunil Pai committed Mar 15, 2019
    Copy the full SHA
    ad55c26 View commit details
    Browse the repository at this point in the history
  6. use globalPromise for the missed await warning

    Sunil Pai committed Mar 15, 2019
    Copy the full SHA
    a29f008 View commit details
    Browse the repository at this point in the history
  7. __DEV__ check for didWarnAboutMessageChannel

    Sunil Pai committed Mar 15, 2019
    Copy the full SHA
    a777344 View commit details
    Browse the repository at this point in the history
  8. Copy the full SHA
    aa37d51 View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2019

  1. tinier. better.

    - pulled most bits out of FiberScheduler
    - actedUpdates uses callbacks now
    Sunil Pai committed Mar 16, 2019
    Copy the full SHA
    c4afc5f View commit details
    Browse the repository at this point in the history
  2. pass build validation

    Sunil Pai committed Mar 16, 2019
    Copy the full SHA
    7998527 View commit details
    Browse the repository at this point in the history
  3. augh prettier

    Sunil Pai committed Mar 16, 2019
    Copy the full SHA
    e37602b View commit details
    Browse the repository at this point in the history
  4. golfing 7 more chars

    Sunil Pai committed Mar 16, 2019
    Copy the full SHA
    58ecb21 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    04a4e91 View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    cdcbc7c View commit details
    Browse the repository at this point in the history
  7. Copy the full SHA
    6a8cc02 View commit details
    Browse the repository at this point in the history
  8. export doesHavePendingPassiveEffects, nits

    Sunil Pai committed Mar 16, 2019
    Copy the full SHA
    429bda2 View commit details
    Browse the repository at this point in the history

Commits on Mar 24, 2019

  1. createAct()

    Sunil Pai committed Mar 24, 2019
    Copy the full SHA
    adc92b4 View commit details
    Browse the repository at this point in the history
  2. dead code

    Sunil Pai committed Mar 24, 2019
    Copy the full SHA
    c1ee84e View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2019

  1. Copy the full SHA
    53d3fbf View commit details
    Browse the repository at this point in the history
  2. missed in merge?

    Sunil Pai committed Mar 25, 2019
    Copy the full SHA
    ad548b5 View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2019

  1. Copy the full SHA
    8e4ea16 View commit details
    Browse the repository at this point in the history
  2. lose the preflushing bits

    Sunil Pai committed Mar 27, 2019
    Copy the full SHA
    573a991 View commit details
    Browse the repository at this point in the history
  3. ugh prettier

    Sunil Pai committed Mar 27, 2019
    Copy the full SHA
    91d40cd View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2019

  1. Copy the full SHA
    c97cee4 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    65d9d0c View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2019

  1. rearrange imports so builds work, remove the hack versions of flushPa…

    …ssiveEffects
    Sunil Pai committed Apr 1, 2019
    Copy the full SHA
    efffcb4 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    d01d0c9 View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2019

  1. use a shared flag on React.__SECRET...

    Sunil Pai committed Apr 2, 2019
    Copy the full SHA
    8737f7d View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    5a9081a View commit details
    Browse the repository at this point in the history
  3. review feedback

    shared/enqueueTask
    
    import ReactSharedInternals from 'shared/ReactSharedInternals';
    
    simpler act() internals
    
    ReactSharedInternals.ReactShouldWarnActingUpdates
    Sunil Pai committed Apr 2, 2019
    Copy the full SHA
    44236c9 View commit details
    Browse the repository at this point in the history
  4. move act() implementation into createReactNoop

    Sunil Pai committed Apr 2, 2019
    Copy the full SHA
    068561a View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    abf1e3a View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    e49e043 View commit details
    Browse the repository at this point in the history