- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 2k
 
Merge master into v11 #3943
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
base: v11
Are you sure you want to change the base?
Merge master into v11 #3943
Conversation
Co-authored-by: Jason Miller <[email protected]>
implement state settling in X
…3562) * ensure both onchange and oninput callbacks are attached to the event listener * remove custom hook and combiner callbacks in one * update implementation and unit test * remove only on tests and improve error handling * cover scenario changing order * allow uncaught error in unit test * use event hook to trigger oncompatchange handler * use oninputCapture rather than oninput when both callbacks are defined Co-authored-by: Jovi De Croock <[email protected]>
* add export maps to the subpackages * format * run pretteir on package json files
…-input restrict "oninputCapture" conversion to just "oninput" vs "oninput*"
          📊 Tachometer Benchmark ResultsSummaryduration
 usedJSHeapSize
 Results02_replace1k
 duration
 usedJSHeapSize
 run-warmup-0
 run-warmup-1
 run-warmup-2
 run-final
 03_update10th1k_x16
 duration
 usedJSHeapSize
 07_create10k
 duration
 usedJSHeapSize
 filter_list
 duration
 usedJSHeapSize
 hydrate1k
 duration
 usedJSHeapSize
 many_updates
 duration
 usedJSHeapSize
 text_update
 duration
 usedJSHeapSize
 todo
 duration
 usedJSHeapSize
  | 
    
| 
           Size Change: +778 B (2%) Total Size: 33.4 kB 
 ℹ️ View Unchanged
  | 
    
| This guide is intended for core team members that have the necessary | ||
| rights to publish new releases on npm. | ||
| 
               | 
          ||
| **TODO: Update instructions for v11 to include changesets** | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At some future point we should update these instructions. I created a task in our project to track that.
| * Strict Mode is not implemented in Preact, so we provide a stand-in for it | ||
| * that just renders its children without imposing any restrictions. | ||
| */ | ||
| const StrictMode = Fragment; | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved below flushSync to match master
| function is(x, y) { | ||
| return (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y); | ||
| } | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to utils file to match master
| }; | ||
| 
               | 
          ||
| /** @this {import('../../src/internal').Component} */ | ||
| Component.prototype.forceUpdate = function(callback) { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check still exists in master so i've brought it back to keep them in-sync. For this change, I'd say we should do it in both or neither. I don't think this particular change (i.e. removing this earning) needs to be delayed for a major release.
| // TODO: Required for RTS which currently doesn't set the `.data` property. | ||
| // Should we move this to RTS? | ||
| if (!currentInternal.data) { | ||
| currentInternal.data = {}; | ||
| } | ||
| 
               | 
          
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a task to the project board for this
| }); | ||
| } | ||
| 
               | 
          ||
| if (internal.data._stateCallbacks) { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JoviDeCroock Is this move safe? All tests pass but it could use your eyes as well to double check. I moved it so state callbacks and componentDidUpdate are invoked in the same order as React and v10
| 
           Fix the benchmarks by manually setting debounceRendering to queueMicrotask so every version is batching using the same behavior and the numbers we are comparing are the same measurements in each version. 
 
  | 
    
A lot of good work has gone into v10 and I lost track of what changes have been cherry-picked into v11 and which ones still needed to be brought over so I did a full merge from master to v11. I think at one point we decided not to do full merges, but I figured since there has been a surge in work on v10, doing a full merge would ensure nothing was missed. I'll try to start doing these more regularly so that they are more approachable and things stay in sync.
Since this is a massive change, I'll try to summarize the significant changes and add comments in the PR for the interesting parts.
Changes:
useIdimplementationisStaticChildrento jsx-runtime packagesnullandundefinedto empty string when callingstyle.setPropertyundefinedto JSX types to support new TS option