@jasonbelmonti/markdown-engine 3.1.0 → 3.1.1
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/CHANGELOG.md +9 -0
- package/README.md +12 -10
- package/dist/declarative-validation/evidence/index.d.ts.map +1 -1
- package/dist/declarative-validation/evidence/index.js +2 -1
- package/dist/declarative-validation/evidence/index.js.map +1 -1
- package/dist/internal/package-version.d.ts +2 -0
- package/dist/internal/package-version.d.ts.map +1 -0
- package/dist/internal/package-version.js +2 -0
- package/dist/internal/package-version.js.map +1 -0
- package/dist-bundled/markdown-engine-cli.mjs +4 -1
- package/docs/contracts/declarative-validation.md +2 -2
- package/package.json +1 -1
- package/scripts/install-markdown-engine-cli.sh +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
No unreleased changes.
|
|
6
6
|
|
|
7
|
+
## 3.1.1 - 2026-07-03
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Corrected the constrained-harness installer pin to use the 3.1.1 bundled CLI
|
|
12
|
+
package version and artifact hash.
|
|
13
|
+
- Corrected declarative validation evidence so `engineVersion` records the
|
|
14
|
+
package version that produced the JSON.
|
|
15
|
+
|
|
7
16
|
## 3.1.0 - 2026-07-03
|
|
8
17
|
|
|
9
18
|
### Added
|
package/README.md
CHANGED
|
@@ -6,13 +6,15 @@ profile and runtime work.
|
|
|
6
6
|
Package release state:
|
|
7
7
|
|
|
8
8
|
- package name: `@jasonbelmonti/markdown-engine`
|
|
9
|
-
- package metadata version: `3.
|
|
10
|
-
- published npm versions before this release: `0.1.0`, `1.0.0`, `2.0.0
|
|
11
|
-
|
|
9
|
+
- package metadata version: `3.1.1`
|
|
10
|
+
- published npm versions before this release: `0.1.0`, `1.0.0`, `2.0.0`,
|
|
11
|
+
`3.0.0`, `3.1.0`
|
|
12
|
+
- npm release target: `3.1.1` on `latest`
|
|
12
13
|
- website: <https://jasonbelmonti.github.io/markdown-engine/>
|
|
13
|
-
- release focus:
|
|
14
|
-
|
|
15
|
-
default API and
|
|
14
|
+
- release focus: document-set validation, V2 `frontmatterShape` and
|
|
15
|
+
`textFormat: isoDate` support, and OKF profile examples while retaining the
|
|
16
|
+
existing `documentVersion: "1.0.0"` rich IR contract as the default API and
|
|
17
|
+
CLI document shape
|
|
16
18
|
- maintainer documentation map: [docs/README.md](docs/README.md)
|
|
17
19
|
- design reference:
|
|
18
20
|
[Markdown Engine 1.0 Rich IR design](docs/design/markdown-engine-1.0-rich-ir-operational-design-spec.md)
|
|
@@ -84,7 +86,7 @@ console.log(validationResult.valid);
|
|
|
84
86
|
console.log(serialize(validationResult, { pretty: true }));
|
|
85
87
|
```
|
|
86
88
|
|
|
87
|
-
Package 3.
|
|
89
|
+
Package 3.1 retains the serialized document contract at
|
|
88
90
|
`documentVersion: "1.0.0"` and makes that rich IR path the default for
|
|
89
91
|
`normalize(parsed)`. Callers may still pass
|
|
90
92
|
`normalize(parsed, { documentVersion: "1.0.0" })` explicitly. That path adds
|
|
@@ -253,13 +255,13 @@ By default, the installer places the CLI under
|
|
|
253
255
|
and writes the wrapper to
|
|
254
256
|
`${MARKDOWN_ENGINE_BIN_DIR:-$HOME/.local/bin}/markdown-engine`. The installer
|
|
255
257
|
uses a local bundled artifact only when it matches the pinned artifact hash.
|
|
256
|
-
Otherwise it downloads `@jasonbelmonti/markdown-engine@3.
|
|
258
|
+
Otherwise it downloads `@jasonbelmonti/markdown-engine@3.1.1` with `npm pack
|
|
257
259
|
--ignore-scripts` and extracts only
|
|
258
260
|
`package/dist-bundled/markdown-engine-cli.mjs` from the tarball. It verifies the
|
|
259
261
|
pinned artifact hash before installing:
|
|
260
262
|
|
|
261
263
|
```text
|
|
262
|
-
|
|
264
|
+
8c7ff572765cbdc6c38b94de52d69709f583ee7b4d2b7e25ba6be8c92125addf
|
|
263
265
|
```
|
|
264
266
|
|
|
265
267
|
The installed wrapper is:
|
|
@@ -268,7 +270,7 @@ The installed wrapper is:
|
|
|
268
270
|
"${MARKDOWN_ENGINE_BIN_DIR:-$HOME/.local/bin}/markdown-engine" validate --file <file.md> --profile <profile.yaml> --format json
|
|
269
271
|
```
|
|
270
272
|
|
|
271
|
-
Package 3.
|
|
273
|
+
Package 3.1 keeps the 2.0 API normalization default: callers that invoke
|
|
272
274
|
`normalize(parsed)` receive the rich IR `1.0.0` document shape. Consumers that
|
|
273
275
|
still need the legacy `0.0.0` shape should consume the rich IR fields
|
|
274
276
|
(`target`, `sections`, `textSpans`, `tables`, `lists`, and `links`) or pin
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/declarative-validation/evidence/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/declarative-validation/evidence/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAIlE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAG7D,MAAM,WAAW,6BAA6B,CAC5C,UAAU,SAAS,oBAAoB,GAAG,oBAAoB;IAE9D,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;IACnC,WAAW,EAAE,SAAS,kBAAkB,EAAE,CAAC;CAC5C;AAED,wBAAgB,mCAAmC,CACjD,UAAU,SAAS,oBAAoB,EAEvC,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,iBAAiB,EAC1B,WAAW,EAAE,SAAS,UAAU,EAAE,EAClC,WAAW,EAAE,SAAS,kBAAkB,EAAE,GACzC,6BAA6B,CAAC,UAAU,CAAC,CAS3C"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
2
|
import { cloneDiagnostics } from "../../diagnostics/index.js";
|
|
3
|
+
import { MARKDOWN_ENGINE_PACKAGE_VERSION } from "../../internal/package-version.js";
|
|
3
4
|
import { stringifyStableJson } from "../../internal/stable-json.js";
|
|
4
5
|
import { cloneValidationRuleResult } from "../results/clone-rule-result.js";
|
|
5
6
|
export function createDeclarativeValidationEvidence(document, profile, ruleResults, diagnostics) {
|
|
6
7
|
return {
|
|
7
8
|
inputHash: sha256(stringifyStableJson(documentWithoutPath(document))),
|
|
8
9
|
profileHash: sha256(stringifyStableJson(resolvedProfile(profile, document))),
|
|
9
|
-
engineVersion:
|
|
10
|
+
engineVersion: MARKDOWN_ENGINE_PACKAGE_VERSION,
|
|
10
11
|
runtimeVersion: process.version,
|
|
11
12
|
ruleResults: cloneRuleResults(ruleResults),
|
|
12
13
|
diagnostics: cloneDiagnostics(diagnostics),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/declarative-validation/evidence/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAKzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAa5E,MAAM,UAAU,mCAAmC,CAGjD,QAAwB,EACxB,OAA0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CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAClC,GAAG,IAAI;YACP,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,OAAO;SACnC,CAAC,CAAC;KACJ,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB,CAAC,QAAwB;IACnD,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,WAAW,EAAE,GAAG,QAAQ,CAAC;IAEjD,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,SAAS,gBAAgB,CACvB,WAAkC;IAElC,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC;AAC9D,CAAC;AAED,SAAS,eAAe,CACtB,MAAkB;IAElB,OAAO,yBAAyB,CAAC,MAAM,CAAe,CAAC;AACzD,CAAC;AAED,SAAS,MAAM,CAAC,KAAa;IAC3B,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-version.d.ts","sourceRoot":"","sources":["../../src/internal/package-version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,+BAA+B,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-version.js","sourceRoot":"","sources":["../../src/internal/package-version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,+BAA+B,GAAG,OAAO,CAAC"}
|
|
@@ -13418,6 +13418,9 @@ function cloneSourceRange2(sourceRange) {
|
|
|
13418
13418
|
// src/declarative-validation/evidence/index.ts
|
|
13419
13419
|
import { createHash } from "node:crypto";
|
|
13420
13420
|
|
|
13421
|
+
// src/internal/package-version.ts
|
|
13422
|
+
var MARKDOWN_ENGINE_PACKAGE_VERSION = "3.1.1";
|
|
13423
|
+
|
|
13421
13424
|
// src/internal/stable-json.ts
|
|
13422
13425
|
function normalizeStableJsonValue(value) {
|
|
13423
13426
|
if (Array.isArray(value)) {
|
|
@@ -13556,7 +13559,7 @@ function createDeclarativeValidationEvidence(document3, profile, ruleResults, di
|
|
|
13556
13559
|
return {
|
|
13557
13560
|
inputHash: sha256(stringifyStableJson(documentWithoutPath(document3))),
|
|
13558
13561
|
profileHash: sha256(stringifyStableJson(resolvedProfile(profile, document3))),
|
|
13559
|
-
engineVersion:
|
|
13562
|
+
engineVersion: MARKDOWN_ENGINE_PACKAGE_VERSION,
|
|
13560
13563
|
runtimeVersion: process.version,
|
|
13561
13564
|
ruleResults: cloneRuleResults(ruleResults),
|
|
13562
13565
|
diagnostics: cloneDiagnostics(diagnostics)
|
|
@@ -624,8 +624,8 @@ serialization of the resolved `ValidationProfile` after applying the resolved
|
|
|
624
624
|
`documentVersion` and an explicit matching `documentVersion` therefore produce
|
|
625
625
|
the same profile hash for the same document version and rules.
|
|
626
626
|
|
|
627
|
-
`engineVersion` records the package version that produced the evidence.
|
|
628
|
-
|
|
627
|
+
`engineVersion` records the package version that produced the evidence. This
|
|
628
|
+
matches the package metadata version even though `documentVersion` remains
|
|
629
629
|
`"1.0.0"`.
|
|
630
630
|
|
|
631
631
|
Raw Markdown bytes, raw YAML bytes, YAML comments, caller file paths, and
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env sh
|
|
2
2
|
set -eu
|
|
3
3
|
|
|
4
|
-
VERSION="3.
|
|
4
|
+
VERSION="3.1.1"
|
|
5
5
|
PACKAGE="@jasonbelmonti/markdown-engine"
|
|
6
|
-
EXPECTED_SHA256="
|
|
6
|
+
EXPECTED_SHA256="8c7ff572765cbdc6c38b94de52d69709f583ee7b4d2b7e25ba6be8c92125addf"
|
|
7
7
|
DEFAULT_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
|
|
8
8
|
MARKDOWN_ENGINE_HOME="${MARKDOWN_ENGINE_HOME:-$DEFAULT_DATA_HOME/markdown-engine}"
|
|
9
9
|
MARKDOWN_ENGINE_BIN_DIR="${MARKDOWN_ENGINE_BIN_DIR:-$HOME/.local/bin}"
|