Added new package script "yarn licenses-audit"

This commit is contained in:
Alexey Safronov 2023-04-20 13:12:09 +04:00
parent b1f869759e
commit 5d1e4b7d6f
5 changed files with 57 additions and 1 deletions

1
.gitignore vendored
View File

@ -50,3 +50,4 @@ TestsResults/
**/.yarn/cache
**/.yarn/install-state.gz
licenses.csv

File diff suppressed because one or more lines are too long

View File

@ -7,5 +7,7 @@ plugins:
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version"
- path: .yarn/plugins/@yarnpkg/plugin-licenses-audit.cjs
spec: "https://raw.githubusercontent.com/tophat/yarn-plugin-licenses/master/bundles/@yarnpkg/plugin-licenses-audit.js"
yarnPath: .yarn/releases/yarn-3.2.4.cjs

6
licenses.config.js Normal file
View File

@ -0,0 +1,6 @@
module.exports = {
isValidLicense: (license) => {
const valid = new RegExp("\\b(mit|apache\\b.*2|bsd|isc|unlicense)\\b", "i");
return valid.test(license);
},
};

View File

@ -23,7 +23,8 @@
"storybook-serve": "yarn workspace @docspace/components run storybook-serve",
"test": "yarn workspace @docspace/components test",
"wipe": "shx rm -rf node_modules yarn.lock packages/**/node_modules",
"debug-info": "auto-changelog --unreleased-only --template debuginfo --output public/debuginfo.md"
"debug-info": "auto-changelog --unreleased-only --template debuginfo --output public/debuginfo.md",
"licenses-audit": "yarn licenses audit --output-csv=licenses.csv --config=licenses.config.js --summary"
},
"old-scripts": {
"build:test": "yarn workspaces foreach -vptiR --from '{@docspace/client,@docspace/login,@docspace/editor}' run build:test",