declapract-typescript-ehmpathy 0.49.8 → 0.49.9
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/dist/practices/cicd-app-react-native-expo/best-practice/.declapract.readme.md +27 -0
- package/dist/practices/cicd-app-react-native-expo/best-practice/.gitignore.declapract.ts +18 -11
- package/dist/practices/git/.declapract.integration.test.ts +950 -0
- package/dist/practices/git/.test/assets/repo-with-rhachet-only/declapract.use.yml +6 -0
- package/dist/practices/git/.test/assets/repo-with-rhachet-only/package.json +4 -0
- package/dist/practices/git/.test/assets/repo-without-cache-ignores/declapract.use.yml +9 -0
- package/dist/practices/git/.test/assets/repo-without-cache-ignores/package.json +4 -0
- package/dist/practices/git/__snapshots__/.declapract.integration.test.ts.snap +51 -0
- package/dist/practices/git/best-practice/.declapract.readme.md +23 -0
- package/dist/practices/git/best-practice/.gitignore.declapract.ts +59 -33
- package/dist/practices/rhachet/best-practice/.declapract.readme.md +32 -0
- package/dist/practices/rhachet/best-practice/.gitignore.declapract.ts +64 -0
- package/dist/utils/defineExpectedGitignoreContents.ts +84 -0
- package/package.json +7 -7
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
the cicd workflows and gitignore for an expo app
|
|
2
|
+
|
|
3
|
+
this practice declares `android/` and `ios/` — the build output `expo prebuild` emits, which is
|
|
4
|
+
scratch in a managed-workflow repo.
|
|
5
|
+
|
|
6
|
+
📖 several practices declare this same `.gitignore`. the contract they share — one shared
|
|
7
|
+
algorithm, the ordered tail, what a new declarer owes — is stated once at
|
|
8
|
+
`.agent/repo=.this/role=any/briefs/howto.declare-the-repo-gitignore.md`. read that before you add
|
|
9
|
+
a line here.
|
|
10
|
+
|
|
11
|
+
## this declaration once went stale, and that is why it imports
|
|
12
|
+
|
|
13
|
+
it was authored 2024-09-11, cloned from the `git` practice's shape at the time. `git` gained its
|
|
14
|
+
ordered tail in #404 on 2026-01-31, and this copy never caught up — so it sorted every line,
|
|
15
|
+
which hoisted the `!` negations above their target and turned them inert.
|
|
16
|
+
|
|
17
|
+
fixed 2026-07-30 (#537) by an import of the shared algorithm rather than a re-derivation.
|
|
18
|
+
consumers saw no content change: an expo repo already received the ordered tail from `git`; what
|
|
19
|
+
changed is that this practice no longer hoists it.
|
|
20
|
+
|
|
21
|
+
the clamp is `.gitignore.declapract.test.ts` → `convergence with the git practice`, which asserts
|
|
22
|
+
both checks pass once both have run, that the settled file is a fixed point under either, and
|
|
23
|
+
that the negations stay below `node_modules`.
|
|
24
|
+
|
|
25
|
+
⚠️ its declared set is **disjoint** from git's, so neither practice's output alone satisfies the
|
|
26
|
+
other's check — both must run. this differs from `rhachet`, whose one line is a subset of git's.
|
|
27
|
+
do not copy an assertion between those two suites without that check.
|
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
import type { FileCheckFunction, FileFixFunction } from 'declapract';
|
|
2
|
-
import { dedupe } from 'domain-objects';
|
|
3
2
|
import expect from 'expect';
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
import { defineExpectedGitignoreContents } from '../../../utils/defineExpectedGitignoreContents';
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
/**
|
|
7
|
+
* .what = the ignores this practice declares — the build output an expo app emits
|
|
8
|
+
* .why = `android/` and `ios/` are generated by `expo prebuild`, so they are scratch
|
|
9
|
+
* in a managed-workflow repo.
|
|
10
|
+
* .note = this list is NOT sorted here, and that is deliberate.
|
|
11
|
+
* `defineExpectedGitignoreContents` sorts the union of these lines with the
|
|
12
|
+
* repo's own, so a `.sort()` at this site would be a second sort that changes
|
|
13
|
+
* no output -- while it mutates a module-cached array in place. `readonly`
|
|
14
|
+
* forbids that mutation outright.
|
|
15
|
+
*/
|
|
16
|
+
const ignoresSortable: readonly string[] = ['android/', 'ios/'];
|
|
14
17
|
|
|
15
18
|
export const check: FileCheckFunction = (contents) => {
|
|
16
|
-
expect(contents).toEqual(
|
|
19
|
+
expect(contents).toEqual(
|
|
20
|
+
defineExpectedGitignoreContents({ contents, ignoresSortable }),
|
|
21
|
+
);
|
|
17
22
|
};
|
|
18
23
|
|
|
19
24
|
export const fix: FileFixFunction = (contents) => {
|
|
20
|
-
return {
|
|
25
|
+
return {
|
|
26
|
+
contents: defineExpectedGitignoreContents({ contents, ignoresSortable }),
|
|
27
|
+
};
|
|
21
28
|
};
|