Skip to content

chore: add Apache-2.0 LICENSE and include it in published package#16

Merged
jonathannorris merged 2 commits intomainfrom
alpha/pre-publish
Mar 31, 2026
Merged

chore: add Apache-2.0 LICENSE and include it in published package#16
jonathannorris merged 2 commits intomainfrom
alpha/pre-publish

Conversation

@jonathannorris
Copy link
Copy Markdown
Member

Summary

  • Adds the Apache-2.0 LICENSE file at the repo root (matching all other OpenFeature JS repos)
  • Updates packages/js-ofrep-worker/package.json to include LICENSE in the published npm tarball via a prepack script (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 prepack script uses shx cp ../../LICENSE ./LICENSE to copy the root LICENSE into the package directory at pack time, following the js-sdk convention.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
"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>
@jonathannorris jonathannorris merged commit 7769fa4 into main Mar 31, 2026
4 checks passed
@jonathannorris jonathannorris deleted the alpha/pre-publish branch March 31, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant