use_packs 0.0.8 → 0.0.9

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: 9f4d2716d6ddbe2700f63d6fcdd24abc1915b2663033c578b8bb23fffb638d3e
4
- data.tar.gz: 44e32f0b8633d099f705d8c0e6a84797bebc7bcd8e96cee82202708095e3dd15
3
+ metadata.gz: 5c6107646aeefea9f36c1605941ca7f4bd5b73514d08e3e7c828584427db2cf0
4
+ data.tar.gz: 901f73b8370a22a61ee8c216b0248eb9e4a88085a50b768aaba2b45eb4db7892
5
5
  SHA512:
6
- metadata.gz: 8ad1668018fdca64f093167e4b698274892b10ddd499a1a687e6f06f8e2736f57d07e7d0ade1a31c5bef40b2f55420a6b0de8baa0911226e2009552112a8a13a
7
- data.tar.gz: 35578fbadc8ec8ef526cdede3a33486e83317afbc04ce9903332b62ee9e69042b49ec71a5339a1dab0c5386d40b4cf7d43a9fbf3c4c8f631ee10fb1cd8762e7f
6
+ metadata.gz: 1ad56e7dff3af526050c1fe5396d09e4d23a52ef13e3f24be9b74ba6e6cdf327453e3368b5fbf4b1312868f796093fa33fb4aef87b36437d6c9f1d51400ad541
7
+ data.tar.gz: d67586764b67237a249b5722ad89c56d45af1e8ee4a23218ca115eccf708740c854b79ab81414298a65ffa35e760f8b1c35939de010fc783a44d52748fe345c1
@@ -8,13 +8,6 @@ module UsePacks
8
8
  module PackwerkWrapper
9
9
  extend T::Sig
10
10
 
11
- sig { params(argv: T.untyped, formatter: Packwerk::OffensesFormatter).void }
12
- def self.packwerk_cli_run_safely(argv, formatter)
13
- with_safe_exit_if_no_files_found do
14
- packwerk_cli(formatter).run(argv)
15
- end
16
- end
17
-
18
11
  #
19
12
  # execute_command is like `run` except it does not `exit`
20
13
  #
@@ -53,6 +46,12 @@ module UsePacks
53
46
  formatter.aggregated_offenses.compact
54
47
  end
55
48
 
49
+ sig { void }
50
+ def self.validate!
51
+ formatter = OffensesAggregatorFormatter.new
52
+ packwerk_cli_execute_safely(['validate'], formatter)
53
+ end
54
+
56
55
  sig { params(files: T::Array[String]).returns(T::Array[Packwerk::ReferenceOffense]) }
57
56
  def self.get_offenses_for_files_by_package(files)
58
57
  packages = package_names_for_files(files)
@@ -292,6 +292,7 @@ module UsePacks
292
292
  metadata: package.metadata
293
293
  )
294
294
  ParsePackwerk.write_package_yml!(new_package)
295
+ PackwerkWrapper.validate!
295
296
  end
296
297
 
297
298
  sig { params(file_move_operation: FileMoveOperation, per_file_processors: T::Array[UsePacks::PerFileProcessorInterface]).void }
@@ -83,9 +83,7 @@ module UsePacks
83
83
  <<~MSG
84
84
  Your next steps might be:
85
85
 
86
- 1) Run `bin/packwerk validate` to ensure you haven't introduced a cyclic dependency
87
-
88
- 2) Run `bin/packwerk update-todo` to update the violations.
86
+ 1) Run `bin/packwerk update-todo` to update the violations.
89
87
  MSG
90
88
  end
91
89
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: use_packs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
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-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: code_ownership