Skip to content

Commit ff8c1a7

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents dddcfe5 + 9627b5a commit ff8c1a7

File tree

14 files changed

+106
-19
lines changed

14 files changed

+106
-19
lines changed

compiler/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ yarn snap minimize --update <path>
7676

7777
## Version Control
7878

79-
This repository uses Sapling (`sl`) for version control. Sapling is similar to Mercurial: there is not staging area, but new/deleted files must be explicitlyu added/removed.
79+
This repository uses Sapling (`sl`) for version control. Sapling is similar to Mercurial: there is not staging area, but new/deleted files must be explicitly added/removed.
8080

8181
```bash
8282
# Check status

compiler/packages/babel-plugin-react-compiler/src/Inference/InferMutationAliasingEffects.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ function inferBlock(
513513
if (handlerParam != null) {
514514
CompilerError.invariant(state.kind(handlerParam) != null, {
515515
reason:
516-
'Expected catch binding to be intialized with a DeclareLocal Catch instruction',
516+
'Expected catch binding to be initialized with a DeclareLocal Catch instruction',
517517
loc: terminal.loc,
518518
});
519519
const effects: Array<AliasingEffect> = [];
@@ -1315,7 +1315,7 @@ class InferenceState {
13151315
#values: Map<InstructionValue, AbstractValue>;
13161316
/*
13171317
* The set of values pointed to by each identifier. This is a set
1318-
* to accomodate phi points (where a variable may have different
1318+
* to accommodate phi points (where a variable may have different
13191319
* values from different control flow paths).
13201320
*/
13211321
#variables: Map<IdentifierId, Set<InstructionValue>>;

compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/InferReactiveScopeVariables.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export function inferReactiveScopeVariables(fn: HIRFunction): void {
143143
}
144144

145145
/*
146-
* Validate that all scopes have properly intialized, valid mutable ranges
146+
* Validate that all scopes have properly initialized, valid mutable ranges
147147
* within the span of instructions for this function, ie from 1 to 1 past
148148
* the last instruction id.
149149
*/

compiler/packages/babel-plugin-react-compiler/src/__tests__/Logger-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import invariant from 'invariant';
1010
import {runBabelPluginReactCompiler} from '../Babel/RunReactCompilerBabelPlugin';
1111
import type {Logger, LoggerEvent} from '../Entrypoint';
1212

13-
it('logs succesful compilation', () => {
13+
it('logs successful compilation', () => {
1414
const logs: [string | null, LoggerEvent][] = [];
1515
const logger: Logger = {
1616
logEvent(filename, event) {

packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4062,7 +4062,7 @@ export function registerSuspenseInstanceRetry(
40624062
instance.data !== SUSPENSE_PENDING_START_DATA ||
40634063
// The boundary is still in pending status but the document has finished loading
40644064
// before we could register the event handler that would have scheduled the retry
4065-
// on load so we call teh callback now.
4065+
// on load so we call the callback now.
40664066
ownerDocument.readyState !== DOCUMENT_READY_STATE_LOADING
40674067
) {
40684068
callback();

packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5328,7 +5328,7 @@ export function writeHoistablesForBoundary(
53285328
hoistableState.stylesheets.forEach(hasStylesToHoist);
53295329

53305330
// We don't actually want to flush any hoistables until the boundary is complete so we omit
5331-
// any further writing here. This is becuase unlike Resources, Hoistable Elements act more like
5331+
// any further writing here. This is because unlike Resources, Hoistable Elements act more like
53325332
// regular elements, each rendered element has a unique representation in the DOM. We don't want
53335333
// these elements to appear in the DOM early, before the boundary has actually completed
53345334

packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9241,7 +9241,7 @@ describe('ReactDOMFizzServer', () => {
92419241

92429242
it('should always flush the boundaries contributing the preamble regardless of their size', async () => {
92439243
const longDescription =
9244-
`I need to make this segment somewhat large because it needs to be large enought to be outlined during the initial flush. Setting the progressive chunk size to near zero isn't enough because there is a fixed minimum size that we use to avoid doing the size tracking altogether and this needs to be larger than that at least.
9244+
`I need to make this segment somewhat large because it needs to be large enough to be outlined during the initial flush. Setting the progressive chunk size to near zero isn't enough because there is a fixed minimum size that we use to avoid doing the size tracking altogether and this needs to be larger than that at least.
92459245
92469246
Unfortunately that previous paragraph wasn't quite long enough so I'll continue with some more prose and maybe throw on some repeated additional strings at the end for good measure.
92479247
@@ -9277,7 +9277,7 @@ Unfortunately that previous paragraph wasn't quite long enough so I'll continue
92779277

92789278
it('should track byte size of shells that may contribute to the preamble when determining if the blocking render exceeds the max size', async () => {
92799279
const longDescription =
9280-
`I need to make this segment somewhat large because it needs to be large enought to be outlined during the initial flush. Setting the progressive chunk size to near zero isn't enough because there is a fixed minimum size that we use to avoid doing the size tracking altogether and this needs to be larger than that at least.
9280+
`I need to make this segment somewhat large because it needs to be large enough to be outlined during the initial flush. Setting the progressive chunk size to near zero isn't enough because there is a fixed minimum size that we use to avoid doing the size tracking altogether and this needs to be larger than that at least.
92819281
92829282
Unfortunately that previous paragraph wasn't quite long enough so I'll continue with some more prose and maybe throw on some repeated additional strings at the end for good measure.
92839283

packages/react-dom/src/__tests__/ReactDOMHydrationDiff-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,7 @@ describe('ReactDOMServerHydration', () => {
12601260
}
12611261

12621262
// @TODO changes made to sending Fizz errors to client led to the insertion of templates in client rendered
1263-
// suspense boundaries. This leaks in this test becuase the client rendered suspense boundary appears like
1263+
// suspense boundaries. This leaks in this test because the client rendered suspense boundary appears like
12641264
// unhydrated tail nodes and this template is the first match. When we add special case handling for client
12651265
// rendered suspense boundaries this test will likely change again
12661266
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`

