license-downloader 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +2 -2
- package/lib/filesystem-service.js +3 -3
- package/lib/util.js +1 -1
- package/lib/web-service.js +4 -4
- package/package.json +14 -18
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [1.3.3](https://github.com/BePo65/license-downloader/compare/v1.3.2...v1.3.3) (2025-10-24)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- update packages to remove security warnings ([ed33513](https://github.com/BePo65/license-downloader/commit/ed335136b83d817e8ebeb2ecd6a5baadba8e5757))
|
|
10
|
+
- use "node:" in imports ([dc35d48](https://github.com/BePo65/license-downloader/commit/dc35d480f30f4508ceeae9de7c83f5a5f26c09b9))
|
|
11
|
+
|
|
5
12
|
## [1.3.2](https://github.com/BePo65/license-downloader/compare/v1.3.1...v1.3.2) (2025-05-02)
|
|
6
13
|
|
|
7
14
|
## [1.3.1](https://github.com/BePo65/license-downloader/compare/v1.3.0...v1.3.1) (2024-12-10)
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# license-downloader - an add-on to license-report tool
|
|
2
2
|
|
|
3
|
-
](
|
|
3
|
+
[](https://github.com/BePo65/license-downloader/blob/main/CHANGELOG.md)
|
|
4
|
+
[](https://github.com/BePo65/license-downloader/blob/main/LICENSE)
|
|
5
5
|
|
|
6
6
|
> Download the license files of the dependencies of a project based on the json report from the package 'license-report'.
|
|
7
7
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import path from 'path';
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
3
|
import jsonfile from 'jsonfile';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Reads json file generated by license-report (with option "--output=json")
|
|
7
7
|
* and generates javascript object array from it
|
|
8
8
|
* @param {string} filePath - full path to the license-report generated json file
|
|
9
|
-
* @returns {
|
|
9
|
+
* @returns {object} content of the license-report generated json file as object array
|
|
10
10
|
*/
|
|
11
11
|
export const readJson = async (filePath) => {
|
|
12
12
|
if (!filePath) {
|
package/lib/util.js
CHANGED
package/lib/web-service.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
1
|
+
import fs from 'node:fs';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import stream from 'stream';
|
|
4
4
|
import { promisify } from 'util';
|
|
@@ -211,7 +211,7 @@ const getPackageNameFromLink = (link) => {
|
|
|
211
211
|
|
|
212
212
|
/**
|
|
213
213
|
* Adds path to license file to object array
|
|
214
|
-
* @param {
|
|
214
|
+
* @param {object[]} packagesInfos - array of objects generated from the license-report generated json file
|
|
215
215
|
* @param {object} httpRetryOptions - http retry options for 'got' requests ({maxAttempts})
|
|
216
216
|
* @param {object} authorizationOptions - authorization options for 'got' requests {tokenEnvVar, tokenFileEnvVar}
|
|
217
217
|
*/
|
|
@@ -272,7 +272,7 @@ export const addLicenseFilePath = async (
|
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
console.error(
|
|
275
|
-
`the project '${githubPackageName}' does not contain a license file on github`,
|
|
275
|
+
`the project '${githubPackageName}' does not contain a license file on github; request returned ${response.statusCode} ( ${response.statusMessage})`,
|
|
276
276
|
);
|
|
277
277
|
debugForApp(
|
|
278
278
|
`no license file on '${licenseInfoAdr}' ('${error.message}')`,
|
|
@@ -289,7 +289,7 @@ export const addLicenseFilePath = async (
|
|
|
289
289
|
|
|
290
290
|
/**
|
|
291
291
|
* Download all license files to target directory
|
|
292
|
-
* @param {
|
|
292
|
+
* @param {object[]} packagesInfos - array of objects with package infos including path to license file
|
|
293
293
|
* @param {string} targetDirectory - path of directory for downloaded license files
|
|
294
294
|
* @param {object} httpRetryOptions - http retry options for 'got' requests ({maxAttempts})
|
|
295
295
|
* @param {object} authorizationOptions - authorization options for 'got' requests {tokenEnvVar, tokenFileEnvVar}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "license-downloader",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"description": "Download the license files of the dependencies of a project",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"engines": {
|
|
11
|
-
"node": ">=
|
|
11
|
+
"node": ">=20"
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
14
|
"index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"bugs": "https://github.com/BePo65/license-downloader/issues",
|
|
23
23
|
"scripts": {
|
|
24
24
|
"lint": "npx eslint index.js lib/**/*.js test/**/*.js **/*.json",
|
|
25
|
-
"test": "
|
|
25
|
+
"test": "node --test --test-reporter=spec",
|
|
26
26
|
"lint-commits": "commitlint --from d6a731d70b4f2 --to HEAD --verbose",
|
|
27
27
|
"init-changelog": "commit-and-tag-version -i CHANGELOG.md --same-file --prerelease pre --first-release",
|
|
28
28
|
"release": "commit-and-tag-version -i CHANGELOG.md --same-file",
|
|
@@ -36,29 +36,25 @@
|
|
|
36
36
|
"author": "BePo65",
|
|
37
37
|
"license": "MIT",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"debug": "^4.4.
|
|
40
|
-
"got": "^14.
|
|
41
|
-
"jsonfile": "^6.
|
|
39
|
+
"debug": "^4.4.3",
|
|
40
|
+
"got": "^14.6.0",
|
|
41
|
+
"jsonfile": "^6.2.0",
|
|
42
42
|
"rc": "^1.2.8"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@commitlint/cli": "^
|
|
46
|
-
"@commitlint/config-angular": "^
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"eslint": "^
|
|
50
|
-
"eslint-plugin-chai-expect": "^3.1.0",
|
|
51
|
-
"eslint-plugin-jsdoc": "^50.6.11",
|
|
45
|
+
"@commitlint/cli": "^20.1.0",
|
|
46
|
+
"@commitlint/config-angular": "^20.0.0",
|
|
47
|
+
"commit-and-tag-version": "^12.6.0",
|
|
48
|
+
"eslint": "^9.38.0",
|
|
49
|
+
"eslint-plugin-jsdoc": "^61.1.5",
|
|
52
50
|
"eslint-plugin-json": "^4.0.1",
|
|
53
|
-
"eslint-plugin-
|
|
54
|
-
"eslint-plugin-n": "^17.17.0",
|
|
51
|
+
"eslint-plugin-n": "^17.23.1",
|
|
55
52
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
56
53
|
"eslint-plugin-security": "^3.0.1",
|
|
57
54
|
"eslint-plugin-security-node": "^1.1.4",
|
|
58
55
|
"husky": "^9.1.7",
|
|
59
|
-
"lint-staged": "^
|
|
60
|
-
"
|
|
61
|
-
"prettier": "^3.5.3",
|
|
56
|
+
"lint-staged": "^16.2.6",
|
|
57
|
+
"prettier": "^3.6.2",
|
|
62
58
|
"temp": "^0.9.4"
|
|
63
59
|
},
|
|
64
60
|
"lint-staged": {
|