-
Notifications
You must be signed in to change notification settings - Fork 28.5k
fix: correct spelling errors across codebase #79946
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: canary
Are you sure you want to change the base?
Conversation
…essages Fix critical spelling errors in React DOM development builds: - "componentWillRecieveProps" → "componentWillReceiveProps" - "UNSAFE_componentWillRecieveProps" → "UNSAFE_componentWillReceiveProps" These typos appear in error messages shown to developers when they misspell React lifecycle methods, creating confusion during debugging. Affected files: - packages/next/src/compiled/react-dom*/cjs/*.development.js (16 files) The error messages now correctly spell the lifecycle method names, improving developer experience and reducing debugging confusion.
- `validate-google-font-function-call.ts`: "recieved" → "received", "preloadeable" → "preloadable" - `postcss-next-font.ts`: "recieves" → "receives" - `utils.ts`: "compatiblity" → "compatibility"
- `index.test.ts`: "seperate" → "separate" - `draft-mode.test.ts`: "unintialized" → "uninitialized" - `hooks.test.ts`: "unintialized" → "uninitialized" - `editor.tsx`: "initalizing" → "initializing"
- `overridden/[slug].js`: "overriden" → "overridden" - `index.ts`: "dependecy" → "dependency" - `README.md`: "occurences" → "occurrences" - `main.rs`: "occurences" → "occurrences" - `route_tree.rs`: "unneccesary" → "unnecessary" - `mod.rs`: "intially" → "initially" - `module_batches.rs`: "occurences" → "occurrences" - `dash_map_multi.rs`: "occured" → "occurred" - `url.rs`: "overriden" → "overridden"
|
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
CodSpeed Performance ReportMerging #79946 will not alter performanceComparing Summary
Benchmarks breakdown
|
The changes in the react-dom are wrong. This is error handling code specifically to display an error to correct users who misspelled the method. The error message
is completely nonsensical; the previous spelling was correct because it’s an error message about a typo. Moreover, this is a generated/vendored file, and any changes to it need to happen upstream in facebook/react. |
This reverts commit bba8e7d. The original commit incorrectly "fixed" misspellings like `componentWillRecieveProps`, which are actually intentional. These typos appear in compiled React DOM files and are used in error messages to detect and guide developers who write incorrect lifecycle method names. Correcting them breaks the logic that identifies those mistakes.
You're absolutely right — these were intentional typos used to detect incorrect lifecycle method names and guide developers with accurate suggestions. By "fixing" the typo, I accidentally broke the error detection logic. I've reverted the changes to all Thanks for the detailed feedback! |
What
This PR fixes multiple spelling errors across the Next.js codebase, improving code quality, documentation readability, and developer experience across 18 files.
Why
Spelling errors in code comments, documentation, and error messages can:
The Next.js contribution guide explicitly welcomes typo fixes as valuable contributions to improve documentation quality.
How
Systematically corrected common spelling mistakes across five main areas:
WordPress Example Documentation (1 file):
decired
→desired
exhanges
→exchanges
recieving
→receiving
loose
→lose
has
→have
(subject-verb agreement)revalidates
→revalidate
(parallel structure)everytime
→every time
Font Module (2 files):
recieved
→received
preloadeable
→preloadable
recieves
→receives
Turbopack Crates (9 files):
occurences
→occurrences
indicies
→indices
existance
→existence
overriden
→overridden
occured
→occurred
unneccesary
→unnecessary
intially
→initially
Tests (6 files):
unintialized
→uninitialized
compatiblity
→compatibility
seperate
→separate
dependecy
→dependency
Files Modified (18 total):
Documentation:
examples/cms-wordpress/README.md
Font Module:
packages/font/src/google/validate-google-font-function-call.ts
packages/next/src/build/webpack/loaders/next-font-loader/postcss-next-font.ts
Turbopack:
packages/next/src/shared/lib/turbopack/utils.ts
turbopack/crates/turbo-persistence/README.md
turbopack/crates/turbo-static/readme.md
turbopack/crates/turbo-static/src/main.rs
turbopack/crates/turbo-tasks-backend/src/utils/dash_map_multi.rs
turbopack/crates/turbopack-bench/src/bundlers/mod.rs
turbopack/crates/turbopack-core/src/module_graph/module_batches.rs
turbopack/crates/turbopack-dev-server/src/source/route_tree.rs
turbopack/crates/turbopack-ecmascript/src/references/esm/url.rs
Tests:
test/e2e/app-dir/app-basepath/index.test.ts
test/e2e/app-dir/draft-mode/draft-mode.test.ts
test/e2e/app-dir/hooks/hooks.test.ts
test/e2e/app-dir/monaco-editor/components/editor/editor.tsx
test/integration/custom-routes/pages/overridden/[slug].js
test/production/typescript-basic/typechecking/index.ts
All changes are non-functional and only affect comments, documentation strings, error messages, and variable names. No runtime behavior is modified.