danger-packwerk 0.12.0 → 0.13.0

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: d63ad05d77aca71933a6864ac3cc17f566ed2776ea5a3aa7b9be89ab874110f3
4
- data.tar.gz: da650a6214759b091bda3326f975a0d72d8b7b75828742e0e60671c59f081b1b
3
+ metadata.gz: 88dd6cf3e1597ce88a505eaa638404b5ec37733adbfd08c121d2ea1718ff4c80
4
+ data.tar.gz: 37c3d43dfba549cab2d536fd38a0ad080968d5277f21ac6a9c7fadb2100dbdec
5
5
  SHA512:
6
- metadata.gz: 70318e98facfd6d213292f3b972f2d226317ee6fffa292ce33f0e33fe68e521fdc6a5cb9c2d5ddf8dba0ba69f07abedb0a67189cbb0c6602ec964024da5b4e38
7
- data.tar.gz: 7f9196a3edf2ecd058d088f961bbc889a34171e8140ed93142546c9af57de388c7b23e9db74189c2e9c01dbecbf3cc4c9342b6c684224cf524340390e1d5a42b
6
+ metadata.gz: ee1bb1ca1f19f6a47d3766bd823bf83a7c8d8c5441e703aec6e8404d036cf02be80d00f6ab9feceb03d791d603497216bb9a7834b2454a947b07c6ef89276869
7
+ data.tar.gz: 2c0802e7bb7ce6100fcc63d27ded9071fea2e3661cc0cd622188581f4056f44110a61bf1e0936a43ca5baeca33d02d2abe65c4eb35debe9291739d00cd0f8e38
@@ -14,7 +14,7 @@ module DangerPackwerk
14
14
  def self.constant_resolver
15
15
  @constant_resolver = T.let(@constant_resolver, T.nilable(ConstantResolver))
16
16
  @constant_resolver ||= begin
