packwerk 1.0.0 → 1.1.2
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/.github/pull_request_template.md +8 -7
- data/.github/workflows/ci.yml +1 -1
- data/.gitignore +1 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +5 -2
- data/README.md +5 -3
- data/TROUBLESHOOT.md +1 -1
- data/USAGE.md +56 -19
- data/exe/packwerk +1 -1
- data/lib/packwerk.rb +3 -3
- data/lib/packwerk/application_load_paths.rb +68 -0
- data/lib/packwerk/application_validator.rb +96 -70
- data/lib/packwerk/association_inspector.rb +50 -20
- data/lib/packwerk/cache_deprecated_references.rb +55 -0
- data/lib/packwerk/checker.rb +23 -0
- data/lib/packwerk/checking_deprecated_references.rb +5 -2
- data/lib/packwerk/cli.rb +65 -56
- data/lib/packwerk/commands/detect_stale_violations_command.rb +60 -0
- data/lib/packwerk/commands/offense_progress_marker.rb +24 -0
- data/lib/packwerk/commands/result.rb +13 -0
- data/lib/packwerk/commands/update_deprecations_command.rb +81 -0
- data/lib/packwerk/configuration.rb +6 -34
- data/lib/packwerk/const_node_inspector.rb +28 -17
- data/lib/packwerk/dependency_checker.rb +16 -5
- data/lib/packwerk/deprecated_references.rb +24 -1
- data/lib/packwerk/detect_stale_deprecated_references.rb +14 -0
- data/lib/packwerk/file_processor.rb +4 -4
- data/lib/packwerk/formatters/offenses_formatter.rb +48 -0
- data/lib/packwerk/formatters/progress_formatter.rb +6 -2
- data/lib/packwerk/generators/application_validation.rb +2 -2
- data/lib/packwerk/generators/templates/package.yml +4 -0
- data/lib/packwerk/generators/templates/packwerk +2 -2
- data/lib/packwerk/generators/templates/packwerk.yml.erb +1 -1
- data/lib/packwerk/inflector.rb +17 -8
- data/lib/packwerk/node.rb +78 -39
- data/lib/packwerk/node_processor.rb +14 -3
- data/lib/packwerk/node_processor_factory.rb +39 -0
- data/lib/packwerk/offense.rb +4 -6
- data/lib/packwerk/output_style.rb +20 -0
- data/lib/packwerk/output_styles/coloured.rb +29 -0
- data/lib/packwerk/output_styles/plain.rb +26 -0
- data/lib/packwerk/package.rb +8 -1
- data/lib/packwerk/package_set.rb +13 -5
- data/lib/packwerk/parsed_constant_definitions.rb +4 -4
- data/lib/packwerk/parsers/erb.rb +4 -0
- data/lib/packwerk/parsers/factory.rb +10 -1
- data/lib/packwerk/privacy_checker.rb +26 -5
- data/lib/packwerk/run_context.rb +70 -46
- data/lib/packwerk/sanity_checker.rb +1 -1
- data/lib/packwerk/spring_command.rb +1 -1
- data/lib/packwerk/updating_deprecated_references.rb +2 -39
- data/lib/packwerk/version.rb +1 -1
- data/packwerk.gemspec +2 -2
- metadata +15 -8
- data/lib/packwerk/output_styles.rb +0 -41
- data/static/packwerk-check-demo.png +0 -0
- data/static/packwerk_check.gif +0 -0
- data/static/packwerk_check_violation.gif +0 -0
- data/static/packwerk_update.gif +0 -0
- data/static/packwerk_validate.gif +0 -0
data/lib/packwerk/version.rb
CHANGED
data/packwerk.gemspec
CHANGED
@@ -33,8 +33,8 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.bindir = "exe"
|
34
34
|
spec.executables << "packwerk"
|
35
35
|
|
36
|
-
spec.files = Dir.chdir(
|
37
|
-
%x(git ls-files -z).split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
36
|
+
spec.files = Dir.chdir(__dir__) do
|
37
|
+
%x(git ls-files -z).split("\x0").reject { |f| f.match(%r{^(test|spec|features|static)/}) }
|
38
38
|
end
|
39
39
|
spec.require_paths = %w(lib)
|
40
40
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: packwerk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -183,18 +183,27 @@ files:
|
|
183
183
|
- docs/cohesion.png
|
184
184
|
- exe/packwerk
|
185
185
|
- lib/packwerk.rb
|
186
|
+
- lib/packwerk/application_load_paths.rb
|
186
187
|
- lib/packwerk/application_validator.rb
|
187
188
|
- lib/packwerk/association_inspector.rb
|
189
|
+
- lib/packwerk/cache_deprecated_references.rb
|
190
|
+
- lib/packwerk/checker.rb
|
188
191
|
- lib/packwerk/checking_deprecated_references.rb
|
189
192
|
- lib/packwerk/cli.rb
|
193
|
+
- lib/packwerk/commands/detect_stale_violations_command.rb
|
194
|
+
- lib/packwerk/commands/offense_progress_marker.rb
|
195
|
+
- lib/packwerk/commands/result.rb
|
196
|
+
- lib/packwerk/commands/update_deprecations_command.rb
|
190
197
|
- lib/packwerk/configuration.rb
|
191
198
|
- lib/packwerk/const_node_inspector.rb
|
192
199
|
- lib/packwerk/constant_discovery.rb
|
193
200
|
- lib/packwerk/constant_name_inspector.rb
|
194
201
|
- lib/packwerk/dependency_checker.rb
|
195
202
|
- lib/packwerk/deprecated_references.rb
|
203
|
+
- lib/packwerk/detect_stale_deprecated_references.rb
|
196
204
|
- lib/packwerk/file_processor.rb
|
197
205
|
- lib/packwerk/files_for_processing.rb
|
206
|
+
- lib/packwerk/formatters/offenses_formatter.rb
|
198
207
|
- lib/packwerk/formatters/progress_formatter.rb
|
199
208
|
- lib/packwerk/generators/application_validation.rb
|
200
209
|
- lib/packwerk/generators/configuration_file.rb
|
@@ -211,9 +220,12 @@ files:
|
|
211
220
|
- lib/packwerk/inflector.rb
|
212
221
|
- lib/packwerk/node.rb
|
213
222
|
- lib/packwerk/node_processor.rb
|
223
|
+
- lib/packwerk/node_processor_factory.rb
|
214
224
|
- lib/packwerk/node_visitor.rb
|
215
225
|
- lib/packwerk/offense.rb
|
216
|
-
- lib/packwerk/
|
226
|
+
- lib/packwerk/output_style.rb
|
227
|
+
- lib/packwerk/output_styles/coloured.rb
|
228
|
+
- lib/packwerk/output_styles/plain.rb
|
217
229
|
- lib/packwerk/package.rb
|
218
230
|
- lib/packwerk/package_set.rb
|
219
231
|
- lib/packwerk/parsed_constant_definitions.rb
|
@@ -306,11 +318,6 @@ files:
|
|
306
318
|
- sorbet/rbi/gems/websocket-extensions@0.1.4.rbi
|
307
319
|
- sorbet/rbi/gems/zeitwerk@2.3.0.rbi
|
308
320
|
- sorbet/tapioca/require.rb
|
309
|
-
- static/packwerk-check-demo.png
|
310
|
-
- static/packwerk_check.gif
|
311
|
-
- static/packwerk_check_violation.gif
|
312
|
-
- static/packwerk_update.gif
|
313
|
-
- static/packwerk_validate.gif
|
314
321
|
homepage: https://github.com/Shopify/packwerk
|
315
322
|
licenses:
|
316
323
|
- MIT
|
@@ -1,41 +0,0 @@
|
|
1
|
-
# typed: true
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
module Packwerk
|
5
|
-
module OutputStyles
|
6
|
-
class Plain
|
7
|
-
class << self
|
8
|
-
def reset
|
9
|
-
""
|
10
|
-
end
|
11
|
-
|
12
|
-
def filename
|
13
|
-
""
|
14
|
-
end
|
15
|
-
|
16
|
-
def error
|
17
|
-
""
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
# See https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit for ANSI escape colour codes
|
23
|
-
class Coloured
|
24
|
-
class << self
|
25
|
-
def reset
|
26
|
-
"\033[m"
|
27
|
-
end
|
28
|
-
|
29
|
-
def filename
|
30
|
-
# 36 is foreground cyan
|
31
|
-
"\033[36m"
|
32
|
-
end
|
33
|
-
|
34
|
-
def error
|
35
|
-
# 31 is foreground red
|
36
|
-
"\033[31m"
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
Binary file
|
data/static/packwerk_check.gif
DELETED
Binary file
|
Binary file
|
data/static/packwerk_update.gif
DELETED
Binary file
|
Binary file
|