From 5ece5506951c9a73344d7690702264831554afbe Mon Sep 17 00:00:00 2001 From: luojiyin Date: Thu, 2 Jul 2026 19:45:34 +0800 Subject: [PATCH] chore(release): bump version to 0.1.2 --- CHANGELOG.md | 13 +++++++++++++ package.json | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3a6c80..79c0632 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 0.1.2 + +### Added + +- 新增 `ParsedPoint` / `ParsedPosition` / `Positioned` / `PositionedMarkdownRoot` / `PositionedMarkdownNode` 公开类型 +- `parseMd` 返回类型收紧为 `PositionedMarkdownRoot`,在 API 边界表达"所有解析节点都带 `position` 与 `start/end.offset`"的运行时契约 +- README 增加"位置契约"小节 + +### Tests + +- 新增 `__tests__/position.spec.ts`,参数化覆盖 24 个节点类型(frontmatter / heading / thematicBreak / blockquote / list / task list / table / strikethrough / inline code / code block / hard break / autolink / link / image / reference / definition / html / math / directive 等),递归断言每个节点的 `position` 完整 +- `__tests__/types/package-exports.{mts,cts}` 验证 `parseMd(...).position.start.offset` 编译为 `number` + ## 0.1.0 ### Added diff --git a/package.json b/package.json index 2d3440d..2d3f104 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lint-md/parser", - "version": "0.1.1", + "version": "0.1.2", "description": "lint-md 的解析器,基于 remark 生态,将 Markdown 字符串转换成 AST", "author": "yuzhanglong ", "contributors": [