licensed 2.3.0 → 2.3.1
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.
- checksums.yaml +4 -4
- data/.travis.yml +13 -1
- data/CHANGELOG.md +8 -2
- data/lib/licensed/sources/bundler.rb +7 -6
- data/lib/licensed/sources/npm.rb +2 -0
- data/lib/licensed/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b184dfa3d4dce1ea45476c3c6100c8cdfaf1fb2d
|
4
|
+
data.tar.gz: f7c2ecdf054be1bdc2d98efb8e268e0b89f37e01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99f503908e8528098546f02466407022e708b1f8c8d2245ebf8eb104d3ba0652c7b8c1902a45348bf927c610a418cf3ee3f905f652264ec3e9769c06121d24a0
|
7
|
+
data.tar.gz: 256031960285da88bf28b3b1493a5f4bcc290a7776467e01820a83f339ce91751678bc21d046439912446ef4feece006a05f2d6aa0b410c22488d51ad4b44cff
|
data/.travis.yml
CHANGED
@@ -47,7 +47,19 @@ matrix:
|
|
47
47
|
node_js: "8"
|
48
48
|
before_script: ./script/source-setup/npm
|
49
49
|
script: ./script/test npm
|
50
|
-
env: NAME="npm"
|
50
|
+
env: NAME="npm 8"
|
51
|
+
|
52
|
+
- language: node_js
|
53
|
+
node_js: "10"
|
54
|
+
before_script: ./script/source-setup/npm
|
55
|
+
script: ./script/test npm
|
56
|
+
env: NAME="npm 10"
|
57
|
+
|
58
|
+
- language: node_js
|
59
|
+
node_js: "12"
|
60
|
+
before_script: ./script/source-setup/npm
|
61
|
+
script: ./script/test npm
|
62
|
+
env: NAME="npm 12"
|
51
63
|
|
52
64
|
# bower tests
|
53
65
|
- language: node_js
|
data/CHANGELOG.md
CHANGED
@@ -6,7 +6,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
-
## 2.1
|
9
|
+
## 2.3.1 - 2019-08-20
|
10
|
+
|
11
|
+
### Changed
|
12
|
+
- Using the npm source with yarn, "missing" dependencies are no longer considered errors (:tada: @krzysztof-pawlik-gat https://github.com/github/licensed/pull/170)
|
13
|
+
- The bundler source now calls `gem specification` with dependency version requirements (https://github.com/github/licensed/pull/173)
|
14
|
+
|
15
|
+
## 2.3.0 - 2019-05-19
|
10
16
|
|
11
17
|
### Added
|
12
18
|
- New Pipenv dependency source enumerator (:tada: @krzysztof-pawlik-gat https://github.com/github/licensed/pull/167)
|
@@ -167,4 +173,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
167
173
|
|
168
174
|
Initial release :tada:
|
169
175
|
|
170
|
-
[Unreleased]: https://github.com/github/licensed/compare/2.3.
|
176
|
+
[Unreleased]: https://github.com/github/licensed/compare/2.3.1...HEAD
|
@@ -151,7 +151,7 @@ module Licensed
|
|
151
151
|
spec = definition.resolve.find { |s| s.satisfies?(dependency) }
|
152
152
|
|
153
153
|
# a nil spec should be rare, generally only seen from bundler
|
154
|
-
return matching_spec(dependency) || bundle_exec_gem_spec(dependency.name) if spec.nil?
|
154
|
+
return matching_spec(dependency) || bundle_exec_gem_spec(dependency.name, dependency.requirement) if spec.nil?
|
155
155
|
|
156
156
|
# try to find a non-lazy specification that matches `spec`
|
157
157
|
# spec.source.specs gives access to specifications with more
|
@@ -166,7 +166,7 @@ module Licensed
|
|
166
166
|
|
167
167
|
# if the specification file doesn't exist, get the specification using
|
168
168
|
# the bundler and gem CLI
|
169
|
-
bundle_exec_gem_spec(dependency.name)
|
169
|
+
bundle_exec_gem_spec(dependency.name, dependency.requirement)
|
170
170
|
end
|
171
171
|
|
172
172
|
# Returns whether a dependency should be included in the final
|
@@ -200,7 +200,7 @@ module Licensed
|
|
200
200
|
|
201
201
|
# Load a gem specification from the YAML returned from `gem specification`
|
202
202
|
# This is a last resort when licensed can't obtain a specification from other means
|
203
|
-
def bundle_exec_gem_spec(name)
|
203
|
+
def bundle_exec_gem_spec(name, requirement)
|
204
204
|
# `gem` must be available to run `gem specification`
|
205
205
|
return unless Licensed::Shell.tool_available?("gem")
|
206
206
|
|
@@ -209,11 +209,12 @@ module Licensed
|
|
209
209
|
begin
|
210
210
|
::Bundler.with_original_env do
|
211
211
|
::Bundler.rubygems.clear_paths
|
212
|
-
yaml = Licensed::Shell.execute(*ruby_command_args("gem", "specification", name))
|
212
|
+
yaml = Licensed::Shell.execute(*ruby_command_args("gem", "specification", name, "-v", requirement.to_s))
|
213
213
|
spec = Gem::Specification.from_yaml(yaml)
|
214
214
|
# this is horrible, but it will cache the gem_dir using the clean env
|
215
|
-
# so that it can be used outside of this block
|
216
|
-
|
215
|
+
# so that it can be used outside of this block when running from
|
216
|
+
# the ruby packer executable environment
|
217
|
+
spec.gem_dir if ruby_packer?
|
217
218
|
spec
|
218
219
|
end
|
219
220
|
rescue Licensed::Shell::Error
|
data/lib/licensed/sources/npm.rb
CHANGED
@@ -13,6 +13,7 @@ module Licensed
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def enumerate_dependencies
|
16
|
+
@yarn_lock_present = File.exist?(@config.pwd.join("yarn.lock"))
|
16
17
|
packages.map do |name, package|
|
17
18
|
path = package["path"]
|
18
19
|
Dependency.new(
|
@@ -48,6 +49,7 @@ module Licensed
|
|
48
49
|
# package name to it's metadata
|
49
50
|
def recursive_dependencies(dependencies, result = {})
|
50
51
|
dependencies.each do |name, dependency|
|
52
|
+
next if @yarn_lock_present && dependency["missing"]
|
51
53
|
(result[name] ||= []) << dependency
|
52
54
|
recursive_dependencies(dependency["dependencies"] || {}, result)
|
53
55
|
end
|
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: 2.3.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: licensee
|