Skip to content
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(release): ensure a copy of the license is included with published packages #3617

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pr-depcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: "Run Depcheck"
run: |
npx lerna exec --scope '${{ matrix.package }}' -- npx -y depcheck --ignores="@types/*,jsii,jsii-pacmak,jsii-docgen,yoga-layout-prebuilt,eslint,jest,tsc-files,typescript,esbuild,esbuild-jest,graphology-types"
npx lerna exec --scope '${{ matrix.package }}' -- npx -y depcheck --ignores="@types/*,jsii,jsii-pacmak,jsii-docgen,yoga-layout-prebuilt,eslint,jest,tsc-files,typescript,esbuild,esbuild-jest,graphology-types,generate-license-file"
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"build-and-package": "lerna run --scope 'cdktf*' --scope @cdktf/* build,package && tools/collect-dist.sh",
"build": "lerna run --scope 'cdktf*' --scope @cdktf/* build",
"format": "prettier --cache --write .",
"prepackage": "yarn copy-license:scoped && yarn copy-license:unscoped",
"package": "lerna run package && tools/collect-dist.sh",
"package:python": "lerna run package:python && tools/collect-dist.sh",
"package:java": "lerna run package:java && tools/collect-dist.sh",
Expand Down Expand Up @@ -46,7 +47,10 @@
"generate-docs:api": "yarn && yarn build && yarn package && cd tools/documentation-generation && git clean -dfx . && yarn && yarn docs && npx prettier --write ../../website/docs/cdktf/api-reference/**",
"generate-docs:translations": "cd tools/documentation-code-snippets && yarn && yarn update-snippets && cd ../../ && yarn run format",
"generate-docs": "yarn generate-docs:translations && yarn generate-docs:api",
"generate-function-bindings": "cd tools/generate-function-bindings && yarn && yarn fetch-metadata && yarn generate"
"generate-function-bindings": "cd tools/generate-function-bindings && yarn && yarn fetch-metadata && yarn generate",
"generate-license-notices": "lerna run --scope 'cdktf*' --scope @cdktf/* generate-license-notices",
"copy-license:scoped": "lerna exec --scope @cdktf/* cp ../../../LICENSE LICENSE.txt",
"copy-license:unscoped": "lerna exec --scope 'cdktf*' cp ../../LICENSE LICENSE.txt"
},
"workspaces": {
"packages": [
Expand Down
3 changes: 2 additions & 1 deletion packages/@cdktf/cli-core/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
.yalc
yalc.lock
bundle
!ambient.d.ts
!ambient.d.ts
LICENSE**
1,607 changes: 1,607 additions & 0 deletions packages/@cdktf/cli-core/NOTICES.txt

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions packages/@cdktf/cli-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "CDK for Terraform CLI Core, meant for internal use only",
"scripts": {
"build": "tsc",
"postbuild": "yarn generate-license-notices -- --ci",
"watch": "tsc -w",
"watch-preserve-output": "tsc -w --preserveWatchOutput",
"lint": "eslint . --ext .ts,.tsx",
Expand All @@ -14,7 +15,8 @@
"test:ci": "yarn lint && jest --ci",
"jest-watch": "jest --watch",
"package": "./package.sh",
"dist-clean": "rm -rf dist"
"dist-clean": "rm -rf dist",
"generate-license-notices": "npx generate-license-file --input package.json --output NOTICES.txt --overwrite"
},
"main": "src/lib/index.js",
"types": "src/lib/index.d.ts",
Expand All @@ -38,11 +40,11 @@
"license": "MPL-2.0",
"dependencies": {
"@cdktf/commons": "0.0.0",
"@cdktf/hcl-tools": "0.0.0",
"@cdktf/hcl2cdk": "0.0.0",
"@cdktf/hcl2json": "0.0.0",
"@cdktf/provider-schema": "0.0.0",
"@cdktf/node-pty-prebuilt-multiarch": "0.10.1-pre.11",
"@cdktf/hcl-tools": "0.0.0",
"@cdktf/provider-schema": "0.0.0",
"@sentry/node": "7.118.0",
"archiver": "5.3.2",
"cdktf": "0.0.0",
Expand Down Expand Up @@ -160,6 +162,7 @@
"eslint-config-prettier": "8.10.0",
"eslint-plugin-react": "7.35.0",
"eslint-plugin-react-hooks": "4.6.2",
"generate-license-file": "3.4.0",
"jest": "29.7.0",
"nock": "13.5.4",
"react": "18.3.1",
Expand Down
3 changes: 2 additions & 1 deletion packages/@cdktf/commons/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
.yalc
yalc.lock
bundle
!ambient.d.ts
!ambient.d.ts
LICENSE**
47 changes: 47 additions & 0 deletions packages/@cdktf/commons/NOTICES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
This file was generated with the generate-license-file npm package!
https://www.npmjs.com/package/generate-license-file

The following npm package may be included in this product:

- [email protected]

This package contains the following license and notice below:

(The MIT License)

Copyright (c) 2011-2017 JP Richardson

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

-----------

The following npm package may be included in this product:

- [email protected]

This package contains the following license and notice below:

The MIT License (MIT)

Copyright (c) 2010-2020 Robert Kieffer and other contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

-----------

This file was generated with the generate-license-file npm package!
https://www.npmjs.com/package/generate-license-file
7 changes: 5 additions & 2 deletions packages/@cdktf/commons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"description": "CDK for Terraform Common utilities",
"scripts": {
"build": "tsc",
"postbuild": "yarn generate-license-notices -- --ci",
"watch": "tsc -w",
"watch-preserve-output": "tsc -w --preserveWatchOutput",
"lint": "eslint . --ext .ts,.tsx",
Expand All @@ -17,7 +18,8 @@
"test:ci": "yarn lint && jest --ci",
"jest-watch": "jest --watch",
"package": "./package.sh",
"dist-clean": "rm -rf dist"
"dist-clean": "rm -rf dist",
"generate-license-notices": "npx generate-license-file --input package.json --output NOTICES.txt --overwrite"
},
"main": "src/index.js",
"types": "src/index.d.ts",
Expand Down Expand Up @@ -58,6 +60,7 @@
"eslint-config-prettier": "8.10.0",
"eslint-plugin-react-hooks": "4.6.2",
"eslint-plugin-react": "7.35.0",
"generate-license-file": "3.4.0",
"jest": "29.7.0",
"lint-staged": "13.3.0",
"ts-jest": "29.2.4",
Expand Down Expand Up @@ -105,4 +108,4 @@
"lint-staged": {
"src/**/*.{ts,tsx}": "tsc-files ambient.d.ts --noEmit"
}
}
}
3 changes: 2 additions & 1 deletion packages/@cdktf/hcl-tools/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
**/*wasm.gz
tsconfig.tsbuildinfo
wasm.md
!tsconfig.json
!tsconfig.json
LICENSE**
5 changes: 5 additions & 0 deletions packages/@cdktf/hcl-tools/NOTICES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This file was generated with the generate-license-file npm package!
https://www.npmjs.com/package/generate-license-file

This file was generated with the generate-license-file npm package!
https://www.npmjs.com/package/generate-license-file
5 changes: 4 additions & 1 deletion packages/@cdktf/hcl-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@
"types": "src/index.d.ts",
"scripts": {
"build": "tsc && ./build-go.sh",
"postbuild": "yarn generate-license-notices -- --ci",
"watch": "tsc -w",
"watch-preserve-output": "tsc -w --preserveWatchOutput",
"test": "jest",
"test:ci": "jest --ci",
"jest-watch": "jest --watch",
"package": "./package.sh",
"dist-clean": "rm -rf dist",
"prebuild": "./prebuild.sh"
"prebuild": "./prebuild.sh",
"generate-license-notices": "npx generate-license-file --input package.json --output NOTICES.txt --overwrite"
},
"publishConfig": {
"access": "public"
Expand All @@ -41,6 +43,7 @@
"devDependencies": {
"@types/jest": "^29.5.10",
"@types/node": "^20.9.4",
"generate-license-file": "3.4.0",
"jest": "^29.7.0",
"ts-jest": "^29.1.1",
"typescript": "^5.3.2"
Expand Down
1 change: 1 addition & 0 deletions packages/@cdktf/hcl2cdk/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ tsconfig.tsbuildinfo
cdktf-convert-*
cdktf-provider*
!ambient.d.ts
LICENSE**
Loading
Loading