-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move the global client error code (#74699)
### What Refactor the code that responsible for global client error handling, since they could touch shared state so they shouldn't be forked in new error overlay as hooks or utils. Hence I deleted the forked ones, and move the existing used ones to the `/errors/` to avoid getting duplicated.
- Loading branch information
Showing
23 changed files
with
26 additions
and
277 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...l/helpers/attach-hydration-error-state.ts → ...ts/errors/attach-hydration-error-state.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
.../internal/helpers/enqueue-client-error.ts → ...components/errors/enqueue-client-error.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../internal/helpers/hydration-error-info.ts → ...components/errors/hydration-error-info.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...verlay/internal/helpers/stitched-error.ts → ...lient/components/errors/stitched-error.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...lay/internal/helpers/use-error-handler.ts → ...nt/components/errors/use-error-handler.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/next/src/client/components/globals/handle-global-errors.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { handleGlobalErrors } from '../react-dev-overlay/internal/helpers/use-error-handler' | ||
import { handleGlobalErrors } from '../errors/use-error-handler' | ||
|
||
handleGlobalErrors() |
2 changes: 1 addition & 1 deletion
2
packages/next/src/client/components/globals/intercept-console-error.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 0 additions & 46 deletions
46
...mponents/react-dev-overlay/_experimental/internal/helpers/attach-hydration-error-state.ts
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
...lient/components/react-dev-overlay/_experimental/internal/helpers/enqueue-client-error.ts
This file was deleted.
Oops, something went wrong.
105 changes: 0 additions & 105 deletions
105
...lient/components/react-dev-overlay/_experimental/internal/helpers/hydration-error-info.ts
This file was deleted.
Oops, something went wrong.
49 changes: 0 additions & 49 deletions
49
.../src/client/components/react-dev-overlay/_experimental/internal/helpers/stitched-error.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 0 additions & 29 deletions
29
packages/next/src/client/components/react-dev-overlay/internal/helpers/console-error.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.