Commit Graph

2 Commits

Author SHA1 Message Date
Jiwon Choi 1dda5b668b [Breaking] Remove deprecated sync access to Dynamic APIs (#84179)
This PR removes the deprecated sync access to Dynamic APIs.

- Removed UnsafeUnwrapped* types.
- Replaced `as unknown as UnsafeUnwrapped ` type casts to `as any` for
dev warning.
- Removed tests that expected sync access to not error.
- Removed `UntrackedExotic` functions.
- Modified tests that were accidentally doing sync access.
- Updated warnings to emphasize that it is a Promise and must be
awaited.
- Removed paragraph that states access is allowed from
`errors/sync-dynamic-apis.mdx`.

---------

Co-authored-by: Josh Story <story@hey.com>
2025-09-27 22:44:45 +02:00
Josh Story f93d8178ea [dynamicIO] Error in dev when using sync platform APIs that are dynamic (#71346)
stacked on #71345 

When dynamicIO is enabled certain platform APIs that provide access to
outside state like randomness and current time are augmented to bail out
of prerendering. When running in Dev there is no true Prerender but we
still want to communicate to the developer when they are using APIs that
might not work as they intend in Production. This change adds warnings
when you use these platform APIs during the Prerender portion of the dev
render.
2024-10-16 15:18:49 -07:00