Skip to content

release(build-tsdoc): 0.2.1 — host-native manifest line endings#29

Merged
amery merged 4 commits into
mainfrom
pr-amery-api-eol
Jun 16, 2026
Merged

release(build-tsdoc): 0.2.1 — host-native manifest line endings#29
amery merged 4 commits into
mainfrom
pr-amery-api-eol

Conversation

@amery

@amery amery commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Releases @kagal/build-tsdoc 0.2.1. The generated .api.json
now follows the host's native line endings by default instead of
api-extractor's unconditional CRLF, so the manifest matches
whatever the consuming repo normalises to — no more spurious
CRLF↔LF churn in repos that commit on LF. A new newlineKind
option pins 'lf'/'crlf' regardless of platform for repos that
need a fixed ending.

Changes

  • feat(build-tsdoc): default manifest line endings to the host OS
    extractEntryManifest / ExtractEntryOptions gain a
    newlineKind option (and the NewlineKind type), defaulting to
    'os'. The resolved kind feeds both api-extractor's write and
    the import-path rewrite via a serialiseJSON helper whose CRLF
    pass normalises \r?\n, so it can never emit \r\r\n. An
    omitted or unexpected value falls back to the host.
  • docs(build-tsdoc): group the Exports section by symbol kind
    the README Exports table is regrouped under Functions / Types /
    Errors / Constant headings, each with a short gloss.
  • chore(deps): normalise version ranges and bump dev tooling
    one range convention across the workspace (caret by default,
    tilde for 0.0.x), plus @types/node floor bump and lockfile
    dedupe.
  • chore(build-tsdoc): release 0.2.1 — version bump and
    changelog promotion. Per 0.x.y discipline this is a patch: a
    new option and a default tweak, neither breaking nor a
    significant change.

Verification

pnpm precommit green: lint (eslint + cspell), type-check (all
three tsconfigs), build, and 59 tests across 4 files. The feature
is covered by an on-disk default-ending test, a non-index
import-path-rewrite test exercising the CRLF pass end-to-end, and
a serialiseJSON unit suite.

After merge, tagging the merge commit v0.2.1 triggers
publish.yml, which publishes to npm via OIDC with Sigstore
provenance.

Summary by CodeRabbit

  • New Features

    • Introduced newlineKind option for API manifest generation, allowing explicit control over line endings (default: host OS, with options for LF or CRLF).
  • Documentation

    • Updated documentation with details on the new line-ending configuration option and package exports.

amery added 4 commits June 12, 2026 01:47
Adopt one range convention across the workspace: caret by default,
tilde reserved for 0.0.x packages where caret would otherwise pin an
exact patch.

- typescript ~5.9.3 -> ^5.9.3 (root, build-tsdoc)
- pkg-pr-new ^0.0.71 -> ~0.0.75 (0.0.x tilde range, floor bumped)
- @types/node ^20.19.37 -> ^20.19.43 (root, build-tsdoc)

Lockfile regenerated via pnpm dedupe; @types/node resolves to
20.19.43 across the api-extractor and vitest peer trees, typescript
stays on 5.9.3.

Signed-off-by: Alejandro Mery <amery@apptly.co>
Replace the single-cell exports table, which crammed every
symbol into one unreadable run, with bullet lists grouped as
Functions, Types, Errors, and Constant, each with a short
gloss.

Signed-off-by: Alejandro Mery <amery@apptly.co>
The generated `.api.json` is consumer territory, so it should
match whatever the consuming repo normalises to rather than
api-extractor's unconditional CRLF default.

Add a `newlineKind` option (and the `NewlineKind` type) on
`extractEntryManifest` / `ExtractEntryOptions`, defaulting to
`'os'` — the host's native ending. `'os'`, an omitted option,
and any unexpected value resolve to the host via `EOL`; `'lf'`
and `'crlf'` pin the ending regardless of platform. The
resolved kind feeds both api-extractor's write and the
import-path rewrite, the latter through a `serialiseJSON`
helper whose CRLF pass normalises `\r?\n` so it can never emit
`\r\r\n`.

Signed-off-by: Alejandro Mery <amery@apptly.co>
Bump @kagal/build-tsdoc to 0.2.1 and promote the existing
[Unreleased] changelog entries under the new version with a
2026-06-16 release date, keeping an empty [Unreleased]
placeholder on top.

