Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
3b7518a
chore: fix eslint problem with tsconfig.json referencing expo config …
artus9033 Jul 6, 2025
08a5d32
feat: implemented license-kit-visualizer Next project
artus9033 Jul 1, 2025
b5413e5
feat: charts & analysis for license-kit-visualizer, dev server in lic…
artus9033 Jul 17, 2025
fc2d065
feat!: update API to account for multiple possible parent packages at…
artus9033 Jul 17, 2025
a024679
chore: ignore build dirs for docs and visualizer in eslint to speed i…
artus9033 Jul 17, 2025
5f03830
feat: streaming reports from server & SSE reload on lockfile changes
artus9033 Jul 17, 2025
cbe6321
chore!: @callstack/licenses to support both browser & node targets, m…
artus9033 Jul 18, 2025
e39c142
chore: updated license-kit README
artus9033 Jul 18, 2025
e4a841b
feat: license-kit CLI analyze command
artus9033 Jul 18, 2025
b413ce4
feat: visualizer latex formula display, better layout, fixed charts
artus9033 Jul 18, 2025
f6c0722
feat: finished visualizer UI
artus9033 Jul 18, 2025
268cf16
chore: format files
artus9033 Jul 18, 2025
5bd43e3
fix: classify unknown license literal for visualizer needs as UNKNOWN…
artus9033 Jul 18, 2025
75f1182
feat: finished Charts accordion tab
artus9033 Jul 18, 2025
b5fd25c
docs: fix diff
artus9033 Jul 19, 2025
f25f583
fix: permissiveness score
artus9033 Jul 19, 2025
010f6bb
chore: script for running built license-kit CLI
artus9033 Jul 19, 2025
968764b
feat: graph render loading indicator, auto-center graph when rendered
artus9033 Jul 21, 2025
079069c
fix: do not warn about unknown license in the root package; pre neste…
artus9033 Jul 21, 2025
32cbc67
feat: construction of package inclusion trait up to the root project …
artus9033 Jul 21, 2025
fabad4c
feat: display information about the hovered package
artus9033 Jul 22, 2025
04feec6
chore: migrated to a newer version of prettier
artus9033 Jul 22, 2025
062083e
fix: properly add connections to handle multi-parent packages
artus9033 Jul 22, 2025
f04f19b
feat: disclaimer & help
artus9033 Jul 22, 2025
b2efa59
feat: summarization of graph shape with Summarization API (in-browser…
artus9033 Jul 22, 2025
4fcf7b2
fix: floor permissiveness score in CLI mode
artus9033 Jul 22, 2025
894bc6b
Merge branch 'main' into feat/license-kit-visualizer
artus9033 Jul 22, 2025
f384e12
fix: remove obsolete options from visualize command
artus9033 Jul 23, 2025
984131c
docs: updated documentation
artus9033 Jul 23, 2025
bda19f5
chore: updated CLI package description in package.json
artus9033 Jul 23, 2025
cae7fdc
chore: license attribution in visualizer project, extracted MarkdownB…
artus9033 Jul 23, 2025
e179342
fix(test): adjust buffer size for integration tests
artus9033 Jul 23, 2025
68fbe96
feat: optimize buildDependencyGraph memory usage
artus9033 Jul 26, 2025
fcaac8c
chore: changes after CR
artus9033 Aug 6, 2025
d044030
feat: replace score with description of graph state findings
artus9033 Aug 6, 2025
fd7e630
chore: replace moment with date-fns
artus9033 Aug 6, 2025
c0b5704
Merge branch 'main' into feat/license-kit-visualizer
artus9033 Aug 6, 2025
950f04b
chore: fix typo in help message
artus9033 Aug 6, 2025
f3b597a
chore: fix lefthook lint commands
artus9033 Aug 6, 2025
3fb790f
feat: check if Summarizer API is available in the browser
artus9033 Aug 6, 2025
8205718
chore: update notes in tool
artus9033 Aug 6, 2025
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
13 changes: 12 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,18 @@
const config = {
root: true,
extends: ['@callstack'],
ignorePatterns: ['node_modules/', '**/node_modules/', 'lib/', '**/lib/', 'build/', '**/build/', 'docs/**'],
ignorePatterns: [
'node_modules/',
'**/node_modules/',
'lib/',
'**/lib/',
'build/',
'**/build/',
'visualizer-build/',
'doc_build',
'docs/**',
'packages/visualizer/',
],
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
'@typescript-eslint/consistent-type-imports': ['error'],
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
.DS_Store

# VSCode
.vscode/
.vscode/*
!.vscode/settings.json

# Yarn
node_modules/
Expand Down
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"eslint.workingDirectories": [{ "mode": "auto" }],
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
}
7 changes: 7 additions & 0 deletions commitlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import type { UserConfig } from '@commitlint/types';

const Configuration: UserConfig = {
extends: ['@commitlint/config-conventional'],
};

export default Configuration;
2 changes: 1 addition & 1 deletion docs/docs/docs/react-native.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ If you are using Expo, you need to add the config plugin to your `app.json` or `
```diff
{
"expo": {
++ "plugins": ["react-native-legal"]
+ "plugins": ["react-native-legal"]
}
}
```
Expand Down
31 changes: 30 additions & 1 deletion docs/docs/docs/standalone-cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebar_position: 3
---

import { PackageManagerTabs, Badge } from '@theme';
import { Badge, PackageManagerTabs } from '@theme';

# Standalone CLI (Node.js)

Expand Down Expand Up @@ -96,6 +96,35 @@ Generates a licenses report in the specified format. The output can be written t
| `--format [type]` | Output format, one of: `'json'`, `'about-json'` (AboutLibraries-compatible), `'text'`, `'markdown'` | `'json'` |
| `--output [path]` | Where to write the output - either `'stdout'` or a path to an output file | `'stdout'` |

#### Command: `analyze`

Scan licenses & report the insights: summary, top license types, optionally unknowns & breakdown of licenses by different features.

| Flag / Option | Description | Default |
| ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- |
| `--root [path]` | Path to the root of your project. | Current working directory |
| `--list-unknown` | List unknown licenses. | `false` |
| `--show-breakdown` | Show breakdown of licenses by category and type. | `false` |
| `--tm, --transitive-deps-mode [mode]` | Controls, which transitive dependencies are included: <ul><li>`'all'`</li> <li>`'from-external-only'` (only transitive dependencies of direct dependencies specified by non-workspace:... specifiers)</li> <li>`'from-workspace-only'` (only direct dependencies of direct dependencies specified by `workspace:` specifier)</li> <li>`'none'`</li></ul> | `'all'` |
| `--dm, --dev-deps-mode [mode]` | <ul><li>`'root-only'` (only direct devDependencies from the scanned project's root package.json)</li> <li>`'none'`</li></ul> | `'root-only'` |
| `--od`, `--include-optional-deps [bool]` | Whether to include `optionalDependencies` in the scan; other flags apply. | `true` |
| `-h`, `--help` | Display help for command. | — |

#### Command: `visualize`

Launches a local server providing a web license graph visualizer & analyzer app: summarizes the dependency graph state, shows an interactive graph of licenses with possibility to select a subgraph, provides browser built-in AI-turbocharged summary of the dependency graph.

| Flag / Option | Description | Default |
| ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| `--port [port]` | Port on which to launch the app. | `8094` |
| `--h, --host [host]` | Host on which to launch the app. | `"localhost"` |
| `--a, --auto-open [open]` | Automatically open the app in the browser after launching. | `true` |
| `--root [path]` | Path to the root of your project. | `"."` |
| `--tm, --transitive-deps-mode [mode]` | Controls, which transitive dependencies are included: <ul><li>`'all'`</li> <li>`'from-external-only'` (only transitive dependencies of direct dependencies specified by non-workspace:... specifiers)</li> <li>`'from-workspace-only'` (only direct dependencies of direct dependencies specified by `workspace:` specifier)</li> <li>`'none'`</li></ul> | `'all'` |
| `--dm, --dev-deps-mode [mode]` | <ul><li>`'root-only'` (only direct devDependencies from the scanned project's root package.json)</li> <li>`'none'`</li></ul> | `'root-only'` |
| `--od`, `--include-optional-deps [bool]` | Whether to include `optionalDependencies` in the scan; other flags apply. | `true` |
| `-h`, `--help` | Display help for command. | — |

#### Command: `help`

Displays help, listing the available commands.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: "[Android] Accept Chrome T & C - Use without an account variant"
name: '[Android] Accept Chrome T & C - Use without an account variant'
appId: com.android.chrome
---
- tapOn:
label: Accept Chrome T & C
text: "Accept & continue"
label: Accept Chrome T & C
text: 'Accept & continue'
- tapOn:
label: "Turn off Chrome sync"
text: "No thanks"
label: 'Turn off Chrome sync'
text: 'No thanks'
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: "[Android] Accept Chrome T & C - Accept and Continue variant"
name: '[Android] Accept Chrome T & C - Accept and Continue variant'
appId: com.android.chrome
---
- tapOn:
label: Dismiss Chrome sign in
text: "Use without an account"
label: Dismiss Chrome sign in
text: 'Use without an account'
- tapOn:
label: "Dismiss Chrome notifications"
id: "com.android.chrome:id/negative_button"
label: 'Dismiss Chrome notifications'
id: 'com.android.chrome:id/negative_button'
1 change: 0 additions & 1 deletion examples/bare-example/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* @format
*/

import { AppRegistry } from 'react-native';

import App from './App';
Expand Down
12 changes: 9 additions & 3 deletions examples/node-example/__tests__/report.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,15 @@ async function runReportCommandForJsonOutput(args: string[] = []) {
const command = `yarn workspace license-kit-node-example report${args ? ` ${args.join(' ')}` : ''}`;

const output = await new Promise<string>((resolve) => {
child_process.exec(command, (_, stdout) => {
resolve(stdout);
});
child_process.exec(
command,
{
maxBuffer: 1024 * 1024 * 100, // 100MB
},
(_, stdout) => {
resolve(stdout);
},
);
});

return JSON.parse(output);
Expand Down
9 changes: 8 additions & 1 deletion lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@ pre-commit:
piped: true
commands:
lint-js:
# Run ESLint for JS/TS files if any of them are staged
# Run ESLint for root ESLint config JS/TS files if any of them are staged
files: git diff --name-only --cached
glob: '*.{js,ts,jsx,tsx}'
run: yarn lint:js
exclude:
- 'packages/visualizer/**'
lint-js-visualizer:
# Run ESLint for visualizer ESLint config JS/TS files if any of them are staged
files: git diff --name-only --cached
glob: 'packages/visualizer/**/*.{js,ts,jsx,tsx}'
run: yarn workspace @callstack/license-kit-visualizer lint
lint-docs:
# Run biome linter for docs files if any of them are staged
files: git diff --name-only --cached
Expand Down
15 changes: 6 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
"workspaces": {
"packages": [
"packages/*",
"packages/license-kit/visualizer",
Comment thread
artus9033 marked this conversation as resolved.
Comment thread
artus9033 marked this conversation as resolved.
"docs",
"examples/*",
"examples/packages/*"
]
},
"scripts": {
"build:library": "yarn workspace @callstack/licenses build && yarn workspace react-native-legal build-plugins && yarn workspace license-kit build-library && yarn workspace react-native-legal build-library",
"build:library": "yarn workspace @callstack/licenses build && yarn workspace react-native-legal build-plugins && yarn workspace license-kit build-library && yarn workspace react-native-legal build-library && yarn workspace @callstack/license-kit-visualizer build",
"lint:js": "eslint \"**/*.{js,ts,tsx}\"",
"lint:docs": "yarn workspace docs check",
"typescript": "yarn build:library && tsc --noEmit -p examples/bare-example/tsconfig.json && tsc --noEmit -p examples/expo-example/tsconfig.json",
Expand Down Expand Up @@ -39,18 +40,14 @@
"@changesets/changelog-github": "^0.5.1",
"@changesets/cli": "^2.28.1",
"@commitlint/config-conventional": "17.6.6",
"@evilmartians/lefthook": "1.4.3",
"@evilmartians/lefthook": "1.12.2",
"commitlint": "17.6.6",
"eslint": "^8.46.0",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-prettier": "^5.0.0",
"prettier": "^3.0.1",
"eslint-plugin-prettier": "^5.5.3",
"expo": "~52.0.36",
Comment thread
artus9033 marked this conversation as resolved.
"prettier": "^3.6.2",
"typescript": "^5.1.3"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"packageManager": "yarn@3.6.1"
}
1 change: 1 addition & 0 deletions packages/license-kit/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
visualizer-build/
Loading
Loading