Skip to content

Commit

Permalink
Automate generation of legal information for dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
djahandarie committed Nov 23, 2023
1 parent b113980 commit ae2f6cb
Show file tree
Hide file tree
Showing 11 changed files with 798 additions and 618 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/broken-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Build Legal
run: npm run license-report
- uses: lycheeverse/lychee-action@ec3ed119d4f44ad2673a7232460dc7dff59d2421
with:
fail: true
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ jobs:
env:
CI: true

- name: Build Legal
run: npm run license-report

- name: Build
run: npm run build

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/create-prerelease-on-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Build Legal
run: npm run license-report

- name: Build
run: npm run-script build -- --all --yomitan-version ${{ github.ref_name }}
shell: bash
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ ext/manifest.json

ext/lib/*
!ext/lib/__mocks__/

ext/legal-npm.html
1 change: 1 addition & 0 deletions .lycheeignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ https://www.edrdg.org/jmdict/edict.html_blanknoopenerhttps://www.edrdg.org/wiki/
^edge://
^about:
^data:
node_modules
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,12 +402,13 @@ Required licensing notices for this project follow below:

## Third-Party Libraries

Yomitan uses several third-party libraries to function. Below are links to homepages, snapshots, and licenses of the exact
versions packaged.

- Handlebars: To retain Handlebars templating without unsafe-eval, a fork of handlebars by Kibana is being used. [homepage](https://github.com/Aquafina-water-bottle/handlebars-noeval) - [snapshot](https://raw.githubusercontent.com/Aquafina-water-bottle/handlebars-noeval/10efaac28d8d2e8d7e503347281eff1a90aa3f31/handlebars.min.js) - [license](https://github.com/Aquafina-water-bottle/handlebars-noeval/blob/10efaac28d8d2e8d7e503347281eff1a90aa3f31/src/hb/LICENSE)
- JSZip: [homepage](https://stuk.github.io/jszip/) - [snapshot](https://github.com/Stuk/jszip/blob/v3.9.1/dist/jszip.min.js) - [license](https://github.com/Stuk/jszip/blob/v3.9.1/LICENSE.markdown)
- WanaKana: [homepage](https://wanakana.com/) - [snapshot](https://unpkg.com/[email protected]/umd/wanakana.min.js) - [license](https://github.com/WaniKani/WanaKana/blob/4.0.2/LICENSE)
- parse5: [homepage](https://github.com/inikulin/parse5) - [snapshot](https://github.com/inikulin/parse5/tree/v7.1.2/packages/parse5) - [license](https://github.com/inikulin/parse5/blob/v7.1.2/LICENSE) _(Only used in MV3 build)_
- Dexie: [homepage](https://dexie.org/) - [snapshot](https://unpkg.com/[email protected]/dist/dexie.min.js) - [license](https://unpkg.com/[email protected]/LICENSE)
- dexie-export-import: [homepage](https://www.npmjs.com/package/dexie-export-import) - [snapshot](https://unpkg.com/[email protected]/dist/dexie-export-import.js) - [license](https://unpkg.com/[email protected]/LICENSE)
Yomitan uses several third-party libraries to function.

| Name | Installed version | License type | Link |
| :------------------ | :---------------- | :----------- | :------------------------------------------------------- |
| @zip.js/zip.js | 2.7.31 | BSD-3-Clause | git+https://github.com/gildas-lormeau/zip.js.git |
| dexie | 3.2.4 | Apache-2.0 | git+https://github.com/dfahlander/Dexie.js.git |
| dexie-export-import | 4.0.7 | Apache-2.0 | git+https://github.com/dexie/Dexie.js.git |
| handlebars | 4.7.8 | MIT | git+https://github.com/handlebars-lang/handlebars.js.git |
| parse5 | 7.1.2 | MIT | git://github.com/inikulin/parse5.git |
| wanakana | 5.3.1 | MIT | git+ssh://[email protected]/WaniKani/WanaKana.git |
16 changes: 16 additions & 0 deletions dev/data/legal-npm.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
body {
font: 16px/1.5 monospace;
}

table {
border-collapse: collapse;
}

th,
td {
padding: 3px;
}

th {
background-color: #ffffff;
}
6 changes: 6 additions & 0 deletions ext/css/settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -2421,6 +2421,12 @@ input[type=number].dictionary-priority {
flex: 1 1 auto;
}

.legal-npm {
flex-grow: 1;
height: 250px;
padding: 0.5em 1em;
border: 0;
}

/* Environment-specific display */
:root[data-browser=unknown] [data-show-for-browser],
Expand Down
611 changes: 66 additions & 545 deletions ext/legal.html

Large diffs are not rendered by default.

Loading

0 comments on commit ae2f6cb

Please sign in to comment.