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

feat!: use allowlist for allowed licenses #153

Merged
merged 1 commit into from
Jan 22, 2021
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
18 changes: 9 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
on:
push:
branches:
- master
- main
pull_request:
name: ci
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node: [10, 12, 13]
node: [10, 12, 14, 15]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- run: node --version
Expand All @@ -27,9 +27,9 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: 12
node-version: 14
- run: npm ci
- run: npm test
- name: coverage
Expand All @@ -41,17 +41,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: 12
node-version: 14
- run: npm ci
- run: npm run lint
licence-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: 12
node-version: 14
- run: npm ci
- run: npm run license-check
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ const DEFAULT_GREEN_LICENSES = [
];
```

You can also whitelist some npm packages and they will be considered "green"
You can also allowlist some npm packages and they will be considered "green"
even when they have non-green licenses or no licenses. It's useful when
`jsgl` is unable to verify the validness of a certain package's license for
some reason. For example, when a package doesn't specify its license in its
`package.json` but has a separate `LICENSE` file, `jsgl` can't verify that.
You can whitelist that package to make `jsgl` not complain about that
You can allowlist that package to make `jsgl` not complain about that
package.

A typical configuration file looks like this:
Expand All @@ -141,7 +141,7 @@ A typical configuration file looks like this:
"BSD-3-Clause",
...
],
"packageWhitelist": [
"packageAllowlist": [
/* packages considered ok */
"foo",
"bar", // inline comment
Expand All @@ -153,7 +153,7 @@ A typical configuration file looks like this:
```

The `greenLicenses` section is for the custom license list and the
`packageWhitelist` section is for the package whitelist.
`packageAllowlist` section is for the package allowlist.

Note that comments are allowed in `js-green-licenses.json`.

Expand Down Expand Up @@ -310,7 +310,7 @@ A `LicenseChecker` object emits following events during its processing.

[actions-image]: https://github.com/google/js-green-licenses/workflows/ci/badge.svg
[actions-url]: https://github.com/google/js-green-licenses/actions
[codecov-image]: https://codecov.io/gh/google/js-green-licenses/branch/master/graph/badge.svg
[codecov-image]: https://codecov.io/gh/google/js-green-licenses/branch/main/graph/badge.svg
[codecov-url]: https://codecov.io/gh/google/js-green-licenses
[david-image]: https://david-dm.org/google/js-green-licenses.svg
[david-url]: https://david-dm.org/google/js-green-licenses
Expand Down
Loading