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

Release 2.0.0-beta.1 #135

Merged
merged 33 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
14fc92b
feat(cli): add wrapping table cells
bh-pwalen Nov 26, 2024
8356bad
style(cli): lint fix
bh-pwalen Nov 26, 2024
931790c
style(cli): fix comment lint
bh-pwalen Nov 26, 2024
b2ccdd7
test(cli): add test coverage command
bh-pwalen Nov 26, 2024
d3fff83
feat(core): add limited yarn 2+ support
F-Kublin Nov 28, 2024
2268d7a
feat: add unit tests for findLicenseInPackageJson (#108)
pawelkoniecznybh Nov 29, 2024
68f30de
Merge pull request #113 from brainhubeu/table-cell-wrapping
bh-pwalen Nov 29, 2024
8a0baa9
fix: fixed loading typescript configuration file (#115)
jan-zon-brainhub Nov 29, 2024
0e2755e
refactor(core): move throwing PnP error to package detection
F-Kublin Nov 29, 2024
5be8c66
docs(readme): update readme files
F-Kublin Nov 29, 2024
84a1821
feat: add test to parse logical expressions functions (#112)
pawelkoniecznybh Dec 2, 2024
24cc1a9
feat(cli): add more context to npm ls error
bh-pwalen Dec 2, 2024
6fce869
Merge pull request #117 from brainhubeu/add-modern-yarn-support
F-Kublin Dec 3, 2024
d91e825
Made url in license object optional (#116)
jan-zon-brainhub Dec 3, 2024
0dd3cd3
fix: exclude debugger from stderr (#122)
pawelkoniecznybh Dec 3, 2024
fc30f35
fix: formatting, error-handling (#119)
matt-jb Dec 3, 2024
4f909ba
feat(cli): add not found results to verbose table (#121)
matt-jb Dec 3, 2024
284b364
Merge pull request #123 from brainhubeu/legacy-peer-deps-error-handling
bh-pwalen Dec 3, 2024
e2c4b4f
Removed experimental feature warning by overriding transient dependen…
Lukasz-pluszczewski Dec 3, 2024
6c62ca7
feat: add flag to filter packages by regex (#118)
pawelkoniecznybh Dec 4, 2024
283337a
refactor: Remove installation step (#124)
F-Kublin Dec 4, 2024
012eae4
test: add basic e2e test for pnpm (#126)
bh-pwalen Dec 5, 2024
7105895
refactor(cli, core): display error output when using --verbose flag (…
F-Kublin Dec 5, 2024
c11b110
fix(core, tests): remove --depth=0 from yarn command, add yarn tests …
F-Kublin Dec 5, 2024
48ec4d0
test: added tests to cover running license auditor in monorepo
mlgzielinska Dec 5, 2024
9c5fa07
test: resolved conflicts
mlgzielinska Dec 5, 2024
be75538
docs(readme, cli): update default templates & README files (#129)
F-Kublin Dec 5, 2024
6574493
chore: fixed lint issue
mlgzielinska Dec 5, 2024
b9c37b9
chore: fixed lint issue
mlgzielinska Dec 5, 2024
a76c9ea
fix(test): fix lint
F-Kublin Dec 5, 2024
8004145
fix(test): add yarn option to getInstallCommand (#132)
F-Kublin Dec 5, 2024
597a593
Merge pull request #131 from brainhubeu/monorepo-e2e-tests
mlgzielinska Dec 6, 2024
9d1efb5
chore(repo): bump package versions (#133)
F-Kublin Dec 9, 2024
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
48 changes: 47 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

- npm
- yarn classic (v1)
- yarn 2+
- Applicable only for projects using `node_modules` installation. `Plug'n'Play` is not currently supported.
- pnpm

## Getting started
Expand Down Expand Up @@ -36,11 +38,14 @@ The results will be printed in the console.
- `--json [json]` - Save the result to a JSON file. If no path is not provided, a file named license-auditor.results.json will be created in the current directory.
- `--production` - Skip the audit for licenses in development dependencies (default: false)
- `--default-config` - Run audit with default whitelist/blacklist configuration
- `--filter-regex [regex]` - Run audit with a custom regex filter that will be applied to the package name

> [!IMPORTANT]
> Verify dev dependencies if they generate code, embed assets, or otherwise impact the final product, as their licenses might impose restrictions. Always prioritize reviewing both when in doubt or if your project may be redistributed or commercialized.

## Configuration file structure
## Configuration file

### File structure

All licenses are sourced from [SPDX license list](https://spdx.org/licenses/)

Expand All @@ -50,6 +55,47 @@ All licenses are sourced from [SPDX license list](https://spdx.org/licenses/)
- `warn` - package should be omitted from audit, but it will produce a warning,
- `off`- package should be completely omitted from the audit.

To use `ConfigType` and enable IntelliSense license suggestions in the configuration file, run:

```
npm i --save-dev @brainhubeu/lac
```

Then, in JS/MJS configuration at the top of the file add:

```js
/**
* @type {import('@brainhubeu/lac').ConfigType}
*/
```

In TS configuration:

```js
import type { ConfigType } from "@brainhubeu/lac";

const config: ConfigType = {
...
};
```

> [!CAUTION]
> The default/strict configuration should not be in any way interpreted as legal advice.

### Default configuration

LAC offers a default configuration for whitelist and blacklist, available by running the configuration wizard or using the `--default-config` flag. The rationale for selecting licenses for each list is available in [this Brainhub article about open source licenses](https://brainhub.eu/library/open-source-licenses-to-avoid). It describes licenses to be wary of as:

> You need to be careful about a few restrictive licenses, like GPL 3.0 or AGPL. In the worst-case scenario, you may be required to release your software under the same license, royalty-free.

> However, we shouldn't say these licenses are bad. They cause a legal risk or can make you rewrite the whole product, but only if you don't follow the rules associated with them.

> The key in managing licenses is to understand how they work, follow their rules, and ideally use software that helps to track the licenses in your product, so as not to break the law or cause problems to your product through inattention.

### Strict configuration

Strict configuration offers a more restrictive whitelist/blacklist preset. The aim was to cover as many licenses as viable, keeping to the guidelines described in the article above.

## Known issues

### "missing: some-package@>=3.0.0, required by [email protected]"
Expand Down
Loading
Loading