0.2.1 changes the generated `.api.json` to follow the host's
native line endings by default instead of api-extractor's
unconditional CRLF, so the manifest matches whatever the
consuming repo normalises to. The new `newlineKind` option
pins `'lf'`/`'crlf'` regardless of platform for repos that
need a fixed ending.

After this PR merges, tagging the merge commit v0.2.1 triggers
publish.yml, which authenticates to npm via OIDC and publishes
with Sigstore provenance.

Signed-off-by: Alejandro Mery <amery@apptly.co>
@amery amery added enhancement New feature or request build-tsdoc @kagal/build-tsdoc package release Version bump and release prep labels Jun 16, 2026
@amery amery self-assigned this Jun 16, 2026
@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4a78e204-ec35-432e-ae16-4be5f0a9590e

📥 Commits

Reviewing files that changed from the base of the PR and between c4141e2 and 433f944.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (7)
  • package.json
  • packages/@kagal-build-tsdoc/CHANGELOG.md
  • packages/@kagal-build-tsdoc/README.md
  • packages/@kagal-build-tsdoc/package.json
  • packages/@kagal-build-tsdoc/src/__tests__/extract.test.ts
  • packages/@kagal-build-tsdoc/src/extract.ts
  • packages/@kagal-build-tsdoc/src/index.ts

📝 Walkthrough

Walkthrough

Adds a NewlineKind type ('os' | 'crlf' | 'lf') and newlineKind option to ExtractEntryOptions in @kagal-build-tsdoc. A new serialiseJSON helper and resolveNewlineKind utility apply the selected line ending when emitting .api.json manifests. The type is re-exported from the package entry point. Tests, README, changelog, and version bump to 0.2.1 are included. Root devDependencies are also updated.

Changes

NewlineKind feature for @kagal-build-tsdoc

Layer / File(s) Summary
NewlineKind type, ExtractEntryOptions field, and public re-export
packages/@kagal-build-tsdoc/src/extract.ts, packages/@kagal-build-tsdoc/src/index.ts
Defines exported NewlineKind ('os' | 'crlf' | 'lf') and internal ConcreteNewlineKind, adds optional newlineKind to ExtractEntryOptions, and re-exports the type from the package entry point.
resolveNewlineKind, serialiseJSON, and injectEntryImportPath wiring
packages/@kagal-build-tsdoc/src/extract.ts
Adds resolveNewlineKind to convert NewlineKind to a concrete kind (with OS-fallback), adds exported serialiseJSON using it, updates injectEntryImportPath to accept and use the resolved kind, and wires the resolved kind through extractEntryManifest into both ExtractorConfig.prepare and the injectEntryImportPath call.
Tests, README, changelog, and version bump
packages/@kagal-build-tsdoc/src/__tests__/extract.test.ts, packages/@kagal-build-tsdoc/README.md, packages/@kagal-build-tsdoc/CHANGELOG.md, packages/@kagal-build-tsdoc/package.json
Adds extractEntryManifest newline-kind tests (default OS and forced CRLF) and a serialiseJSON test suite. Updates README with newlineKind docs and a restructured Exports section. Adds a 0.2.1 CHANGELOG entry. Bumps package version to 0.2.1 and widens typescript devDep range to ^.

Root devDependency updates

Layer / File(s) Summary
Root package.json devDependency version bumps
package.json
Bumps @types/node to ^20.19.43, pkg-pr-new to ~0.0.75, and widens typescript from ~5.9.3 to ^5.9.3.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • kagal-dev/tsdoc#22: Introduced the api-extractor extraction pipeline and per-entry JSON/import-path handling in extract.ts that this PR extends with newlineKind/serialiseJSON support.

Suggested labels

documentation

Poem

🐇 Hoppity-hop, the lines align,
CR and LF, now yours to define!
'os' by default, or force it your way,
serialiseJSON keeps CR-LF at bay.
The manifest matches, no matter the host —
tidy line endings, that's what I love most! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: version 0.2.1 release with host-native manifest line endings support.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pr-amery-api-eol

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedpkg-pr-new@​0.0.751001007097100
Added@​types/​node@​20.19.431001008196100

View full report

@amery
amery merged commit 1cdf67a into main Jun 16, 2026
11 checks passed
@amery
amery deleted the pr-amery-api-eol branch June 16, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-tsdoc @kagal/build-tsdoc package enhancement New feature or request release Version bump and release prep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant