Skip to content
Merged
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
28 changes: 22 additions & 6 deletions .github/workflows/check-npm-dependencies-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
- ".licensed.json"
- ".licensed.ya?ml"
- ".npmrc"
- "go.mod"
- "go.sum"
- "Taskfile.ya?ml"
- "**/.gitmodules"
- "**/package.json"
Expand All @@ -22,6 +24,8 @@ on:
- ".npmrc"
- ".licensed.json"
- ".licensed.ya?ml"
- "go.mod"
- "go.sum"
- "Taskfile.ya?ml"
- "**/.gitmodules"
- "**/package.json"
Expand Down Expand Up @@ -82,8 +86,10 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
version: 5.x

- name: Install Task
uses: go-task/setup-task@v1
- name: Install Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod

- name: Setup Node.js
uses: actions/setup-node@v6
Expand All @@ -94,7 +100,11 @@ jobs:
run: sudo apt update -y && sudo apt install -y libxkbfile-dev libsecret-1-dev

- name: Update dependencies license metadata cache
run: task --silent general:cache-dep-licenses
run: |
go tool \
github.com/go-task/task/v3/cmd/task \
--silent \
general:cache-dep-licenses

- name: Check for outdated cache
id: diff
Expand Down Expand Up @@ -146,8 +156,10 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
version: 5.x

- name: Install Task
uses: go-task/setup-task@v1
- name: Install Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod

- name: Setup Node.js
uses: actions/setup-node@v6
Expand All @@ -158,4 +170,8 @@ jobs:
run: sudo apt update -y && sudo apt install -y libxkbfile-dev libsecret-1-dev

- name: Check for dependencies with unapproved licenses
run: task --silent general:check-dep-licenses
run: |
go tool \
github.com/go-task/task/v3/cmd/task \
--silent \
general:check-dep-licenses
2 changes: 1 addition & 1 deletion .licenses/npm/@vscode/debugprotocol.dep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 1.68.0
type: npm
summary: Npm module with declarations for the Visual Studio Code debug protocol
homepage:
license: other
license: mit
licenses:
- sources: License.txt
text: "Copyright (c) Microsoft Corporation\n\nAll rights reserved. \n\nMIT License\n\nPermission
Expand Down
2 changes: 1 addition & 1 deletion .licenses/npm/concat-map.dep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 0.0.1
type: npm
summary: concatenative mapdashery
homepage:
license: other
license: mit
licenses:
- sources: LICENSE
text: |
Expand Down
2 changes: 1 addition & 1 deletion .licenses/npm/expand-template.dep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 2.0.3
type: npm
summary: Expand placeholders in a template string
homepage: https://github.com/ralphtheninja/expand-template
license: other
license: mit
licenses:
- sources: LICENSE
text: |-
Expand Down
2 changes: 1 addition & 1 deletion .licenses/npm/fast-json-stable-stringify.dep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ type: npm
summary: deterministic `JSON.stringify()` - a faster version of substack's json-stable-strigify
without jsonify
homepage: https://github.com/epoberezkin/fast-json-stable-stringify
license: other
license: mit
licenses:
- sources: LICENSE
text: |
Expand Down
2 changes: 1 addition & 1 deletion .licenses/npm/from.dep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 0.1.7
type: npm
summary: Easy way to make a Readable Stream
homepage:
license: other
license: mit
licenses:
- sources: LICENSE.APACHE2
text: |
Expand Down
2 changes: 1 addition & 1 deletion .licenses/npm/github-from-package.dep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 0.0.0
type: npm
summary: return the github url from a package.json file
homepage: https://github.com/substack/github-from-package
license: other
license: mit
licenses:
- sources: LICENSE
text: |
Expand Down
2 changes: 1 addition & 1 deletion .licenses/npm/google-protobuf.dep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 3.21.4
type: npm
summary: Protocol Buffers for JavaScript
homepage:
license: other
license: bsd-3-clause
licenses:
- sources: LICENSE.md
text: |
Expand Down
2 changes: 1 addition & 1 deletion .licenses/npm/json-schema-typed.dep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 7.0.3
type: npm
summary: JSONSchema TypeScript definitions.
homepage: https://github.com/typeslick/json-schema-typed
license: other
license: bsd-2-clause
licenses:
- sources: LICENSE
text: |+
Expand Down
2 changes: 1 addition & 1 deletion .licenses/npm/minimist.dep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 1.2.8
type: npm
summary: parse argument options
homepage: https://github.com/minimistjs/minimist
license: other
license: mit
licenses:
- sources: LICENSE
text: |
Expand Down
2 changes: 1 addition & 1 deletion .licenses/npm/mkdirp-0.5.6.dep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 0.5.6
type: npm
summary: Recursively mkdir, like `mkdir -p`
homepage:
license: other
license: mit
licenses:
- sources: LICENSE
text: |
Expand Down
2 changes: 1 addition & 1 deletion .licenses/npm/mkdirp-1.0.4.dep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 1.0.4
type: npm
summary: Recursively mkdir, like `mkdir -p`
homepage:
license: other
license: mit
licenses:
- sources: LICENSE
text: |
Expand Down
2 changes: 1 addition & 1 deletion .licenses/npm/semver-compare.dep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 1.0.0
type: npm
summary: compare two semver version strings, returning -1, 0, or 1
homepage: https://github.com/substack/semver-compare
license: other
license: mit
licenses:
- sources: LICENSE
text: |
Expand Down
2 changes: 1 addition & 1 deletion .licenses/npm/through.dep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 2.3.8
type: npm
summary: simplified stream construction
homepage: https://github.com/dominictarr/through
license: other
license: mit
licenses:
- sources: LICENSE.APACHE2
text: |
Expand Down
2 changes: 1 addition & 1 deletion .licenses/npm/type-fest-0.13.1.dep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 0.13.1
type: npm
summary: A collection of essential TypeScript types
homepage:
license: other
license: mit
licenses:
- sources: license
text: |
Expand Down
2 changes: 1 addition & 1 deletion .licenses/npm/type-fest-0.21.3.dep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 0.21.3
type: npm
summary: A collection of essential TypeScript types
homepage:
license: other
license: mit
licenses:
- sources: license
text: |
Expand Down
2 changes: 1 addition & 1 deletion .licenses/npm/vscode-oniguruma.dep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 1.6.1
type: npm
summary: VSCode oniguruma bindings
homepage:
license: other
license: mit
licenses:
- sources: LICENSE.txt
text: |
Expand Down
21 changes: 21 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,27 @@ tasks:
deps:
- task: general:cache-dep-licenses
cmds:
- |
MATCHES="$(
find \
.licenses \
-regex '.+\.yml' \
-type f \
-print0 \
| \
xargs \
--null \
go tool \
github.com/mikefarah/yq/v4 \
'select(.license == "other") | filename'
)"
if [[ "$MATCHES" != "" ]]; then
printf "%s" "$MATCHES"
echo
echo "The license cache files above have the license set to 'other'. Please manually define the license type and retry."
echo "See: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-go-dependencies-task.md#unrecognized-licenses"
exit 1
fi
- licensed status

general:check-licensed:
Expand Down
Loading
Loading