packages/react-reconciler/src/ReactFiberCompleteWork.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1258,7 +1258,7 @@ function completeWork(
12581258
markUpdate(workInProgress);
12591259
}
12601260
} else {
1261-
// We use the updateHostComponent path becuase it produces
1261+
// We use the updateHostComponent path because it produces
12621262
// the update queue we need for Hoistables.
12631263
updateHostComponent(
12641264
current,

packages/react-reconciler/src/ReactFiberNewContext.js

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -323,12 +323,23 @@ function propagateContextChanges<T>(
323323
renderLanes,
324324
workInProgress,
325325
);
326-
if (!forcePropagateEntireTree) {
327-
// During lazy propagation, we can defer propagating changes to
328-
// the children, same as the consumer match above.
329-
nextFiber = null;
326+
// The primary children's fibers may not exist in the tree (they
327+
// were discarded on initial mount if they suspended). However, the
328+
// fallback children ARE in the committed tree and visible to the
329+
// user. We need to continue propagating into the fallback subtree
330+
// so that its context consumers are marked for re-render.
331+
//
332+
// The fiber structure is:
333+
// SuspenseComponent
334+
// → child: OffscreenComponent (primary, hidden)
335+
// → sibling: FallbackFragment
336+
//
337+
// Skip the primary (hidden) subtree and jump to the fallback.
338+
const primaryChildFragment = fiber.child;
339+
if (primaryChildFragment !== null) {
340+
nextFiber = primaryChildFragment.sibling;
330341
} else {
331-
nextFiber = fiber.child;
342+
nextFiber = null;
332343
}
333344
} else {
334345
// Traverse down.

0 commit comments

Comments
 (0)