micro-contracts 0.18.13 → 0.18.15
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.
- package/cli-contract.yaml +1 -1
- package/dist/guardrails/allowlist.d.ts +1 -1
- package/dist/guardrails/allowlist.d.ts.map +1 -1
- package/dist/guardrails/allowlist.js +46 -5
- package/dist/guardrails/allowlist.js.map +1 -1
- package/dist/guardrails/config.d.ts.map +1 -1
- package/dist/guardrails/config.js +9 -2
- package/dist/guardrails/config.js.map +1 -1
- package/dist/micro-contracts.bundle.mjs +273 -270
- package/dist/micro-contracts.bundle.mjs.map +3 -3
- package/docs/development-guardrails.md +12 -4
- package/package.json +1 -1
|
@@ -146,9 +146,13 @@ Prevents unauthorized edits to protected/generated areas.
|
|
|
146
146
|
|-------|------|-------------|---------------|--------|
|
|
147
147
|
| Allowlist | built-in | Block **direct** edits to `packages/**`, `*.generated.*`; require approval for `.github/**` | `micro-contracts check --only allowlist` | `allowlist` |
|
|
148
148
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
On a pull request the check inspects what that pull request adds to its base branch,
|
|
150
|
+
which the runner names in `GITHUB_BASE_REF`. A CI checkout has nothing uncommitted, so
|
|
151
|
+
asking it what changed locally reads no file at all. In a working copy the check
|
|
152
|
+
inspects everything not yet committed — staged, unstaged and untracked alike.
|
|
153
|
+
`--changed-files` supplies the list instead. The check fails rather than reporting no
|
|
154
|
+
changes when it cannot ask git at all, and when the base branch is absent from the
|
|
155
|
+
checkout — clone with `fetch-depth: 0`.
|
|
152
156
|
|
|
153
157
|
Files are categorized into three groups:
|
|
154
158
|
|
|
@@ -289,8 +293,12 @@ allowed:
|
|
|
289
293
|
- "!server/src/_shared/overlays/**"
|
|
290
294
|
|
|
291
295
|
# Configuration
|
|
296
|
+
# The example is three npm projects (this one, server/, frontend/) and CI installs all
|
|
297
|
+
# three. A dependency change moves a manifest and its lock together, so allowing one
|
|
298
|
+
# without the other describes a change nobody can make.
|
|
292
299
|
- micro-contracts.config.yaml
|
|
293
|
-
- package.json
|
|
300
|
+
- "**/package.json"
|
|
301
|
+
- "**/package-lock.json"
|
|
294
302
|
- tsconfig.json
|
|
295
303
|
|
|
296
304
|
# Documentation
|
package/package.json
CHANGED