danger-packwerk 0.8.0 → 0.10.0
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/README.md +47 -32
- data/lib/danger-packwerk/basic_reference_offense.rb +19 -19
- data/lib/danger-packwerk/check/default_formatter.rb +3 -3
- data/lib/danger-packwerk/{danger_deprecated_references_yml_changes.rb → danger_package_todo_yml_changes.rb} +44 -32
- data/lib/danger-packwerk/danger_packwerk.rb +10 -2
- data/lib/danger-packwerk/packwerk_wrapper.rb +10 -0
- data/lib/danger-packwerk/private.rb +0 -1
- data/lib/danger-packwerk/version.rb +1 -1
- data/lib/danger-packwerk.rb +4 -2
- data/sorbet/rbi/gems/{packwerk@2.2.1.rbi → packwerk@2.2.1-7e8e7a50705833b41fe40c201eadb85ff9a1a422.rbi} +852 -231
- data/sorbet/rbi/gems/parse_packwerk@0.16.0.rbi +224 -0
- metadata +7 -8
- data/lib/danger-packwerk/private/deprecated_references.rb +0 -65
- data/sorbet/rbi/gems/parse_packwerk@0.12.1.rbi +0 -146
@@ -0,0 +1,224 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `parse_packwerk` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem parse_packwerk`.
|
6
|
+
|
7
|
+
# source://parse_packwerk//lib/parse_packwerk/constants.rb#3
|
8
|
+
module ParsePackwerk
|
9
|
+
class << self
|
10
|
+
# source://parse_packwerk//lib/parse_packwerk.rb#28
|
11
|
+
sig { returns(T::Array[::ParsePackwerk::Package]) }
|
12
|
+
def all; end
|
13
|
+
|
14
|
+
# source://parse_packwerk//lib/parse_packwerk.rb#112
|
15
|
+
sig { void }
|
16
|
+
def bust_cache!; end
|
17
|
+
|
18
|
+
# source://parse_packwerk//lib/parse_packwerk.rb#33
|
19
|
+
sig { params(name: ::String).returns(T.nilable(::ParsePackwerk::Package)) }
|
20
|
+
def find(name); end
|
21
|
+
|
22
|
+
# source://parse_packwerk//lib/parse_packwerk.rb#43
|
23
|
+
sig { params(file_path: T.any(::Pathname, ::String)).returns(::ParsePackwerk::Package) }
|
24
|
+
def package_from_path(file_path); end
|
25
|
+
|
26
|
+
# source://parse_packwerk//lib/parse_packwerk.rb#54
|
27
|
+
sig { params(package: ::ParsePackwerk::Package).void }
|
28
|
+
def write_package_yml!(package); end
|
29
|
+
|
30
|
+
# source://parse_packwerk//lib/parse_packwerk.rb#38
|
31
|
+
sig { returns(::ParsePackwerk::Configuration) }
|
32
|
+
def yml; end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
# We memoize packages_by_name for fast lookup.
|
37
|
+
# Since Graph is an immutable value object, we can create indexes and general caching mechanisms safely.
|
38
|
+
#
|
39
|
+
# source://parse_packwerk//lib/parse_packwerk.rb#100
|
40
|
+
sig { returns(T::Hash[::String, ::ParsePackwerk::Package]) }
|
41
|
+
def packages_by_name; end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# source://parse_packwerk//lib/parse_packwerk/configuration.rb#4
|
46
|
+
class ParsePackwerk::Configuration < ::T::Struct
|
47
|
+
const :exclude, T::Array[::String]
|
48
|
+
const :package_paths, T::Array[::String]
|
49
|
+
|
50
|
+
class << self
|
51
|
+
# source://parse_packwerk//lib/parse_packwerk/configuration.rb#28
|
52
|
+
sig { params(config_hash: T::Hash[T.untyped, T.untyped]).returns(T::Array[::String]) }
|
53
|
+
def excludes(config_hash); end
|
54
|
+
|
55
|
+
# source://parse_packwerk//lib/parse_packwerk/configuration.rb#11
|
56
|
+
sig { returns(::ParsePackwerk::Configuration) }
|
57
|
+
def fetch; end
|
58
|
+
|
59
|
+
# source://sorbet-runtime/0.5.10588/lib/types/struct.rb#13
|
60
|
+
def inherited(s); end
|
61
|
+
|
62
|
+
# source://parse_packwerk//lib/parse_packwerk/configuration.rb#40
|
63
|
+
sig { params(config_hash: T::Hash[T.untyped, T.untyped]).returns(T::Array[::String]) }
|
64
|
+
def package_paths(config_hash); end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
# source://parse_packwerk//lib/parse_packwerk/constants.rb#22
|
69
|
+
ParsePackwerk::DEFAULT_EXCLUDE_GLOBS = T.let(T.unsafe(nil), Array)
|
70
|
+
|
71
|
+
# source://parse_packwerk//lib/parse_packwerk/constants.rb#23
|
72
|
+
ParsePackwerk::DEFAULT_PACKAGE_PATHS = T.let(T.unsafe(nil), Array)
|
73
|
+
|
74
|
+
# source://parse_packwerk//lib/parse_packwerk/constants.rb#24
|
75
|
+
ParsePackwerk::DEFAULT_PUBLIC_PATH = T.let(T.unsafe(nil), String)
|
76
|
+
|
77
|
+
# source://parse_packwerk//lib/parse_packwerk/constants.rb#14
|
78
|
+
ParsePackwerk::DEPENDENCIES = T.let(T.unsafe(nil), String)
|
79
|
+
|
80
|
+
# source://parse_packwerk//lib/parse_packwerk/constants.rb#10
|
81
|
+
ParsePackwerk::DEPENDENCY_VIOLATION_TYPE = T.let(T.unsafe(nil), String)
|
82
|
+
|
83
|
+
# source://parse_packwerk//lib/parse_packwerk/constants.rb#8
|
84
|
+
ParsePackwerk::ENFORCE_DEPENDENCIES = T.let(T.unsafe(nil), String)
|
85
|
+
|
86
|
+
# source://parse_packwerk//lib/parse_packwerk/constants.rb#9
|
87
|
+
ParsePackwerk::ENFORCE_PRIVACY = T.let(T.unsafe(nil), String)
|
88
|
+
|
89
|
+
# source://parse_packwerk//lib/parse_packwerk/constants.rb#13
|
90
|
+
ParsePackwerk::METADATA = T.let(T.unsafe(nil), String)
|
91
|
+
|
92
|
+
# Since this metadata is unstructured YAML, it could be any type. We leave it to clients of `ParsePackwerk::Package`
|
93
|
+
# to add types based on their known usage of metadata.
|
94
|
+
#
|
95
|
+
# source://parse_packwerk//lib/parse_packwerk/constants.rb#18
|
96
|
+
ParsePackwerk::MetadataYmlType = T.type_alias { T::Hash[T.untyped, T.untyped] }
|
97
|
+
|
98
|
+
# source://parse_packwerk//lib/parse_packwerk.rb#14
|
99
|
+
class ParsePackwerk::MissingConfiguration < ::StandardError
|
100
|
+
# source://parse_packwerk//lib/parse_packwerk.rb#18
|
101
|
+
sig { params(packwerk_file_name: ::Pathname).void }
|
102
|
+
def initialize(packwerk_file_name); end
|
103
|
+
end
|
104
|
+
|
105
|
+
# source://parse_packwerk//lib/parse_packwerk/constants.rb#7
|
106
|
+
ParsePackwerk::PACKAGE_TODO_YML_NAME = T.let(T.unsafe(nil), String)
|
107
|
+
|
108
|
+
# source://parse_packwerk//lib/parse_packwerk/constants.rb#5
|
109
|
+
ParsePackwerk::PACKAGE_YML_NAME = T.let(T.unsafe(nil), String)
|
110
|
+
|
111
|
+
# source://parse_packwerk//lib/parse_packwerk/constants.rb#6
|
112
|
+
ParsePackwerk::PACKWERK_YML_NAME = T.let(T.unsafe(nil), String)
|
113
|
+
|
114
|
+
# source://parse_packwerk//lib/parse_packwerk/constants.rb#11
|
115
|
+
ParsePackwerk::PRIVACY_VIOLATION_TYPE = T.let(T.unsafe(nil), String)
|
116
|
+
|
117
|
+
# source://parse_packwerk//lib/parse_packwerk/constants.rb#12
|
118
|
+
ParsePackwerk::PUBLIC_PATH = T.let(T.unsafe(nil), String)
|
119
|
+
|
120
|
+
# source://parse_packwerk//lib/parse_packwerk/package.rb#4
|
121
|
+
class ParsePackwerk::Package < ::T::Struct
|
122
|
+
const :name, ::String
|
123
|
+
const :enforce_dependencies, T::Boolean
|
124
|
+
const :enforce_privacy, T::Boolean
|
125
|
+
const :public_path, ::String, default: T.unsafe(nil)
|
126
|
+
const :metadata, T::Hash[T.untyped, T.untyped]
|
127
|
+
const :dependencies, T::Array[::String]
|
128
|
+
|
129
|
+
# source://parse_packwerk//lib/parse_packwerk/package.rb#35
|
130
|
+
sig { returns(::Pathname) }
|
131
|
+
def directory; end
|
132
|
+
|
133
|
+
# source://parse_packwerk//lib/parse_packwerk/package.rb#45
|
134
|
+
sig { returns(T::Boolean) }
|
135
|
+
def enforces_dependencies?; end
|
136
|
+
|
137
|
+
# source://parse_packwerk//lib/parse_packwerk/package.rb#50
|
138
|
+
sig { returns(T::Boolean) }
|
139
|
+
def enforces_privacy?; end
|
140
|
+
|
141
|
+
# source://parse_packwerk//lib/parse_packwerk/package.rb#40
|
142
|
+
sig { returns(::Pathname) }
|
143
|
+
def public_directory; end
|
144
|
+
|
145
|
+
# source://parse_packwerk//lib/parse_packwerk/package.rb#55
|
146
|
+
sig { returns(T::Array[::ParsePackwerk::Violation]) }
|
147
|
+
def violations; end
|
148
|
+
|
149
|
+
# source://parse_packwerk//lib/parse_packwerk/package.rb#30
|
150
|
+
sig { returns(::Pathname) }
|
151
|
+
def yml; end
|
152
|
+
|
153
|
+
class << self
|
154
|
+
# source://parse_packwerk//lib/parse_packwerk/package.rb#15
|
155
|
+
sig { params(pathname: ::Pathname).returns(::ParsePackwerk::Package) }
|
156
|
+
def from(pathname); end
|
157
|
+
|
158
|
+
# source://sorbet-runtime/0.5.10588/lib/types/struct.rb#13
|
159
|
+
def inherited(s); end
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
# source://parse_packwerk//lib/parse_packwerk/package_set.rb#8
|
164
|
+
class ParsePackwerk::PackageSet
|
165
|
+
class << self
|
166
|
+
# source://parse_packwerk//lib/parse_packwerk/package_set.rb#12
|
167
|
+
sig do
|
168
|
+
params(
|
169
|
+
package_pathspec: T::Array[::String],
|
170
|
+
exclude_pathspec: T::Array[::String]
|
171
|
+
).returns(T::Array[::ParsePackwerk::Package])
|
172
|
+
end
|
173
|
+
def from(package_pathspec:, exclude_pathspec:); end
|
174
|
+
|
175
|
+
private
|
176
|
+
|
177
|
+
# source://parse_packwerk//lib/parse_packwerk/package_set.rb#28
|
178
|
+
sig { params(globs: T::Array[::String], path: ::Pathname).returns(T::Boolean) }
|
179
|
+
def exclude_path?(globs, path); end
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
# source://parse_packwerk//lib/parse_packwerk/package_todo.rb#4
|
184
|
+
class ParsePackwerk::PackageTodo < ::T::Struct
|
185
|
+
const :pathname, ::Pathname
|
186
|
+
const :violations, T::Array[::ParsePackwerk::Violation]
|
187
|
+
|
188
|
+
class << self
|
189
|
+
# source://parse_packwerk//lib/parse_packwerk/package_todo.rb#11
|
190
|
+
sig { params(package: ::ParsePackwerk::Package).returns(::ParsePackwerk::PackageTodo) }
|
191
|
+
def for(package); end
|
192
|
+
|
193
|
+
# source://parse_packwerk//lib/parse_packwerk/package_todo.rb#17
|
194
|
+
sig { params(pathname: ::Pathname).returns(::ParsePackwerk::PackageTodo) }
|
195
|
+
def from(pathname); end
|
196
|
+
|
197
|
+
# source://sorbet-runtime/0.5.10588/lib/types/struct.rb#13
|
198
|
+
def inherited(s); end
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
# source://parse_packwerk//lib/parse_packwerk/constants.rb#4
|
203
|
+
ParsePackwerk::ROOT_PACKAGE_NAME = T.let(T.unsafe(nil), String)
|
204
|
+
|
205
|
+
# source://parse_packwerk//lib/parse_packwerk/violation.rb#4
|
206
|
+
class ParsePackwerk::Violation < ::T::Struct
|
207
|
+
const :type, ::String
|
208
|
+
const :to_package_name, ::String
|
209
|
+
const :class_name, ::String
|
210
|
+
const :files, T::Array[::String]
|
211
|
+
|
212
|
+
# source://parse_packwerk//lib/parse_packwerk/violation.rb#13
|
213
|
+
sig { returns(T::Boolean) }
|
214
|
+
def dependency?; end
|
215
|
+
|
216
|
+
# source://parse_packwerk//lib/parse_packwerk/violation.rb#18
|
217
|
+
sig { returns(T::Boolean) }
|
218
|
+
def privacy?; end
|
219
|
+
|
220
|
+
class << self
|
221
|
+
# source://sorbet-runtime/0.5.10588/lib/types/struct.rb#13
|
222
|
+
def inherited(s); end
|
223
|
+
end
|
224
|
+
end
|
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.
|
4
|
+
version: 0.10.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-
|
11
|
+
date: 2022-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: code_ownership
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: parse_packwerk
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -204,11 +204,10 @@ files:
|
|
204
204
|
- lib/danger-packwerk/basic_reference_offense.rb
|
205
205
|
- lib/danger-packwerk/check/default_formatter.rb
|
206
206
|
- lib/danger-packwerk/check/offenses_formatter.rb
|
207
|
-
- lib/danger-packwerk/
|
207
|
+
- lib/danger-packwerk/danger_package_todo_yml_changes.rb
|
208
208
|
- lib/danger-packwerk/danger_packwerk.rb
|
209
209
|
- lib/danger-packwerk/packwerk_wrapper.rb
|
210
210
|
- lib/danger-packwerk/private.rb
|
211
|
-
- lib/danger-packwerk/private/deprecated_references.rb
|
212
211
|
- lib/danger-packwerk/private/ownership_information.rb
|
213
212
|
- lib/danger-packwerk/update/default_formatter.rb
|
214
213
|
- lib/danger-packwerk/update/offenses_formatter.rb
|
@@ -261,9 +260,9 @@ files:
|
|
261
260
|
- sorbet/rbi/gems/nokogiri@1.13.8.rbi
|
262
261
|
- sorbet/rbi/gems/octokit@5.6.1.rbi
|
263
262
|
- sorbet/rbi/gems/open4@1.3.4.rbi
|
264
|
-
- sorbet/rbi/gems/packwerk@2.2.1.rbi
|
263
|
+
- sorbet/rbi/gems/packwerk@2.2.1-7e8e7a50705833b41fe40c201eadb85ff9a1a422.rbi
|
265
264
|
- sorbet/rbi/gems/parallel@1.22.1.rbi
|
266
|
-
- sorbet/rbi/gems/parse_packwerk@0.
|
265
|
+
- sorbet/rbi/gems/parse_packwerk@0.16.0.rbi
|
267
266
|
- sorbet/rbi/gems/parser@3.1.2.1.rbi
|
268
267
|
- sorbet/rbi/gems/pry@0.14.1.rbi
|
269
268
|
- sorbet/rbi/gems/public_suffix@5.0.0.rbi
|
@@ -1,65 +0,0 @@
|
|
1
|
-
# typed: strict
|
2
|
-
|
3
|
-
module DangerPackwerk
|
4
|
-
module Private
|
5
|
-
#
|
6
|
-
# The `Violation` and `DeprecatedReferences` classes come from Gusto's private `ParsePackwerk` gem.
|
7
|
-
# Until we decide to open source that gem, we inline these as a private implementation detail of `DangerPackwerk` for now.
|
8
|
-
#
|
9
|
-
class Violation < T::Struct
|
10
|
-
extend T::Sig
|
11
|
-
|
12
|
-
const :type, String
|
13
|
-
const :to_package_name, String
|
14
|
-
const :class_name, String
|
15
|
-
const :files, T::Array[String]
|
16
|
-
|
17
|
-
sig { returns(T::Boolean) }
|
18
|
-
def dependency?
|
19
|
-
type == 'dependency'
|
20
|
-
end
|
21
|
-
|
22
|
-
sig { returns(T::Boolean) }
|
23
|
-
def privacy?
|
24
|
-
type == 'privacy'
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
class DeprecatedReferences < T::Struct
|
29
|
-
extend T::Sig
|
30
|
-
|
31
|
-
const :pathname, Pathname
|
32
|
-
const :violations, T::Array[Violation]
|
33
|
-
|
34
|
-
sig { params(pathname: Pathname).returns(DeprecatedReferences) }
|
35
|
-
def self.from(pathname)
|
36
|
-
if pathname.exist?
|
37
|
-
deprecated_references_loaded_yml = YAML.load_file(pathname)
|
38
|
-
|
39
|
-
all_violations = []
|
40
|
-
deprecated_references_loaded_yml&.each_key do |to_package_name|
|
41
|
-
deprecated_references_per_package = deprecated_references_loaded_yml[to_package_name]
|
42
|
-
deprecated_references_per_package.each_key do |class_name|
|
43
|
-
symbol_usage = deprecated_references_per_package[class_name]
|
44
|
-
files = symbol_usage['files']
|
45
|
-
violations = symbol_usage['violations']
|
46
|
-
all_violations << Violation.new(type: 'dependency', to_package_name: to_package_name, class_name: class_name, files: files) if violations.include? 'dependency'
|
47
|
-
|
48
|
-
all_violations << Violation.new(type: 'privacy', to_package_name: to_package_name, class_name: class_name, files: files) if violations.include? 'privacy'
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
new(
|
53
|
-
pathname: pathname.cleanpath,
|
54
|
-
violations: all_violations
|
55
|
-
)
|
56
|
-
else
|
57
|
-
new(
|
58
|
-
pathname: pathname.cleanpath,
|
59
|
-
violations: []
|
60
|
-
)
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
@@ -1,146 +0,0 @@
|
|
1
|
-
# typed: true
|
2
|
-
|
3
|
-
# DO NOT EDIT MANUALLY
|
4
|
-
# This is an autogenerated file for types exported from the `parse_packwerk` gem.
|
5
|
-
# Please instead update this file by running `bin/tapioca gem parse_packwerk`.
|
6
|
-
|
7
|
-
module ParsePackwerk
|
8
|
-
class << self
|
9
|
-
sig { returns(T::Array[::ParsePackwerk::Package]) }
|
10
|
-
def all; end
|
11
|
-
|
12
|
-
sig { void }
|
13
|
-
def bust_cache!; end
|
14
|
-
|
15
|
-
sig { params(name: ::String).returns(T.nilable(::ParsePackwerk::Package)) }
|
16
|
-
def find(name); end
|
17
|
-
|
18
|
-
sig { params(file_path: T.any(::Pathname, ::String)).returns(::ParsePackwerk::Package) }
|
19
|
-
def package_from_path(file_path); end
|
20
|
-
|
21
|
-
sig { params(package: ::ParsePackwerk::Package).void }
|
22
|
-
def write_package_yml!(package); end
|
23
|
-
|
24
|
-
sig { returns(::ParsePackwerk::Configuration) }
|
25
|
-
def yml; end
|
26
|
-
|
27
|
-
private
|
28
|
-
|
29
|
-
sig { returns(T::Hash[::String, ::ParsePackwerk::Package]) }
|
30
|
-
def packages_by_name; end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
class ParsePackwerk::Configuration < ::T::Struct
|
35
|
-
const :exclude, T::Array[::String]
|
36
|
-
const :package_paths, T::Array[::String]
|
37
|
-
|
38
|
-
class << self
|
39
|
-
sig { params(config_hash: T::Hash[T.untyped, T.untyped]).returns(T::Array[::String]) }
|
40
|
-
def excludes(config_hash); end
|
41
|
-
|
42
|
-
sig { returns(::ParsePackwerk::Configuration) }
|
43
|
-
def fetch; end
|
44
|
-
|
45
|
-
def inherited(s); end
|
46
|
-
|
47
|
-
sig { params(config_hash: T::Hash[T.untyped, T.untyped]).returns(T::Array[::String]) }
|
48
|
-
def package_paths(config_hash); end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
ParsePackwerk::DEFAULT_EXCLUDE_GLOBS = T.let(T.unsafe(nil), Array)
|
53
|
-
ParsePackwerk::DEFAULT_PACKAGE_PATHS = T.let(T.unsafe(nil), Array)
|
54
|
-
ParsePackwerk::DEPENDENCIES = T.let(T.unsafe(nil), String)
|
55
|
-
ParsePackwerk::DEPRECATED_REFERENCES_YML_NAME = T.let(T.unsafe(nil), String)
|
56
|
-
|
57
|
-
class ParsePackwerk::DeprecatedReferences < ::T::Struct
|
58
|
-
const :pathname, ::Pathname
|
59
|
-
const :violations, T::Array[::ParsePackwerk::Violation]
|
60
|
-
|
61
|
-
class << self
|
62
|
-
sig { params(package: ::ParsePackwerk::Package).returns(::ParsePackwerk::DeprecatedReferences) }
|
63
|
-
def for(package); end
|
64
|
-
|
65
|
-
sig { params(pathname: ::Pathname).returns(::ParsePackwerk::DeprecatedReferences) }
|
66
|
-
def from(pathname); end
|
67
|
-
|
68
|
-
def inherited(s); end
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
ParsePackwerk::ENFORCE_DEPENDENCIES = T.let(T.unsafe(nil), String)
|
73
|
-
ParsePackwerk::ENFORCE_PRIVACY = T.let(T.unsafe(nil), String)
|
74
|
-
ParsePackwerk::METADATA = T.let(T.unsafe(nil), String)
|
75
|
-
ParsePackwerk::MetadataYmlType = T.type_alias { T::Hash[T.untyped, T.untyped] }
|
76
|
-
|
77
|
-
class ParsePackwerk::MissingConfiguration < ::StandardError
|
78
|
-
sig { params(packwerk_file_name: ::Pathname).void }
|
79
|
-
def initialize(packwerk_file_name); end
|
80
|
-
end
|
81
|
-
|
82
|
-
ParsePackwerk::PACKAGE_YML_NAME = T.let(T.unsafe(nil), String)
|
83
|
-
ParsePackwerk::PACKWERK_YML_NAME = T.let(T.unsafe(nil), String)
|
84
|
-
|
85
|
-
class ParsePackwerk::Package < ::T::Struct
|
86
|
-
const :dependencies, T::Array[::String]
|
87
|
-
const :enforce_dependencies, T::Boolean
|
88
|
-
const :enforce_privacy, T::Boolean
|
89
|
-
const :metadata, T::Hash[T.untyped, T.untyped]
|
90
|
-
const :name, ::String
|
91
|
-
|
92
|
-
sig { returns(::Pathname) }
|
93
|
-
def directory; end
|
94
|
-
|
95
|
-
sig { returns(T::Boolean) }
|
96
|
-
def enforces_dependencies?; end
|
97
|
-
|
98
|
-
sig { returns(T::Boolean) }
|
99
|
-
def enforces_privacy?; end
|
100
|
-
|
101
|
-
sig { returns(::Pathname) }
|
102
|
-
def yml; end
|
103
|
-
|
104
|
-
class << self
|
105
|
-
sig { params(pathname: ::Pathname).returns(::ParsePackwerk::Package) }
|
106
|
-
def from(pathname); end
|
107
|
-
|
108
|
-
def inherited(s); end
|
109
|
-
end
|
110
|
-
end
|
111
|
-
|
112
|
-
class ParsePackwerk::PackageSet
|
113
|
-
class << self
|
114
|
-
sig do
|
115
|
-
params(
|
116
|
-
package_pathspec: T::Array[::String],
|
117
|
-
exclude_pathspec: T::Array[::String]
|
118
|
-
).returns(T::Array[::ParsePackwerk::Package])
|
119
|
-
end
|
120
|
-
def from(package_pathspec:, exclude_pathspec:); end
|
121
|
-
|
122
|
-
private
|
123
|
-
|
124
|
-
sig { params(globs: T::Array[::String], path: ::Pathname).returns(T::Boolean) }
|
125
|
-
def exclude_path?(globs, path); end
|
126
|
-
end
|
127
|
-
end
|
128
|
-
|
129
|
-
ParsePackwerk::ROOT_PACKAGE_NAME = T.let(T.unsafe(nil), String)
|
130
|
-
|
131
|
-
class ParsePackwerk::Violation < ::T::Struct
|
132
|
-
const :class_name, ::String
|
133
|
-
const :files, T::Array[::String]
|
134
|
-
const :to_package_name, ::String
|
135
|
-
const :type, ::String
|
136
|
-
|
137
|
-
sig { returns(T::Boolean) }
|
138
|
-
def dependency?; end
|
139
|
-
|
140
|
-
sig { returns(T::Boolean) }
|
141
|
-
def privacy?; end
|
142
|
-
|
143
|
-
class << self
|
144
|
-
def inherited(s); end
|
145
|
-
end
|
146
|
-
end
|