Skip to content

Add the npm-package stack (single TS library, node family)#52

Merged
markmals merged 1 commit into
mainfrom
npm-package-stack
Jun 27, 2026
Merged

Add the npm-package stack (single TS library, node family)#52
markmals merged 1 commit into
mainfrom
npm-package-stack

Conversation

@markmals

Copy link
Copy Markdown
Owner

What

A new npm-package stack: SpecKit scaffolds a single TypeScript library — the node-family twin of swift-package.

  • Toolchain: tsdown build (→ dist/index.js + .d.ts), Vitest junit, tsgo / oxlint / oxfmt. fmt/lint scoped to src/ (like web's app/).
  • bindings: scoped — a library mixes scenario tests with plain unit/property tests, so untagged tests are out of scope rather than failing verify (matches the swift library twins).
  • Engine npm nameRule (ValidateName + npmReserved) — rejects non-publishable member names (capitals, the npm blacklist, Node core modules, >214 chars) at target add, before npm publish would. Fail-open core-module snapshot (stale → misses a new builtin, never a false reject).
  • Rename: npm-package replaces the old planned ts-lib roster name across config.go, the design docs, BACKLOG, HANDOFF; the register code's scaffold-less example moves to go-cli/node-cli.

Verified

Real end-to-end (live toolchain), not just unit tests:

  • target add string-kit --stack npm-package → real pnpm addfmt:check / lint / typecheck / build / specify verify = green · 2 passed · 1 locked (lock records both scenarios).
  • Proven that scoped keeps verify green when an untagged unit test is added to src/.
  • target add rejects MyKit / http / node_modules (exit 1) and accepts valid names (exit 0).
  • mise run ci green; new render + drift + ValidateName tests pass.

Engine unchanged except the additive npm nameRule. kind: story (not kind: library — that taxonomy is still pending across all library stacks).

A new node-family stack that scaffolds a single TypeScript library — the twin of
swift-package. tsdown build (-> dist/index.js + .d.ts), Vitest junit, tsgo/oxlint/oxfmt;
bindings: scoped so a library can mix scenario tests with plain unit/property tests.
Proven green-on-arrival end to end (target add -> fmt/lint/typecheck/build/verify; the
lock records both scenarios passing).

Engine: a new "npm" nameRule (ValidateName + npmReserved) rejects non-publishable
member names — capitals, the npm blacklist, Node core modules, >214 chars — at
`target add`, before `npm publish` would. Adds render, drift, and ValidateName tests.

Rename: npm-package replaces the old planned `ts-lib` roster name across config.go,
the design docs, BACKLOG, and HANDOFF; the register code's scaffold-less example moves
to go-cli/node-cli.

Dogfooded memory updated (mise-monorepo node-family second member; new npm-package topic).
@markmals markmals merged commit 5d44e5b into main Jun 27, 2026
4 checks passed
@markmals markmals deleted the npm-package-stack branch June 27, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant