Skip to content

Commit 5cb94e4

Browse files
update before first release
Signed-off-by: Marc Dumais <[email protected]>
1 parent a6a9bf3 commit 5cb94e4

File tree

11 files changed

+76
-24
lines changed

11 files changed

+76
-24
lines changed

.github/workflows/license-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
# build a local npm package "payload" and install it
5252
npm pack
5353
npm install
54-
npm install --no-save ./dash-licenses-wrapper-*.tgz
54+
npm install --no-save ./eclipse-dash-nodejs-wrapper-*.tgz
5555
npx dash-licenses-wrapper --inputFile=package-lock.json
5656
env:
5757
DASH_LICENSES_PAT: ${{ secrets.DASH_LICENSES_PAT }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
node_modules
22
download
3-
dependency-check-summary.txt
3+
dependency-check-summary*
44
license-check-summary*

NOTICE.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Notices for Eclipse Dash
2+
3+
This content is produced and maintained by the Eclipse Dash project.
4+
5+
* Project home: https://projects.eclipse.org/projects/technology.dash
6+
7+
## Trademarks
8+
9+
Eclipse Dash™ is a trademark of the Eclipse Foundation.
10+
11+
## Copyright
12+
13+
All content is the property of the respective authors or their employers. For
14+
more information regarding authorship of content, please consult the listed
15+
source code repository logs.
16+
17+
## Declared Project Licenses
18+
19+
This program and the accompanying materials are made available under the terms
20+
of the Eclipse Public License v. 2.0 which is available at
21+
https://www.eclipse.org/legal/epl-2.0.
22+
23+
SPDX-License-Identifier: EPL-2.0
24+
25+
## Source Code
26+
27+
The project maintains the following source code repositories:
28+
29+
* https://github.com/eclipse-dash/.github
30+
* https://github.com/eclipse-dash/nodejs-wrapper
31+
* https://github.com/eclipse/dash-licenses
32+
* https://gitlab.eclipse.org/eclipse/technology/dash/eclipse-api-for-java.git
33+
* https://gitlab.eclipse.org/eclipse/technology/dash/eclipse-project-code.git
34+
* https://gitlab.eclipse.org/eclipse/technology/dash/license-tool/nodejs-wrapper.git
35+
* https://gitlab.eclipse.org/eclipse/technology/dash/org.eclipse.dash.handbook.git
36+
37+
## Cryptography
38+
39+
Content may contain encryption software. The country in which you are currently
40+
may have restrictions on the import, possession, and use, and/or re-export to
41+
another country, of encryption software. BEFORE using any encryption software,
42+
please check the country's laws, regulations and policies concerning the import,
43+
possession, or use, and re-export of encryption software, to see if this is
44+
permitted.
45+

README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# dash-licenses nodejs-wrapper
1+
# Eclipse dash-licenses nodejs-wrapper
22

33
This wrapper makes it easy to integrate and run the Eclipse [Dash Licenses](https://github.com/eclipse/dash-licenses) Tool in Eclipse Foundation project repositories, both locally and during CI on GitHub (i.e. on Pull Requests). Doing so is the best way to catch early, any 3PP components that has incompatible or have unclear licenses. Optionally, `dash-licenses` can be run in `automatic IP review mode`, to automatically create IP Check tickets, on the Eclipse Foundation Gitlab instance, one for each 3PP component that fails the check, for further scrutiny. These tickets can often be approved automatically in minutes.
44

@@ -15,19 +15,17 @@ This wrapper makes it easy to integrate and run the Eclipse [Dash Licenses](http
1515

1616
## How to install and use
1717

18-
(Note: This wrapper is planned to soon be made available as a `npm package` - until then the below will not work )
19-
20-
This npm package contains the `dash-licenses-wrapper.js` script that uses `dash-licenses` under-the-hood, an example GitHub workflow that uses the wrapper and some example configuration files.
18+
The npm package produced from this repository contains the `dash-licenses-wrapper.js` script that uses `dash-licenses` under-the-hood, an example GitHub workflow that uses the wrapper and some example configuration files.
2119

2220
To install this package as a "devDependency" in your project, use one of the following commands from the root of your project, according to the project's npm client:
2321

2422
```bash
2523
# yarn:
2624
# note: if prompted to do so, you may need to add option "--ignore-workspace-root-check"
27-
yarn add dash-licenses-wrapper --dev
25+
yarn add @eclipse-dash/nodejs-wrapper --dev
2826

2927
# npm:
30-
npm install dash-licenses-wrapper --save-dev
28+
npm install @eclipse-dash/nodejs-wrapper --save-dev
3129
```
3230

3331
Once installed, you can run a license check, from the repo root, with the following command:
@@ -73,7 +71,7 @@ A configuration file can be used. Values defined therein will override wrapper d
7371
"inputFile": "./package-lock.json",
7472
"batch": "50",
7573
"timeout": "240",
76-
"exclusionsFile": "configs/dashLicensesExclusions.json",
74+
"exclusionsFile": "configs/license-check-exclusions.json",
7775
"summaryFile": "dash-licenses-summary.txt"
7876
}
7977
```
@@ -99,7 +97,7 @@ The `exclusions file` contains one dependency per line, with an optional comment
9997

10098
Example scenario: an important Pull Request (PR) adds a 3PP dependency, whose license is believed by the project to be compatible, but for which `dash-licenses` disagrees (e.g. because of a low score). The dependency is submitted the IP team for further analysis but can't be automatically approved, quickly. In the meantime, to avoid delaying merging the important PR or merging and having the "License Check" CI job fail until the dependency is officially approved, it may be added to the `exclusions file`:
10199

102-
Let's say the project's exclusion file is `configs/dashLicensesExclusions.json`
100+
Let's say the project's exclusion file is `configs/license-check-exclusions.json`
103101

104102
The following entry is added: the first field is the 3PP as reported by `dash-licenses` and the second field is an optional comment, that can be used to track the reason for excluding the dependency from failing the license check. e.g.:
105103

@@ -110,14 +108,14 @@ The following entry is added: the first field is the 3PP as reported by `dash-li
110108
And then the wrapper can be called with CLI parameter `--exclusions` pointing to the `exclusions` file, like so:
111109

112110
```bash
113-
npx dash-licenses-wrapper --inputFile=./package-lock.json --exclusions=configs/dashLicensesExclusions.json
111+
npx dash-licenses-wrapper --inputFile=./package-lock.json --exclusions=configs/license-check-exclusions.json
114112
```
115113

116114
Exclusion file: `<repo_root>/dependency-check-baseline.json`
117115

118116
## GitHub workflow
119117

120-
An example workflow, that runs the license check, is provided in directory `examples` (by default under `node_modules/dash-licenses-wrapper/examples/license-check-workflow.yml`). It can be copied to a GitHub project's directory `<repo root>/.github/workflows` and adapted for the given project.
118+
An example workflow, that runs the license check, is provided in directory `examples` (by default under `node_modules/@eclipse-dash/nodejs-wrapper/examples/license-check-workflow.yml`). It can be copied to a GitHub project's directory `<repo root>/.github/workflows` and adapted for the given project.
121119

122120
If the project has added a `scripts` entry in the root `package.json` to run the license check, that may be used instead of `npx dash-licenses-wrapper [...]`. E.g. `yarn license:check [...]`.
123121

dash-licenses-wrapper-1.0.0.tgz

-19.6 KB
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"inputFile": "examples/package-lock.json",
55
"batch": 51,
66
"timeout": 241,
7-
"exclusions": "examples/dashLicensesExclusions.json",
8-
"summary": "dependency-check-summary.txt"
7+
"exclusions": "examples/license-check-exclusions.json",
8+
"summary": "license-check-summary.txt"
99
}

package.json

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
11
{
2-
"name": "dash-licenses-wrapper",
3-
"version": "1.0.0",
2+
"name": "@eclipse-dash/nodejs-wrapper",
3+
"version": "0.0.0",
44
"description": "Node.js wrapper for dash-licenses, that makes it easier to perform license checks for JS/TS Eclipse Foundation projects",
55
"publishConfig": {
6-
"access": "public"
6+
"access": "public",
7+
"registry": "https://registry.npmjs.org"
78
},
89
"bin": {
910
"dash-licenses-wrapper": "src/dash-licenses-wrapper.js"
1011
},
1112
"scripts": {
12-
"test": "mocha --reporter spec"
13+
"start": "node src/dash-licenses-wrapper.js",
14+
"test": "mocha --reporter spec",
15+
"publish": "npm run test && npm publish --registry=https://registry.npmjs.org/"
1316
},
17+
"files": [
18+
"src/*",
19+
"NOTICE.md",
20+
"SECURITY.md",
21+
"examples/license-check-*"
22+
],
1423
"devDependencies": {
1524
"chai": "^4.3.10",
1625
"mocha": "^10.2.0"

publishing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Publishing `dash-licenses-wrapper`
1+
# Publishing `@eclipse-dash/nodejs-wrapper`
22

33
```bash
44
# Setup npm token. e.g.

src/dash-licenses-wrapper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ function printHelp() {
295295
help(' npx dash-licenses-wrapper --dry-run --configFile=configs/dashLicensesConfig.json');
296296
help(' npx dash-licenses-wrapper --inputFile=package-lock.json --summary=/tmp/license-check-summary.txt --review');
297297
help(' npx dash-licenses-wrapper --summary=license-check-summary.txt --review --project=ecd.theia');
298-
help(' npx dash-licenses-wrapper --summary=license-check-summary.txt --review --project=ecd.theia --exclusions=license-check-exclusions.json');
298+
help(' npx dash-licenses-wrapper --summary=license-check-summary.txt --review --project=ecd.theia --exclusions=configs/license-check-exclusions.json');
299299
}
300300

301301
function getPrintableConfig(configObj) {

0 commit comments

Comments
 (0)