licensed 3.4.2 → 3.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d7cec159ef0a5af9df07ac13ba8f540897d1039436d39d361ad2948f305f857
4
- data.tar.gz: 1e7b7b50ee7715c41e0b5774104039e471be2d749645a38265d3930d51cd81ab
3
+ metadata.gz: 6ff397378a053e97414fb762f3d06c41f4217f61d9e63130aa3786456e6f2114
4
+ data.tar.gz: b197f77bc54c68e5bf9462917351ca2dbda1509813315a8207fd31ed4c611de0
5
5
  SHA512:
6
- metadata.gz: 5c32f95d211dece04fea6c8dff48525593a8348d36dea980f0815159922b5b813270d0ac8b4f6425a9cbcf9437cbf145693f18411b733c917f56ef1b495cca77
7
- data.tar.gz: '095b85ceea926a975b18b8001bebca68343dba8550ed2533ccc7eb3860424f707b0756cc121e8c6ad2fc7715c734232f43175513e5005a5c6f535551c3831f6f'
6
+ metadata.gz: 68d86169b07dd46f28de9cd31745e705f82e8f49e1968df5d8ff90139d6c60d2b31d861ca79d39657b5af956b3d73540cf492db6f6f84589132dc27ab65e33e5
7
+ data.tar.gz: '005804bf6877d487434dc74fe9c2fbbe9c57c15bfd7924fc3a3992f7879c878056c871c4f5d7867b5e5254a59751b8839363fb4de60e1d43cdfeb6e2e1ae67f1'
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.3
10
+
11
+ 2022-01-31
12
+
13
+ ### Added
14
+
15
+ - The npm source handles more cases of missing, optional, peer dependencies (https://github.com/github/licensed/pull/443)
16
+
9
17
  ## 3.4.2
10
18
 
11
19
  2022-01-17
@@ -555,4 +563,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
555
563
 
556
564
  Initial release :tada:
557
565
 
558
- [Unreleased]: https://github.com/github/licensed/compare/3.4.2...HEAD
566
+ [Unreleased]: https://github.com/github/licensed/compare/3.4.3...HEAD
@@ -135,7 +135,15 @@ module Licensed
135
135
  end
136
136
 
137
137
  def missing_peer?(parent, dependency, name)
138
- dependency["peerMissing"] || (dependency["missing"] && peer_dependency(parent, name))
138
+ # return true if dependency is marked as "peerMissing"
139
+ return true if dependency["peerMissing"]
140
+
141
+ # return false unless the parent has registered the dependency
142
+ # as a peer
143
+ return false unless peer_dependency(parent, name)
144
+ # return true if the dependency itself is marked as missing
145
+ return true if dependency["missing"]
146
+ dependency.empty? && parent&.dig("peerDependenciesMeta", name, "optional")
139
147
  end
140
148
 
141
149
  def peer_dependency(parent, name)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Licensed
3
- VERSION = "3.4.2".freeze
3
+ VERSION = "3.4.3".freeze
4
4
 
5
5
  def self.previous_major_versions
6
6
  major_version = Gem::Version.new(Licensed::VERSION).segments.first
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.2
4
+ version: 3.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-17 00:00:00.000000000 Z
11
+ date: 2022-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: licensee