-
Notifications
You must be signed in to change notification settings - Fork 933
refactor(otlp-transformer): generate and export esm protos #5925
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
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 |
---|---|---|
|
@@ -14,7 +14,8 @@ | |
"scripts": { | ||
"prepublishOnly": "npm run compile", | ||
"precompile": "lerna run version --scope @opentelemetry/otlp-transformer --include-dependencies", | ||
"compile": "npm run protos && tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json", | ||
"compile": "npm run protos && tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json && npm run copy-esm-protos-to-build", | ||
"copy-esm-protos-to-build": "cp src/generated/root.mjs build/esm/generated/root.js && cp src/generated/root.mjs build/esnext/generated/root.js", | ||
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. using 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. Oh. I'll remember that in the future 😎 |
||
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json", | ||
"protos": "npm run submodule && npm run protos:generate", | ||
"protos:generate": "node ../../../scripts/generate-protos.js", | ||
|
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.
The top-level
compile
script actually does not call this one - the result of that is that the published package won't have the generated ESM copied to the right locations, and the CJS one will be included.(To reproduce: run
npm run compile
from the top-level of the repo and inspect theexperimental/otlp-transformer/build/esm/generated/root.js
)