Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: facebook/react
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e740d4b14b27b4c7a21f67d20a4526a57d6729a7
Choose a base ref
...
head repository: facebook/react
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5d19e1c8d1a6c0b5cd7532d43b707191eaf105b7
Choose a head ref
  • 5 commits
  • 25 files changed
  • 5 contributors

Commits on Sep 19, 2024

  1. [lint] Add no-optional-chaining (#31003)

    ## Overview
    
    Adds a lint rule to prevent optional chaining to catch issues like
    #30982 until we support optional
    chaining without a bundle impact.
    rickhanlonii authored Sep 19, 2024
    1 Configuration menu
    Copy the full SHA
    babde5d View commit details
    Browse the repository at this point in the history
  2. Update react-native/react-dom build directory (#31006)

    Commit artifact actions are breaking after
    #30711
    
    See:
    https://github.com/facebook/react/actions/runs/10930658977/job/30344033974
    
    > mv: cannot stat 'build/facebook-react-native/react/dom/': No such file
    or directory
    
    After build, the new artifacts are in `/react-dom/cjs`, not
    `/react/dom/`
    ```
    $> yarn build
    $> ls build/facebook-react-native/react/
    # ... no dom
    $> ls build/facebook-react-native/react-dom/cjs
    ```
    jackpope authored Sep 19, 2024
    Configuration menu
    Copy the full SHA
    e495392 View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2024

  1. [Fizz] Include componentStack at the root when aborting (#31011)

    When aborting we currently don't produce a componentStack when aborting
    the shell. This is likely just an oversight and this change updates this
    behavior to be consistent with what we do when there is a boundary
    gnoff authored Sep 20, 2024
    Configuration menu
    Copy the full SHA
    ae75d5a View commit details
    Browse the repository at this point in the history
  2. [Fiber] Track Event Time, startTransition Time and setState Time (#31008

    )
    
    This tracks the current window.event.timeStamp the first time we
    setState or call startTransition. For either the blocking track or
    transition track. We can use this to show how long we were blocked by
    other events or overhead from when the user interacted until we got
    called into React.
    
    Then we track the time we start awaiting a Promise returned from
    startTransition. We can use this track how long we waited on an Action
    to complete before setState was called.
    
    Then finally we track when setState was called so we can track how long
    we were blocked by other word before we could actually start rendering.
    For a Transition this might be blocked by Blocking React render work.
    
    We only log these once a subsequent render actually happened. If no
    render was actually scheduled, then we don't log these. E.g. if an
    isomorphic Action doesn't call startTransition there's no render so we
    don't log it.
    
    We only log the first event/update/transition even if multiple are
    batched into it later. If multiple Actions are entangled they're all
    treated as one until an update happens. If no update happens and all
    entangled actions finish, we clear the transition so that the next time
    a new sequence starts we can log it.
    
    We also clamp these (start the track later) if they were scheduled
    within a render/commit. Since we share a single track we don't want to
    create overlapping tracks.
    
    The purpose of this is not to show every event/action that happens but
    to show a prelude to how long we were blocked before a render started.
    So you can follow the first event to commit.
    
    <img width="674" alt="Screenshot 2024-09-20 at 1 59 58 AM"
    src="https://github.com/user-attachments/assets/151ba9e8-6b3c-4fa1-9f8d-e3602745eeb7">
    
    I still need to add the rendering/suspended phases to the timeline which
    why this screenshot has a gap.
    
    <img width="993" alt="Screenshot 2024-09-20 at 12 50 27 AM"
    src="https://github.com/user-attachments/assets/155b6675-b78a-4a22-a32b-212c15051074">
    
    In this case it's a Form Action which started a render into the form
    which then suspended on the action. The action then caused a refresh,
    which interrupts with its own update that's blocked before rendering.
    Suspended roots like this is interesting because we could in theory
    start working on a different root in the meantime which makes this
    timeline less linear.
    sebmarkbage authored Sep 20, 2024
    Configuration menu
    Copy the full SHA
    d4688df View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2024

  1. Fix: profiling crashes #30661 #28838 (#31024)

    <!--
      Thanks for submitting a pull request!
    We appreciate you spending the time to work on these changes. Please
    provide enough information so that others can review your pull request.
    The three fields below are mandatory.
    
    Before submitting a pull request, please make sure the following is
    done:
    
    1. Fork [the repository](https://github.com/facebook/react) and create
    your branch from `main`.
      2. Run `yarn` in the repository root.
    3. If you've fixed a bug or added code that should be tested, add tests!
    4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch
    TestName` is helpful in development.
    5. Run `yarn test --prod` to test in the production environment. It
    supports the same options as `yarn test`.
    6. If you need a debugger, run `yarn test --debug --watch TestName`,
    open `chrome://inspect`, and press "Inspect".
    7. Format your code with
    [prettier](https://github.com/prettier/prettier) (`yarn prettier`).
    8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only
    check changed files.
      9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
      10. If you haven't already, complete the CLA.
    
    Learn more about contributing:
    https://reactjs.org/docs/how-to-contribute.html
    -->
    
    ## Summary
    
    Profiling fails sometimes because `onProfilingStatus` is called
    repeatedly on some occasions, e.g. multiple calls to
    `getProfilingStatus`.
    
    Subsequent calls should be a no-op if the profiling status hasn't
    changed.
    
    Reported via #30661 #28838.
    
    > [!TIP]
    > Hide whitespace changes on this PR
    
    <img width="328" alt="screenshot showing the UI controls for hiding
    whitespace changes on GitHub"
    src="https://github.com/user-attachments/assets/036385cf-2610-4e69-a717-17c05d7ef047">
    
    
    ## How did you test this change?
    
    <!--
    Demonstrate the code is solid. Example: The exact commands you ran and
    their output, screenshots / videos if the pull request changes the user
    interface.
    How exactly did you verify that your PR solves the issue you wanted to
    solve?
      If you leave this empty, your PR will very likely be closed.
    -->
    
    Tested as part of Fusebox implementation of reload-to-profile.
    
    #31021
    EdmondChuiHW authored Sep 23, 2024
    Configuration menu
    Copy the full SHA
    5d19e1c View commit details
    Browse the repository at this point in the history
Loading