-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
chore(opentelemetry): Add worker as export | sort exports #21859
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: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,30 +18,21 @@ | |
| "exports": { | ||
| "./package.json": "./package.json", | ||
| ".": { | ||
| "import": { | ||
| "node": { | ||
| "types": "./build/types/index.d.ts", | ||
| "default": "./build/esm/index.js" | ||
| }, | ||
| "browser": { | ||
| "types": "./build/types/index.d.ts", | ||
| "default": "./build/esm/index.browser.js" | ||
| }, | ||
| "types": "./build/types/index.d.ts", | ||
| "default": "./build/esm/index.js" | ||
| "types": "./build/types/index.d.ts", | ||
| "node": { | ||
| "import": "./build/esm/index.js", | ||
| "require": "./build/cjs/index.js" | ||
| }, | ||
| "require": { | ||
| "node": { | ||
| "types": "./build/types/index.d.ts", | ||
| "default": "./build/cjs/index.js" | ||
| }, | ||
| "browser": { | ||
| "types": "./build/types/index.d.ts", | ||
| "default": "./build/cjs/index.browser.js" | ||
| }, | ||
| "types": "./build/types/index.d.ts", | ||
| "default": "./build/cjs/index.js" | ||
| } | ||
| "worker": { | ||
| "import": "./build/esm/index.js", | ||
| "require": "./build/cjs/index.js" | ||
| }, | ||
| "browser": { | ||
| "import": "./build/esm/index.browser.js", | ||
| "require": "./build/cjs/index.browser.js" | ||
|
Comment on lines
+22
to
+32
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The Suggested FixReorder the Prompt for AI AgentDid we get this right? 👍 / 👎 to inform future reviews.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TIL. Didn't know that matters |
||
| }, | ||
| "import": "./build/esm/index.js", | ||
| "require": "./build/cjs/index.js" | ||
| } | ||
| }, | ||
| "typesVersions": { | ||
|
|
||
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: The single
typesfield inpackage.jsonprovides Node.js types to browser environments, causing a type-runtime mismatch and leading to runtime errors.Severity: HIGH
Suggested Fix
Revert the
package.jsonexportsto use per-environmenttypesfields. Each conditional export (e.g., forbrowserandnode) should have its owntypesentry pointing to the correct type definition file for that specific environment. This will likely require generating separate type definitions for the browser entrypoint.Prompt for AI Agent
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 the only types file we have
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.
But in general not a bad comment