-
Notifications
You must be signed in to change notification settings - Fork 78
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
chore: set up 3rd-party license generation #11640
chore: set up 3rd-party license generation #11640
Conversation
8706ce6
to
18411cf
Compare
18411cf
to
dd3de94
Compare
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.
Nice this looks good! So we have to remember to rerun that script whenever a dependency gets added to any of the packages, right?
I wonder if we should automatically run the script before publishing just in case we forget at some point. At least that way the package's license will be included.
You could run the script and git add **/THIRD-PARTY-LICENSES.md
before committing here:
calcite-design-system/.github/workflows/deploy-latest.yml
Lines 75 to 89 in c88a31f
# The "|| true" prevents failure if there are no changes | |
git add package-lock.json || true | |
# The release-please PR only updates when there are new deployable | |
# commits, e.g., fixes, features, or breaking changes. This is fine | |
# but it means autogenerated files can become outdated. | |
# | |
# Lerna will only publish when the working tree is clean, so changes | |
# to autogenerated files cause the release to fail. | |
# | |
# The workaround is to commit the files before releasing so everything | |
# will be up to date in the dists. The commit will be discarded once | |
# the container is destroyed, and then the autogenerated files will be | |
# updated in a subsequent PR. | |
git commit -m "build(deps): update package-lock" || true |
support/createThirdPartyLicenses.ts
Outdated
"@esri/eslint-plugin-calcite-components", | ||
]; | ||
|
||
const licenses = await getProjectLicenses(".package.json", { |
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.
Should this be "./package.json"
or "package.json"
?
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.
Oh, good catch. 🎣 It seems that generate-license-file
's file path logic was unintentionally handling this case.
Great idea. I've updated the |
* origin/dev: (80 commits) build(deps): update nx monorepo to v20.4.6 (#11662) build(deps): update arcgis to ^4.32.7 (#11648) build: update browserslist db (#11639) build(deps): update eslint (#11670) build(deps): update dependency chromatic to v11.26.1 (#11669) build(deps): update dependency rollup to v4.34.9 (#11661) build(deps): update dependency tsx to v4.19.3 (#11658) chore: release next docs(text-area): update limitText description (#11672) feat(block, block-section): add `expanded` property and deprecate `open` property (#11582) feat(list-item, list): add `expanded` property and deprecate `open` property (#11003) chore: release next fix(tabs): redisplay close button when more than one tab is closable (#11492) test(shell-panel): Fix token story set up (#11635) chore: set up 3rd-party license generation (#11640) build(deps): update dependency happy-dom to v17.1.8 (#11649) build(deps): update dependency prettier to v3.5.2 (#11642) build(deps): update dependency happy-dom to v17.1.6 (#11641) chore: release next fix(card-group): Restore default gap spacing (#11638) ...
Related Issue: #11546
Summary
This adds a utility script that generates 3rd-party license information for each package.
Notes
THIRD-PARTY-LICENSES.md
(TPL)@esri/eslint-config-calcite
package)util:update-3rd-party-licenses
) can be called from the monorepo root or from individual packagesgenerate-license-file
generates licenses correctly, this script installsnode_modules
andpackage-lock.json
locally in each package (removed when finished)