mdrefine 0.1.0-beta.1 → 0.1.0-beta.2

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.
Files changed (40) hide show
  1. package/CONTRIBUTING.md +6 -0
  2. package/README.md +10 -6
  3. package/dist/cli/main.js +9 -2
  4. package/dist/cli/main.js.map +1 -1
  5. package/dist/config/resolve.d.ts +12 -0
  6. package/dist/config/resolve.js +7 -1
  7. package/dist/config/resolve.js.map +1 -1
  8. package/dist/core/engine.js +19 -4
  9. package/dist/core/engine.js.map +1 -1
  10. package/dist/core/types.d.ts +7 -1
  11. package/dist/core/types.js.map +1 -1
  12. package/dist/index.d.ts +1 -1
  13. package/dist/index.js.map +1 -1
  14. package/dist/rules/links.js +28 -5
  15. package/dist/rules/links.js.map +1 -1
  16. package/dist/rules/structure.d.ts +2 -0
  17. package/dist/rules/structure.js +24 -0
  18. package/dist/rules/structure.js.map +1 -0
  19. package/dist/rules/style.js +78 -15
  20. package/dist/rules/style.js.map +1 -1
  21. package/dist/syntax/obsidian.js +17 -0
  22. package/dist/syntax/obsidian.js.map +1 -1
  23. package/dist/workspace/files.d.ts +5 -2
  24. package/dist/workspace/files.js +15 -6
  25. package/dist/workspace/files.js.map +1 -1
  26. package/dist/workspace/index.d.ts +4 -1
  27. package/dist/workspace/index.js +53 -15
  28. package/dist/workspace/index.js.map +1 -1
  29. package/dist/workspace/selection.d.ts +2 -0
  30. package/dist/workspace/selection.js +31 -0
  31. package/dist/workspace/selection.js.map +1 -0
  32. package/docs/cli.md +18 -0
  33. package/docs/configuration.md +86 -25
  34. package/docs/contributing.md +87 -5
  35. package/docs/design.md +15 -5
  36. package/docs/plugins.md +11 -4
  37. package/docs/quick-start.md +1 -1
  38. package/docs/releases/0.1.0-beta.2.md +83 -0
  39. package/docs/releases.md +33 -10
  40. package/package.json +1 -1
@@ -9,7 +9,7 @@ The CLI requires Node.js 22.12 or newer. Install the package in your document
9
9
  workspace:
10
10
 
11
11
  ```sh
12
- npm install --save-dev --save-exact mdrefine@0.1.0-beta.1
12
+ npm install --save-dev --save-exact mdrefine@0.1.0-beta.2
13
13
  npx --no-install mdtools --help
14
14
  ```
15
15
 