17
- load_paths = Packwerk::ApplicationLoadPaths.extract_relevant_paths(Dir.pwd, 'test')
17
+ load_paths = Packwerk::RailsLoadPaths.for(Dir.pwd, environment: 'test')
18
18
  ConstantResolver.new(
19
19
  root_path: Dir.pwd,
20
20
  load_paths: T.unsafe(load_paths).keys
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module DangerPackwerk
5
- VERSION = '0.12.0'
5
+ VERSION = '0.13.0'
6
6
  end
@@ -9,50 +9,6 @@ module Packwerk
9
9
  extend ::ActiveSupport::Autoload
10
10
  end
11
11
 
12
- # Extracts the load paths from the analyzed application so that we can map constant names to paths.
13
- #
14
- # source://packwerk//lib/packwerk/application_load_paths.rb#8
15
- module Packwerk::ApplicationLoadPaths
16
- class << self
17
- # source://packwerk//lib/packwerk/application_load_paths.rb#22
18
- sig { returns(T::Hash[::String, ::Module]) }
19
- def extract_application_autoload_paths; end
20
-
21
- # source://packwerk//lib/packwerk/application_load_paths.rb#13
22
- sig { params(root: ::String, environment: ::String).returns(T::Hash[::String, ::Module]) }
23
- def extract_relevant_paths(root, environment); end
24
-
25
- # source://packwerk//lib/packwerk/application_load_paths.rb#32
26
- sig do
27
- params(
28
- all_paths: T::Hash[::String, ::Module],
29
- bundle_path: ::Pathname,
30
- rails_root: ::Pathname
31
- ).returns(T::Hash[::Pathname, ::Module])
32
- end
33
- def filter_relevant_paths(all_paths, bundle_path: T.unsafe(nil), rails_root: T.unsafe(nil)); end
34
-
35
- # source://packwerk//lib/packwerk/application_load_paths.rb#43
36
- sig do
37
- params(
38
- load_paths: T::Hash[::Pathname, ::Module],
39
- rails_root: ::Pathname
40
- ).returns(T::Hash[::String, ::Module])
41
- end
42
- def relative_path_strings(load_paths, rails_root: T.unsafe(nil)); end
43
-
44
- private
45
-
46
- # source://packwerk//lib/packwerk/application_load_paths.rb#63
47
- sig { params(paths: T::Hash[T.untyped, ::Module]).void }
48
- def assert_load_paths_present(paths); end
49
-
50
- # source://packwerk//lib/packwerk/application_load_paths.rb#50
51
- sig { params(root: ::String, environment: ::String).void }
52
- def require_application(root, environment); end
53
- end
54
- end
55
-
56
12
  # Checks the structure of the application and its packwerk configuration to make sure we can run a check and deliver
57
13
  # correct results.
58
14
  #
@@ -1697,6 +1653,50 @@ end
1697
1653
  # source://packwerk//lib/packwerk/package_set.rb#8
1698
1654
  Packwerk::PathSpec = T.type_alias { T.any(::String, T::Array[::String]) }
1699
1655
 
1656
+ # Extracts the load paths from the analyzed application so that we can map constant names to paths.
1657
+ #
1658
+ # source://packwerk//lib/packwerk/rails_load_paths.rb#10
1659
+ module Packwerk::RailsLoadPaths
1660
+ class << self
1661
+ # source://packwerk//lib/packwerk/rails_load_paths.rb#15
1662
+ sig { params(root: ::String, environment: ::String).returns(T::Hash[::String, ::Module]) }
1663
+ def for(root, environment:); end
1664
+
1665
+ private
1666
+
1667
+ # source://packwerk//lib/packwerk/rails_load_paths.rb#65
1668
+ sig { params(paths: T::Hash[T.untyped, ::Module]).void }
1669
+ def assert_load_paths_present(paths); end
1670
+
1671
+ # source://packwerk//lib/packwerk/rails_load_paths.rb#26
1672
+ sig { returns(T::Hash[::String, ::Module]) }
1673
+ def extract_application_autoload_paths; end
1674
+
1675
+ # source://packwerk//lib/packwerk/rails_load_paths.rb#36
1676
+ sig do
1677
+ params(
1678
+ all_paths: T::Hash[::String, ::Module],
1679
+ bundle_path: ::Pathname,
1680
+ rails_root: ::Pathname
1681
+ ).returns(T::Hash[::Pathname, ::Module])
1682
+ end
1683
+ def filter_relevant_paths(all_paths, bundle_path: T.unsafe(nil), rails_root: T.unsafe(nil)); end
1684
+
1685
+ # source://packwerk//lib/packwerk/rails_load_paths.rb#47
1686
+ sig do
1687
+ params(
1688
+ load_paths: T::Hash[::Pathname, ::Module],
1689
+ rails_root: ::Pathname
1690
+ ).returns(T::Hash[::String, ::Module])
1691
+ end
1692
+ def relative_path_strings(load_paths, rails_root: T.unsafe(nil)); end
1693
+
1694
+ # source://packwerk//lib/packwerk/rails_load_paths.rb#52
1695
+ sig { params(root: ::String, environment: ::String).void }
1696
+ def require_application(root, environment); end
1697
+ end
1698
+ end
1699
+
1700
1700
  # A reference from a file in one package to a constant that may be defined in a different package.
1701
1701
  #
1702
1702
  # source://packwerk//lib/packwerk/reference.rb#6
@@ -1,2 +1,4 @@
1
1
  require 'packwerk'
2
2
  require 'danger'
3
+ # This triggers the autoload in packwerk so types for this constant are defined
4
+ Packwerk::RailsLoadPaths
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger-packwerk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gusto Engineers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-16 00:00:00.000000000 Z
11
+ date: 2022-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: code_ownership
@@ -260,7 +260,7 @@ files:
260
260
  - sorbet/rbi/gems/nokogiri@1.13.8.rbi
261
261
  - sorbet/rbi/gems/octokit@5.6.1.rbi
262
262
  - sorbet/rbi/gems/open4@1.3.4.rbi
263
- - sorbet/rbi/gems/packwerk@2.2.1-7428f23e243a4a172ddb4e28021a732e2c9abc1a.rbi
263
+ - sorbet/rbi/gems/packwerk@2.2.1-e998ef65194de398f0baaf03a0ba33390b30351e.rbi
264
264
  - sorbet/rbi/gems/parallel@1.22.1.rbi
265
265
  - sorbet/rbi/gems/parse_packwerk@0.16.0.rbi
266
266
  - sorbet/rbi/gems/parser@3.1.2.1.rbi