bibliothecary 5.3.3 → 5.3.4

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
  SHA1:
3
- metadata.gz: 8a44c7031b6fc5beb23351508a79b76b67871051
4
- data.tar.gz: 048c1448e4cb9d82fc852f2499d2b3b081312afe
3
+ metadata.gz: 063b544e4ac6eebc896b7c302661ae0ffcbc75a3
4
+ data.tar.gz: 126b6165dcfe0fe5ce21eb98b81e745a24b166cf
5
5
  SHA512:
6
- metadata.gz: a3f2e49e8e163ac20c8acf0fc9524b1ad075fc496e267720fb0a2275e14ee00ebc960a99efc17880911d2efe577a443b13b9074985f53b54b229076504e0c90e
7
- data.tar.gz: d61ec58eae2b3707926555643d3b9f01a5dcfc11dd827c2ef1eea7655231b0e8faabee26a499ff3e658e135b32bf1663531380985a2eb6b80be3b85a923d2620
6
+ metadata.gz: 9dc6f7227c16bcf3f013776b822df9fd1302c4834855fd9fb4b3c96a54b9e93903dd1a4e96039c3914e3edcab727c25fe2146b685c9ec804627c93b81ed04fc0
7
+ data.tar.gz: 6e65bbe8c730a5fd4ede8db52eb163d000752262c3018ea77ac2faf1b069db31e403278c7caca2f6ced08788e473039076574bc0760f41a4514500787413ebca
data/README.md CHANGED
@@ -48,6 +48,7 @@ Bibliothecary.analyse('./')
48
48
 
49
49
  - npm
50
50
  - package.json
51
+ - package-lock.json
51
52
  - npm-shrinkwrap.json
52
53
  - yarn.lock
53
54
  - Maven
@@ -18,6 +18,10 @@ module Bibliothecary
18
18
  /^(?!node_modules).*yarn\.lock$/ => {
19
19
  kind: 'lockfile',
20
20
  parser: :parse_yarn_lock
21
+ },
22
+ /^(?!node_modules).*package-lock\.json$/ => {
23
+ kind: 'lockfile',
24
+ parser: :parse_package_lock
21
25
  }
22
26
  }
23
27
  end
@@ -33,6 +37,17 @@ module Bibliothecary
33
37
  end
34
38
  end
35
39
 
40
+ def self.parse_package_lock(file_contents)
41
+ manifest = JSON.parse(file_contents)
42
+ manifest.fetch('dependencies',[]).map do |name, requirement|
43
+ {
44
+ name: name,
45
+ requirement: requirement["version"],
46
+ type: 'runtime'
47
+ }
48
+ end
49
+ end
50
+
36
51
  def self.parse_manifest(file_contents)
37
52
  manifest = JSON.parse(file_contents)
38
53
  map_dependencies(manifest, 'dependencies', 'runtime') +
@@ -1,3 +1,3 @@
1
1
  module Bibliothecary
2
- VERSION = "5.3.3"
2
+ VERSION = "5.3.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bibliothecary
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.3
4
+ version: 5.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Nesbitt
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-22 00:00:00.000000000 Z
11
+ date: 2017-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: toml-rb