@savvy-web/silk-core 0.5.1 → 0.5.3
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/index.d.ts +13 -10
- package/package.json +4 -4
- package/schemas/SavvyOkfSection.js +16 -12
- package/tsdoc-metadata.json +1 -1
package/index.d.ts
CHANGED
|
@@ -945,16 +945,19 @@ export declare const SavvyOkfSection: SectionId;
|
|
|
945
945
|
* land it silently. `--staged` re-adds whatever it writes, so the hook needs no
|
|
946
946
|
* `git add` of its own.
|
|
947
947
|
*
|
|
948
|
-
* The default `--staged` modes are `generated` and `
|
|
949
|
-
* `index.md` files
|
|
950
|
-
*
|
|
951
|
-
*
|
|
952
|
-
*
|
|
953
|
-
*
|
|
954
|
-
*
|
|
955
|
-
*
|
|
956
|
-
*
|
|
957
|
-
*
|
|
948
|
+
* The default `--staged` modes are `generated`, `index` and `log`: the
|
|
949
|
+
* `generated.at` stamps, the derived `index.md` files and the commit's own
|
|
950
|
+
* `log.md` entry (dated to the commit and derived from the git index) all land
|
|
951
|
+
* in the same commit. Index mode, however, reads concepts from DISK, not from
|
|
952
|
+
* the git index, and `--staged` re-adds what it writes, so an untracked or
|
|
953
|
+
* partially staged concept would otherwise let an unrelated commit land an
|
|
954
|
+
* `index.md` entry linking a file that commit does not contain. When
|
|
955
|
+
* `git status --porcelain -- okf` shows any unstaged or untracked entry (second
|
|
956
|
+
* status column non-blank), the hook narrows to `--only generated --only log`
|
|
957
|
+
* for that commit: it keeps `generated` and `log` and drops only `index`, which
|
|
958
|
+
* catches up on the next clean commit. Log mode is safe on a dirty bundle
|
|
959
|
+
* because it reads the git index, so it can only describe what the commit
|
|
960
|
+
* actually contains.
|
|
958
961
|
*
|
|
959
962
|
* @returns The sync shell, with no surrounding markers or trailing newline.
|
|
960
963
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@savvy-web/silk-core",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Platform-free domain core of the Silk Suite: schemas, tagged errors, and the PR-body contract",
|
|
6
6
|
"homepage": "https://github.com/savvy-web/systems/tree/main/packages/silk-core",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"./package.json": "./package.json"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@effected/github-references": "^0.
|
|
32
|
+
"@effected/github-references": "^0.12.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@effected/templates": "^0.
|
|
36
|
-
"@effected/workspaces": "^0.
|
|
35
|
+
"@effected/templates": "^0.15.0",
|
|
36
|
+
"@effected/workspaces": "^0.40.0",
|
|
37
37
|
"effect": "^4.0.0"
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -56,16 +56,19 @@ const SavvyOkfSection = SectionId.make({
|
|
|
56
56
|
* land it silently. `--staged` re-adds whatever it writes, so the hook needs no
|
|
57
57
|
* `git add` of its own.
|
|
58
58
|
*
|
|
59
|
-
* The default `--staged` modes are `generated` and `
|
|
60
|
-
* `index.md` files
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
59
|
+
* The default `--staged` modes are `generated`, `index` and `log`: the
|
|
60
|
+
* `generated.at` stamps, the derived `index.md` files and the commit's own
|
|
61
|
+
* `log.md` entry (dated to the commit and derived from the git index) all land
|
|
62
|
+
* in the same commit. Index mode, however, reads concepts from DISK, not from
|
|
63
|
+
* the git index, and `--staged` re-adds what it writes, so an untracked or
|
|
64
|
+
* partially staged concept would otherwise let an unrelated commit land an
|
|
65
|
+
* `index.md` entry linking a file that commit does not contain. When
|
|
66
|
+
* `git status --porcelain -- okf` shows any unstaged or untracked entry (second
|
|
67
|
+
* status column non-blank), the hook narrows to `--only generated --only log`
|
|
68
|
+
* for that commit: it keeps `generated` and `log` and drops only `index`, which
|
|
69
|
+
* catches up on the next clean commit. Log mode is safe on a dirty bundle
|
|
70
|
+
* because it reads the git index, so it can only describe what the commit
|
|
71
|
+
* actually contains.
|
|
69
72
|
*
|
|
70
73
|
* @returns The sync shell, with no surrounding markers or trailing newline.
|
|
71
74
|
*
|
|
@@ -75,9 +78,10 @@ const SavvyOkfSection = SectionId.make({
|
|
|
75
78
|
function savvyOkfSync() {
|
|
76
79
|
return `if ! in_ci && [ -d "$ROOT/okf" ] && [ -x "$ROOT/node_modules/.bin/okfit" ]; then
|
|
77
80
|
# Index mode reads concepts from disk, so skip it while okf/ carries untracked or
|
|
78
|
-
# unstaged work: a commit must never link a concept it does not contain.
|
|
81
|
+
# unstaged work: a commit must never link a concept it does not contain. Log mode
|
|
82
|
+
# reads the git index, so it stays on.
|
|
79
83
|
if git -C "$ROOT" status --porcelain --untracked-files=all -- okf | grep -q '^.[^ ]'; then
|
|
80
|
-
(cd "$ROOT" && pm_exec okfit sync --staged --only generated) || exit 1
|
|
84
|
+
(cd "$ROOT" && pm_exec okfit sync --staged --only generated --only log) || exit 1
|
|
81
85
|
else
|
|
82
86
|
(cd "$ROOT" && pm_exec okfit sync --staged) || exit 1
|
|
83
87
|
fi
|