licensed 3.4.0 → 3.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -1
- data/docs/commands/status.md +14 -10
- data/lib/licensed/sources/yarn/berry.rb +9 -3
- data/lib/licensed/sources/yarn/v1.rb +9 -3
- data/lib/licensed/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a241c3ec016e1b2f49cc7a4ed53c53ee07a45fb5dc5f1b6655e6c4e5acf2d6d
|
4
|
+
data.tar.gz: 26e55577302098d09128c87d422856307841fa85dd95c181a7fe9280713ee644
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4358bc3c0f238d569beb172ded8589088336a64ccac81f55f2f669e7619c59c5590fdda1b88c5d3812cc8f554af2381ec1f74f40798634a547a6e8884d33c10e
|
7
|
+
data.tar.gz: 751818fb0934e5cf80629971267373117d1649d6ec65f8ae35477f53153307a4fee7893d9182f9b112fe622d8554656ca4892717084793b31577cb1b86557fad
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## 3.4.1
|
10
|
+
|
11
|
+
2022-01-07
|
12
|
+
|
13
|
+
### Fixed
|
14
|
+
|
15
|
+
- Malformed package.json files will no longer crash yarn dependency detection (https://github.com/github/licensed/pull/431)
|
16
|
+
|
9
17
|
## 3.4.0
|
10
18
|
|
11
19
|
2021-12-14
|
@@ -539,4 +547,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
539
547
|
|
540
548
|
Initial release :tada:
|
541
549
|
|
542
|
-
[Unreleased]: https://github.com/github/licensed/compare/3.4.
|
550
|
+
[Unreleased]: https://github.com/github/licensed/compare/3.4.1...HEAD
|
data/docs/commands/status.md
CHANGED
@@ -39,30 +39,34 @@ The following data is reported for each dependency when the YAML or JSON report
|
|
39
39
|
|
40
40
|
### cached dependency record not found
|
41
41
|
|
42
|
-
|
43
|
-
|
42
|
+
*Cause:* A dependency was found while running `licensed status` that does not have a corresponding cached metadata file
|
43
|
+
|
44
|
+
*Resolution:* Run `licensed cache` to update the metadata cache and create the missing metadata file
|
44
45
|
|
45
46
|
### cached dependency record out of date
|
46
47
|
|
47
|
-
|
48
|
-
|
48
|
+
*Cause:* A dependency was found while running `licensed status` with a different version than is contained in the dependency's cached metadata file
|
49
|
+
|
50
|
+
*Resolution:* Run `licensed cache` to update the out-of-date metadata files
|
49
51
|
|
50
52
|
### missing license text
|
51
53
|
|
52
|
-
|
53
|
-
|
54
|
+
*Cause:* A license determination was made, e.g. from package metadata, but no license text was found.
|
55
|
+
|
56
|
+
*Resolution:* Manually verify whether the dependency includes a file containing license text. If the dependency code that was downloaded locally does not contain the license text, please check the dependency source at the version listed in the dependency's cached metadata file to see if there is license text that can be used.
|
54
57
|
|
55
58
|
If the dependency does not include license text but does specify that it uses a specific license, please copy the standard license text from a [well known source](https://opensource.org/licenses).
|
56
59
|
|
57
60
|
### license text has changed and needs re-review. if the new text is ok, remove the `review_changed_license` flag from the cached record
|
58
61
|
|
59
|
-
|
60
|
-
|
62
|
+
*Cause:* A dependency that is set as [reviewed] in the licensed configuration file has substantially changed and should be re-reviewed.
|
63
|
+
|
64
|
+
*Resolution:* Review the changes to the license text and classification, along with other metadata contained in the cached file for the dependency. If the dependency is still allowable for use in your project, remove the `review_changed_license` key from the cached record file.
|
61
65
|
|
62
66
|
### license needs review
|
63
67
|
|
64
|
-
|
65
|
-
|
68
|
+
*Cause:* A dependency is using a license that is not in the configured [allowed list of licenses][allowed], and the dependency has not been marked [ignored] or [reviewed].
|
69
|
+
*Resolution:* Review the dependency's usage and specified license with someone familiar with OSS licensing and compliance rules to determine whether the dependency is allowable. Some common resolutions:
|
66
70
|
|
67
71
|
1. The dependency's specified license text differed enough from the standard license text that it was not recognized and classified as `other`. If, with human review, the license text is recognizable then update the `license: other` value in the cached metadata file to the correct license.
|
68
72
|
- An updated classification will persist through version upgrades until the detected license contents have changed. The determination is made by [licensee/licensee](https://github.com/licensee/licensee), the library which this tool uses to detect and classify license contents.
|
@@ -63,9 +63,15 @@ module Licensed
|
|
63
63
|
# by parsing every package.json file under node_modules.
|
64
64
|
def dependency_paths
|
65
65
|
@dependency_paths ||= Dir.glob(config.pwd.join("node_modules/**/package.json")).each_with_object({}) do |file, hsh|
|
66
|
-
|
67
|
-
|
68
|
-
|
66
|
+
begin
|
67
|
+
dirname = File.dirname(file)
|
68
|
+
json = JSON.parse(File.read(file))
|
69
|
+
hsh["#{json["name"]}-#{json["version"]}"] = dirname
|
70
|
+
rescue JSON::ParserError
|
71
|
+
# don't crash execution if there is a problem parsing a package.json file
|
72
|
+
# if the bad package.json file relates to a package that licensed should be reporting on
|
73
|
+
# then this will still result in an error about a missing package
|
74
|
+
end
|
69
75
|
end
|
70
76
|
end
|
71
77
|
|
@@ -77,9 +77,15 @@ module Licensed
|
|
77
77
|
# by parsing every package.json file under node_modules.
|
78
78
|
def dependency_paths
|
79
79
|
@dependency_paths ||= Dir.glob(config.pwd.join("node_modules/**/package.json")).each_with_object({}) do |file, hsh|
|
80
|
-
|
81
|
-
|
82
|
-
|
80
|
+
begin
|
81
|
+
dirname = File.dirname(file)
|
82
|
+
json = JSON.parse(File.read(file))
|
83
|
+
hsh["#{json["name"]}@#{json["version"]}"] = dirname
|
84
|
+
rescue JSON::ParserError
|
85
|
+
# don't crash execution if there is a problem parsing a package.json file
|
86
|
+
# if the bad package.json file relates to a package that licensed should be reporting on
|
87
|
+
# then this will still result in an error about a missing package
|
88
|
+
end
|
83
89
|
end
|
84
90
|
end
|
85
91
|
|
data/lib/licensed/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: licensed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: licensee
|