@@ -0,0 +1,83 @@
1
+ # mdrefine 0.1.0-beta.2
2
+
3
+ Second public beta of Markdown Tools. npm package: `mdrefine`; executable:
4
+ `mdtools`. Requires Node.js 22.12 or newer. Upgrade with:
5
+
6
+ ```sh
7
+ npm install --save-dev --save-exact mdrefine@0.1.0-beta.2
8
+ ```
9
+
10
+ ## Correctness fixes
11
+
12
+ - Measure protected Markdown markers together with their preceding word before
13
+ wrapping, avoiding preventable line-width overflow.
14
+ - Prefer exact Obsidian workspace-root targets before suffix matches, respect
15
+ explicit relative paths, and verify target identity before rewriting links.
16
+ - Preserve compliant literal destination spelling, including `?` and `%`, and
17
+ escape literal percent/hash characters correctly when generating paths.
18
+ - Recognize existing directory targets instead of reporting them as missing.
19
+ Obsidian receives a directory-specific diagnostic; CommonMark/GitHub links can
20
+ resolve to directories. Directories are not rewritten to README files.
21
+ - Compare code-span line endings using their rendered space value while keeping
22
+ other code whitespace significant, allowing safe inline-code formatting.
23
+ - Fix parsing of inline Obsidian comments spanning several physical lines.
24
+
25
+ ## New controls
26
+
27
+ - Opt-in `style/inline-code` joins multiline code spans without changing their
28
+ parsed content, including spans in lists and blockquotes.
29
+ - `style/wrap.measure: "codepoints"` counts Unicode scalar values instead of
30
+ display columns. Display columns remain the default.
31
+ - `style/wrap.reportUnreflowed` and `reportUnbreakable` optionally explain
32
+ protected paragraphs and remaining unbreakable overflow without changing
33
+ formatting safety or check-mode semantics.
34
+ - `resolve.gitIgnored` and `resolve.nestedRepositories` opt into additional link
35
+ targets independently of files selected for linting or writing.
36
+ - Repeatable `--exclude <path>` omits literal files or directory subtrees from
37
+ processing while preserving them in the link index. Filesystem aliases are
38
+ canonicalized consistently, including Windows short paths.
39
+ - Opt-in `structure/initial-heading` checks for an initial level-1 heading after
40
+ optional YAML/TOML front matter. It never edits content.
41
+
42
+ See
43
+ [configuration](https://viell-dev.github.io/slop-markdown-tools/configuration.html)
44
+ and [CLI workflows](https://viell-dev.github.io/slop-markdown-tools/cli.html)
45
+ for options, defaults, and examples.
46
+
47
+ ## Performance and library API
48
+
49
+ Workspace indexing is path-only until a target's headings or block IDs are
50
+ needed. Fragment parsing, suffix lookups, and built-in schema validation reuse
51
+ cached work within their documented lifetimes; custom schema IDs stay isolated
52
+ between calls. A synthetic benchmark is available in `scripts/benchmark.mjs` in
53
+ the source checkout. Validation on the original large workspace remains pending
54
+ in [#23](https://github.com/viell-dev/slop-markdown-tools/issues/23); no
55
+ persistent index cache or worker pool is included.
56
+
57
+ `createWorkspace` accepts lazy Markdown source loaders and explicit directory
58
+ entries. Exhaustive consumers of `LinkResolution.status` must handle the new
59
+ `"directory"` result. Consumers constructing `ResolvedConfig` directly must
60
+ provide `resolve` (use `{}` for the defaults); `resolveConfig()` provides it for
61
+ normal callers. See the
62
+ [library API](https://viell-dev.github.io/slop-markdown-tools/plugins.html).
63
+
64
+ ## Compatibility and project scope
65
+
66
+ Beta.1 configurations remain supported. The CLI name and Node.js minimum are
67
+ unchanged; new formatting and structural controls are opt-in.
68
+
69
+ For users of intermediate source checkouts, these additions were removed before
70
+ this release: `style/wrap.keepLabelWithAtom`, `--changed`, `--staged`,
71
+ `structure/title-matches-filename`, `structure/metadata-line`, and
72
+ `style/accidental-marker`. Remove those settings and implement consumer-specific
73
+ policies in plugins or wrappers. Git callers can supply explicit paths while
74
+ retaining workspace resolution; skip the CLI invocation for an empty selection.
75
+ These removals do not remove any published beta.1 feature.
76
+
77
+ Modified-date mutation remains consumer-owned. Semantic guards, conservative
78
+ handling of unsupported constructs, and Obsidian's verified strict-line-break
79
+ requirement remain in force. The plugin API and configuration are provisional.
80
+
81
+ Repository maintenance now includes explicit issue-scope review and a documented
82
+ label taxonomy. Full CI runs on Linux/Node.js 24, with compatibility and
83
+ installed-package checks on Linux/Node.js 22 and Windows/Node.js 24.
package/docs/releases.md CHANGED
@@ -2,14 +2,15 @@
2
2
 
3
3
  ## Versions and availability
4
4
 
5
- These documents cover `mdrefine@0.1.0-beta.1`. The executable is `mdtools`;
5
+ These documents cover `mdrefine@0.1.0-beta.2`. The executable is `mdtools`;
6
6
  prereleases use npm's `beta` channel. Read the
7
- [beta.1 release notes](releases/0.1.0-beta.1.md) for changes and limitations.
7
+ [beta.2 release notes](releases/0.1.0-beta.2.md) for changes and limitations.
8
+ The [beta.1 notes](releases/0.1.0-beta.1.md) document the initial release.
8
9
 
9
10
  The registry is the source of truth for package availability:
10
11
 
11
12
  ```sh
12
- npm view mdrefine@0.1.0-beta.1 version --registry=https://registry.npmjs.org/
13
+ npm view mdrefine@0.1.0-beta.2 version --registry=https://registry.npmjs.org/
13
14
  ```
14
15
 
15
16
  An `E404` means the requested package or version is unavailable. A version in
@@ -17,6 +18,12 @@ this repository or its documentation does not imply publication. Check
17
18
  [GitHub releases](https://github.com/viell-dev/slop-markdown-tools/releases) for
18
19
  release announcements and downloadable artifacts.
19
20
 
21
+ The initial beta was published locally under npm account `viell`. npm assigned
22
+ both `beta` and `latest` to `0.1.0-beta.1` despite an explicit `--tag beta`;
23
+ removing `latest` returned E400. Both tags were accepted for that release.
24
+ Continue using `--tag beta` for subsequent betas and verify tags after
25
+ publishing.
26
+
20
27
  ## Prepare without publishing
21
28
 
22
29
  Use Node.js 24 and npm 10 or newer from a clean checkout:
@@ -24,7 +31,7 @@ Use Node.js 24 and npm 10 or newer from a clean checkout:
24
31
  ```sh
25
32
  npm ci
26
33
  npm run release:prepare
27
- npm publish ./artifacts/mdrefine-0.1.0-beta.1.tgz --dry-run --ignore-scripts --access public --tag beta
34
+ npm publish ./artifacts/mdrefine-0.1.0-beta.2.tgz --dry-run --ignore-scripts --access public --tag beta
28
35
  ```
29
36
 
30
37
  Preparation runs all checks, packs the allowlisted files, installs that exact
@@ -36,12 +43,15 @@ change.
36
43
 
37
44
  The manual **Release** GitHub Actions workflow performs the same checks plus a
38
45
  dependency audit and uploads the artifact for 14 days. Leave `publish` false to
39
- prepare only. CI independently checks Linux, macOS, Windows, and Node.js 22/24.
46
+ prepare only. CI runs full checks on Linux/Node.js 24, compatibility tests on
47
+ Linux/Node.js 22 and Windows/Node.js 24, and installed-package checks on all
48
+ three targets.
40
49
 
41
50
  ## Publication prerequisites
42
51
 
43
52
  Publication requires explicit operator authorization. Preparing a PR or artifact
44
- does not supply that authorization. Before the first publication:
53
+ does not supply that authorization. For subsequent releases, verify these
54
+ prerequisites rather than repeating the completed bootstrap:
45
55
 
46
56
  1. Merge the release PR with all required checks passing. Review the tarball
47
57
  manifest, release notes, version, and registry name again.
@@ -56,10 +66,16 @@ does not supply that authorization. Before the first publication:
56
66
  token is stored in GitHub.
57
67
  4. Restrict the GitHub `npm-release` environment to `main` and configure an
58
68
  approval gate if an independent approver is available. Verify branch rules
59
- still require PRs and the four CI checks. The workflow uses Node.js 24 and
69
+ still require PRs and the three CI checks. The workflow uses Node.js 24 and
60
70
  checks that npm supports trusted publishing.
61
- 5. Only after authorization and authentication setup, set repository variable
62
- `NPM_PUBLISH_ENABLED` to `true`. It is disabled during preparation.
71
+ 5. Repository variable `NPM_PUBLISH_ENABLED` is `true` after verified trusted
72
+ publisher setup. This enables the workflow's capability; it does not
73
+ authorize a release. Preparation uses `publish: false` regardless of this
74
+ variable's value.
75
+
76
+ Trusted-publisher settings were verified on 2026-09-18. The first release used
77
+ local authentication and has no OIDC provenance. For workflow releases, verify
78
+ the publication job and the registry provenance attestations after each release.
63
79
 
64
80
  ## Publish an authorized beta
65
81
 
@@ -69,7 +85,8 @@ builds and checks the package again, verifies the artifact checksum, publishes
69
85
  that tarball to npm's `beta` channel with provenance, and creates a GitHub
70
86
  prerelease at the workflow's commit. Tags use exact versions without a `v`
71
87
  prefix. Stable publication deliberately needs a separate policy change; this
72
- workflow accepts only beta versions and never assigns npm's `latest` tag.
88
+ workflow accepts only beta versions and requests the `beta` tag. See the
89
+ initial-publication exception above before interpreting `latest`.
73
90
 
74
91
  For an authenticated first publication that cannot use OIDC yet, use the exact
75
92
  reviewed tarball with `npm publish <tarball> --ignore-scripts --access public
@@ -85,6 +102,12 @@ versions, tags, and release assets must never be overwritten; corrections use a
85
102
  new version. The workflow refuses an existing npm version or tag to make a
86
103
  partial release visible instead of silently accepting it.
87
104
 
105
+ GitHub enforces immutability for future releases and their assets. Attach all
106
+ assets before publishing a release. The existing beta.1 release predates that
107
+ setting, so its assets are not retroactively locked; its version tag remains
108
+ protected by the repository ruleset. Do not replace its assets or recreate the
109
+ release to change that history.
110
+
88
111
  After publication, verify registry metadata, the `beta` dist-tag, a fresh
89
112
  installation, the GitHub release and its assets, and the documentation site. All
90
113
  subsequent changes, including prerelease maintenance, continue through PRs.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mdrefine",
3
- "version": "0.1.0-beta.1",
3
+ "version": "0.1.0-beta.2",
4
4
  "description": "Configurable Markdown linting and formatting for CommonMark, GitHub, and Obsidian",
5
5
  "type": "module",
6
6
  "license": "MIT",