chore: add Apache-2.0 LICENSE and include it in published package#16
chore: add Apache-2.0 LICENSE and include it in published package#16jonathannorris merged 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds the Apache License 2.0 to the repository and updates the js-ofrep-worker package to include the license file in its distribution. A prepack script was added to copy the license from the root into the package directory. The reviewer suggested adding a postpack script to remove the copied license file after the packing process to maintain a clean workspace.
| "LICENSE" | ||
| ], | ||
| "scripts": { | ||
| "prepack": "shx cp ../../LICENSE ./LICENSE", |
There was a problem hiding this comment.
The prepack script copies the root LICENSE file into the package directory, but there is no corresponding cleanup. This leaves an untracked LICENSE file in the package folder after running npm pack or npm publish. Adding a postpack script ensures the temporary file is removed, keeping the repository clean.
| "prepack": "shx cp ../../LICENSE ./LICENSE", | |
| "prepack": "shx cp ../../LICENSE ./LICENSE", | |
| "postpack": "shx rm ./LICENSE", |
Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
825974d to
68a63df
Compare
Summary
packages/js-ofrep-worker/package.jsonto include LICENSE in the published npm tarball via aprepackscript (same pattern as js-sdk)Details
The repo declared
"license": "Apache-2.0"in both package.json files but had no actual LICENSE file. This is needed before publishing to npm.The
prepackscript usesshx cp ../../LICENSE ./LICENSEto copy the root LICENSE into the package directory at pack time, following the js-sdk convention.