From 38f392ceda9a3eb0520261a595fd7009c98579c8 Mon Sep 17 00:00:00 2001 From: Bowen Date: Sat, 27 Feb 2021 08:11:28 +1100 Subject: [PATCH] typo fix for the word 'Psuedo' (#20894) Co-authored-by: Bowen Li --- .../__tests__/ReactDOMTestSelectors-test.internal.js | 6 +++--- packages/react-dom/testing.classic.fb.js | 2 +- packages/react-dom/testing.js | 2 +- packages/react-dom/testing.modern.fb.js | 2 +- packages/react-reconciler/src/ReactFiberReconciler.js | 10 +++++----- .../react-reconciler/src/ReactFiberReconciler.new.js | 2 +- .../react-reconciler/src/ReactFiberReconciler.old.js | 2 +- packages/react-reconciler/src/ReactTestSelectors.js | 10 +++++----- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/react-dom/src/__tests__/ReactDOMTestSelectors-test.internal.js b/packages/react-dom/src/__tests__/ReactDOMTestSelectors-test.internal.js index 901b1bb2a9ce5..20fe21a73b4ca 100644 --- a/packages/react-dom/src/__tests__/ReactDOMTestSelectors-test.internal.js +++ b/packages/react-dom/src/__tests__/ReactDOMTestSelectors-test.internal.js @@ -14,7 +14,7 @@ describe('ReactDOMTestSelectors', () => { let act; let createComponentSelector; - let createHasPsuedoClassSelector; + let createHasPseudoClassSelector; let createRoleSelector; let createTextSelector; let createTestNameSelector; @@ -35,7 +35,7 @@ describe('ReactDOMTestSelectors', () => { const ReactDOM = require('react-dom/testing'); act = ReactDOM.act; createComponentSelector = ReactDOM.createComponentSelector; - createHasPsuedoClassSelector = ReactDOM.createHasPsuedoClassSelector; + createHasPseudoClassSelector = ReactDOM.createHasPseudoClassSelector; createRoleSelector = ReactDOM.createRoleSelector; createTextSelector = ReactDOM.createTextSelector; createTestNameSelector = ReactDOM.createTestNameSelector; @@ -454,7 +454,7 @@ describe('ReactDOMTestSelectors', () => { const matches = findAllNodes(document.body, [ createComponentSelector(Example), createRoleSelector('article'), - createHasPsuedoClassSelector([ + createHasPseudoClassSelector([ createRoleSelector('heading'), createTextSelector('Should match'), ]), diff --git a/packages/react-dom/testing.classic.fb.js b/packages/react-dom/testing.classic.fb.js index 3efdba40b78ae..923ba78f09d1a 100644 --- a/packages/react-dom/testing.classic.fb.js +++ b/packages/react-dom/testing.classic.fb.js @@ -11,7 +11,7 @@ export * from './index.classic.fb.js'; export { act, createComponentSelector, - createHasPsuedoClassSelector, + createHasPseudoClassSelector, createRoleSelector, createTestNameSelector, createTextSelector, diff --git a/packages/react-dom/testing.js b/packages/react-dom/testing.js index b791e98369cca..d66124f67d83e 100644 --- a/packages/react-dom/testing.js +++ b/packages/react-dom/testing.js @@ -11,7 +11,7 @@ export * from './index.js'; export { act, createComponentSelector, - createHasPsuedoClassSelector, + createHasPseudoClassSelector, createRoleSelector, createTestNameSelector, createTextSelector, diff --git a/packages/react-dom/testing.modern.fb.js b/packages/react-dom/testing.modern.fb.js index 661e6db076d1b..7f22bb849e7c6 100644 --- a/packages/react-dom/testing.modern.fb.js +++ b/packages/react-dom/testing.modern.fb.js @@ -11,7 +11,7 @@ export * from './index.modern.fb.js'; export { act, createComponentSelector, - createHasPsuedoClassSelector, + createHasPseudoClassSelector, createRoleSelector, createTestNameSelector, createTextSelector, diff --git a/packages/react-reconciler/src/ReactFiberReconciler.js b/packages/react-reconciler/src/ReactFiberReconciler.js index 29b52c5a00092..f1e1ac64645c8 100644 --- a/packages/react-reconciler/src/ReactFiberReconciler.js +++ b/packages/react-reconciler/src/ReactFiberReconciler.js @@ -40,7 +40,7 @@ import { act as act_old, createPortal as createPortal_old, createComponentSelector as createComponentSelector_old, - createHasPsuedoClassSelector as createHasPsuedoClassSelector_old, + createHasPseudoClassSelector as createHasPseudoClassSelector_old, createRoleSelector as createRoleSelector_old, createTestNameSelector as createTestNameSelector_old, createTextSelector as createTextSelector_old, @@ -84,7 +84,7 @@ import { act as act_new, createPortal as createPortal_new, createComponentSelector as createComponentSelector_new, - createHasPsuedoClassSelector as createHasPsuedoClassSelector_new, + createHasPseudoClassSelector as createHasPseudoClassSelector_new, createRoleSelector as createRoleSelector_new, createTestNameSelector as createTestNameSelector_new, createTextSelector as createTextSelector_new, @@ -190,9 +190,9 @@ export const IdleEventPriority = enableNewReconciler : IdleEventPriority_old; //TODO: "psuedo" is spelled "pseudo" -export const createHasPsuedoClassSelector = enableNewReconciler - ? createHasPsuedoClassSelector_new - : createHasPsuedoClassSelector_old; +export const createHasPseudoClassSelector = enableNewReconciler + ? createHasPseudoClassSelector_new + : createHasPseudoClassSelector_old; export const createRoleSelector = enableNewReconciler ? createRoleSelector_new : createRoleSelector_old; diff --git a/packages/react-reconciler/src/ReactFiberReconciler.new.js b/packages/react-reconciler/src/ReactFiberReconciler.new.js index cc639fa0865f6..2c5c183163c50 100644 --- a/packages/react-reconciler/src/ReactFiberReconciler.new.js +++ b/packages/react-reconciler/src/ReactFiberReconciler.new.js @@ -108,7 +108,7 @@ export {registerMutableSourceForHydration} from './ReactMutableSource.new'; export {createPortal} from './ReactPortal'; export { createComponentSelector, - createHasPsuedoClassSelector, + createHasPseudoClassSelector, createRoleSelector, createTestNameSelector, createTextSelector, diff --git a/packages/react-reconciler/src/ReactFiberReconciler.old.js b/packages/react-reconciler/src/ReactFiberReconciler.old.js index 3044bf934daf8..430db15494e02 100644 --- a/packages/react-reconciler/src/ReactFiberReconciler.old.js +++ b/packages/react-reconciler/src/ReactFiberReconciler.old.js @@ -108,7 +108,7 @@ export {registerMutableSourceForHydration} from './ReactMutableSource.old'; export {createPortal} from './ReactPortal'; export { createComponentSelector, - createHasPsuedoClassSelector, + createHasPseudoClassSelector, createRoleSelector, createTestNameSelector, createTextSelector, diff --git a/packages/react-reconciler/src/ReactTestSelectors.js b/packages/react-reconciler/src/ReactTestSelectors.js index d225a6c94a385..ebe50a94ed3fb 100644 --- a/packages/react-reconciler/src/ReactTestSelectors.js +++ b/packages/react-reconciler/src/ReactTestSelectors.js @@ -47,7 +47,7 @@ type ComponentSelector = {| value: React$AbstractComponent, |}; -type HasPsuedoClassSelector = {| +type HasPseudoClassSelector = {| $$typeof: Type, value: Array, |}; @@ -69,7 +69,7 @@ type TestNameSelector = {| type Selector = | ComponentSelector - | HasPsuedoClassSelector + | HasPseudoClassSelector | RoleSelector | TextSelector | TestNameSelector; @@ -83,9 +83,9 @@ export function createComponentSelector( }; } -export function createHasPsuedoClassSelector( +export function createHasPseudoClassSelector( selectors: Array, -): HasPsuedoClassSelector { +): HasPseudoClassSelector { return { $$typeof: HAS_PSEUDO_CLASS_TYPE, value: selectors, @@ -143,7 +143,7 @@ function matchSelector(fiber: Fiber, selector: Selector): boolean { case HAS_PSEUDO_CLASS_TYPE: return hasMatchingPaths( fiber, - ((selector: any): HasPsuedoClassSelector).value, + ((selector: any): HasPseudoClassSelector).value, ); case ROLE_TYPE: if (fiber.tag === HostComponent) {