-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(nitro): Support nested _platform
properties in Nitro 2.11.7+
#17596
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch!
} else if (event?.context && hasCfProperty(event.context)) { | ||
// legacy support (before Nitro v2.11.7 (PR: https://github.com/nitrojs/nitro/pull/3224)) | ||
storedTraceData = traceDataMap.get(event.context.cf); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Cloudflare Plugin Trace Data Inconsistency
The Cloudflare plugin's trace data storage and retrieval use different priority orders for identifying the cf
object as a WeakMap key. This inconsistency can cause trace data lookups to fail, resulting in missing Sentry tracing meta-tags in the HTML. Also, accessing _platform
on an H3Event
type may lead to TypeScript compilation errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is no problem when the same nitro version is used (which is the case on the same server)
Since Nitro v2.11.7, the platform-specific properties like
cloudlfare
andcf
are nested under_platform
(nitrojs/nitro#3224).The
isEventType
function is updated to reflect this change.fixes: #17588