packwerk-extensions 0.1.4 → 0.1.5

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: 43b45f3f9f067f3d9693ef9d51a39c0c5f50af96e11ddb5091a5cafdaa0dbb60
4
- data.tar.gz: 418c9911e1a3032d4b03c01af4876871b8d0420471927f9f3818f4d069a1e1c9
3
+ metadata.gz: 4f96f84e834641849b005e20027231c6baf405ac64d5f1c0ac8ae1915aa33fb8
4
+ data.tar.gz: ccaa5606cb9b40bcab5954ebb1e61450f72b14b2c2a40d67fbdf0b5145b52a29
5
5
  SHA512:
6
- metadata.gz: b9b9ce5577d448c8da70fc9acece7bf0ad789200a352874e3a48e2be15cb8bf7e0eeb25c9f74c3563f7a675f4afbc0843cc5ebb6a1c4d6bc35cdba1f0458d2cc
7
- data.tar.gz: 0e3c69059991de5039f312fbe099add8f2edb0ae9a79a439c4e4d22e626cccb44a57c02f3d33b8f590b5963b36965d0e2218f729996d0474563bd95841af86f8
6
+ metadata.gz: d8918928b822a0d5e229f550dec48e18faf056c93b7626c63d85a132f4fa0dcf3dc122f5dfefebf60bc807db4f184f170ba1c89afd36194ab0987b487ae1b5c9
7
+ data.tar.gz: 7dc8f0bf1b44412934321db1e54fb802535f2257b59adccd7194ca750230e46bc0f2bf8752f727c13f0d262c67c3441370a62d40bd16cd161bcc64773586c264
data/README.md CHANGED
@@ -2,11 +2,6 @@
2
2
 
3
3
  `packwerk-extensions` is a home for checker extensions for [packwerk](https://github.com/Shopify/packwerk) 3.
4
4
 
5
- Note that packwerk has not yet released packwerk 3. If you'd like to use `packwerk-extensions`, you'll need to point your `Gemfile` at the `packwerk` `main` branch:
6
- ```ruby
7
- gem 'packwerk', github: 'Shopify/packwerk', branch: 'main'
8
- ```
9
-
10
5
  Currently, it ships the following checkers to help improve the boundaries between packages. These checkers are:
11
6
  - A `privacy` checker that ensures other packages are using your package's public API
12
7
  - A `visibility` checker that allows packages to be private except to an explicit group of other packages.
@@ -14,10 +9,13 @@ Currently, it ships the following checkers to help improve the boundaries betwee
14
9
 
15
10
  ## Installation
16
11
 
12
+ Add `packwerk-extensions` to your `Gemfile`.
13
+
17
14
  To register all checkers included in this gem, add the following to your `packwerk.yml`:
18
15
 
19
16
  ```yaml
20
- require: packwerk-extensions
17
+ require:
18
+ - packwerk-extensions
21
19
  ```
22
20
 
23
21
  Alternatively, you can require individual checkers:
@@ -60,7 +58,7 @@ public_path: my/custom/path/
60
58
  Sometimes it is desirable to only enforce privacy on a subset of constants in a package. You can do so by defining a `private_constants` list in your package.yml. Note that `enforce_privacy` must be set to `true` or `'strict'` for this to work.
61
59
 
62
60
  ### Package Privacy violation
63
- A constant that is private to its package has been referenced from outside of the package. Constants are declared private in their package’s `package.yml`.
61
+ Packwerk thinks something is a privacy violation if you're referencing a constant, class, or module defined in the private implementation (i.e. not the public folder) of another package. We care about these because we want to make sure we only use parts of a package that have been exposed as public API.
64
62
 
65
63
  #### Interpreting Privacy violation
66
64
 
@@ -42,7 +42,8 @@ module Packwerk
42
42
  results = T.let([], T::Array[Result])
43
43
  resolver = ConstantResolver.new(
44
44
  root_path: configuration.root_path,
45
- load_paths: configuration.load_paths
45
+ load_paths: configuration.load_paths,
46
+ inflector: ActiveSupport::Inflector
46
47
  )
47
48
 
48
49
  private_constants_setting.each do |config_file_path, setting|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: packwerk-extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gusto Engineers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-02 00:00:00.000000000 Z
11
+ date: 2023-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: packwerk