@dialecte/cli 0.9.0 → 0.11.0
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/README.md +1 -1
- package/dist/cli.js +18711 -15283
- package/dist/lookups.d.ts +16 -16
- package/dist/lookups.js +115 -65
- package/dist/schemas/keep-decision.schema.json +29 -0
- package/package.json +3 -1
- package/templates/ci/.github/workflows/_type-perf.yml +17 -2
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "keep-decision.schema.json",
|
|
4
|
+
"title": "A line of keep.jsonl",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schema", "at", "op", "by", "reason"],
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema": {
|
|
10
|
+
"const": 1
|
|
11
|
+
},
|
|
12
|
+
"at": {
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
"op": {
|
|
16
|
+
"enum": ["keep", "unkeep"]
|
|
17
|
+
},
|
|
18
|
+
"by": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"minLength": 1,
|
|
21
|
+
"pattern": "\\S"
|
|
22
|
+
},
|
|
23
|
+
"reason": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"minLength": 1,
|
|
26
|
+
"pattern": "\\S"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dialecte/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Dialecte CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"jsonc-parser": "3.3.1",
|
|
48
|
+
"markdown-it": "15.0.3",
|
|
48
49
|
"oxfmt": "^0.75.0",
|
|
49
50
|
"yaml": "2.9.1"
|
|
50
51
|
},
|
|
@@ -166,6 +167,7 @@
|
|
|
166
167
|
"src/lib/gate/hook-gate.ts",
|
|
167
168
|
"src/lib/gate/hook-tdd.ts",
|
|
168
169
|
"src/lib/gate/hook-design.ts",
|
|
170
|
+
"src/lib/gate/hook-scope.ts",
|
|
169
171
|
"src/lib/tdd/check-tdd-receipts.ts"
|
|
170
172
|
]
|
|
171
173
|
},
|
|
@@ -12,6 +12,9 @@ jobs:
|
|
|
12
12
|
steps:
|
|
13
13
|
- name: Checkout
|
|
14
14
|
uses: actions/checkout@v6
|
|
15
|
+
# the merge commit and its parents: the bench measures the change against the base it goes onto
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 2
|
|
15
18
|
|
|
16
19
|
- name: Setup Node.js
|
|
17
20
|
uses: actions/setup-node@v6
|
|
@@ -27,8 +30,20 @@ jobs:
|
|
|
27
30
|
# the install job filled it: a miss stops here, never runs without the locked dependencies
|
|
28
31
|
fail-on-cache-miss: true
|
|
29
32
|
|
|
30
|
-
#
|
|
31
|
-
|
|
33
|
+
# the base the change goes onto: the queue's base (fetched), else the pull request merge ref's first parent; a
|
|
34
|
+
# dispatched run has no change to measure
|
|
35
|
+
- name: Fetch the base the change goes onto
|
|
36
|
+
if: github.event_name == 'merge_group'
|
|
37
|
+
env:
|
|
38
|
+
BASE: ${{ github.event.merge_group.base_sha }}
|
|
39
|
+
run: git fetch --depth=1 origin "$BASE"
|
|
40
|
+
|
|
41
|
+
# fails when the change grows a type instantiation count past 5% of its base and its changelog fragment does not
|
|
42
|
+
# explain it ("- Type cost: <why>"); the base reaches the bench through the environment, on this step only
|
|
43
|
+
- name: Type-performance gate over the change
|
|
44
|
+
if: github.event_name != 'workflow_dispatch'
|
|
45
|
+
env:
|
|
46
|
+
DIALECTE_CHANGE_BASE: ${{ github.event_name == 'merge_group' && github.event.merge_group.base_sha || 'HEAD^1' }}
|
|
32
47
|
run: npm run type-bench:check
|
|
33
48
|
|
|
34
49
|
# fails when a schema-derived narrowing assertion no longer holds
|