Repository navigation
fix: remove compile-protos from prepare script in pubsub-api and developer-knowledge #9666
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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -30,12 +30,13 @@ | |||||
| ], | ||||||
| "scripts": { | ||||||
| "clean": "gts clean", | ||||||
| "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", | ||||||
| "compile": "tsc -p . && cp -r protos build/", | ||||||
| "compile-protos": "compileProtos src", | ||||||
| "docs": "jsdoc -c .jsdoc.js", | ||||||
| "fix": "gts fix", | ||||||
| "lint": "gts check", | ||||||
| "prepare": "npm run compile-protos && npm run compile", | ||||||
| "postpack": "minifyProtoJson", | ||||||
|
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. Running
Suggested change
References
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. Nit: do we even need to run this anymore? I believe librarian should be generating proto files already so there shouldn't be a need to re-generate them.
Contributor
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. Keeping |
||||||
| "prepare": "npm run compile", | ||||||
| "system-test": "node ../../bin/run-test.cjs --config ../../.mocharc.cjs --no-parallel build/system-test", | ||||||
| "test": "node ../../bin/run-test.cjs --config ../../.mocharc.cjs build/test" | ||||||
| }, | ||||||
|
|
||||||
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.
Running
minifyProtoJsoninpostpackoccurs after the npm package tarball has already been created. This means the published package will contain the unminified proto JSON files, defeating the purpose of minification. It should be run inprepackinstead so that the minified files are included in the packed tarball. Note that since this is an auto-generated package.json, you should add this file to the keep list (e.g., inlibrarian.yaml) to prevent it from being overwritten during regeneration.References