Skip to content

Commit 78808ef

Browse files
authored
Migrate privacy documentation from packwerk (#24)
1 parent a68389e commit 78808ef

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,15 @@
22

33
`packwerk-extensions` is a home for checker extensions for [packwerk](https://github.com/Shopify/packwerk) 3.
44

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-
105
Currently, it ships the following checkers to help improve the boundaries between packages. These checkers are:
116
- A `privacy` checker that ensures other packages are using your package's public API
127
- A `visibility` checker that allows packages to be private except to an explicit group of other packages.
138
- An experimental `architecture` checker that allows packages to specify their "layer" and requires that each layer only communicate with layers below it.
149

1510
## Installation
1611

12+
Add `packwerk-extensions` to your `Gemfile`.
13+
1714
To register all checkers included in this gem, add the following to your `packwerk.yml`:
1815

1916
```yaml
@@ -61,7 +58,7 @@ public_path: my/custom/path/
6158
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.
6259

6360
### Package Privacy violation
64-
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.
6562

6663
#### Interpreting Privacy violation
6764

0 commit comments

Comments
 (0)