Add the npm-package stack (single TS library, node family)#52
Merged
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A new
npm-packagestack: SpecKit scaffolds a single TypeScript library — the node-family twin ofswift-package.dist/index.js+.d.ts), Vitest junit, tsgo / oxlint / oxfmt. fmt/lint scoped tosrc/(like web'sapp/).bindings: scoped— a library mixes scenario tests with plain unit/property tests, so untagged tests are out of scope rather than failingverify(matches the swift library twins).npmnameRule (ValidateName+npmReserved) — rejects non-publishable member names (capitals, the npm blacklist, Node core modules, >214 chars) attarget add, beforenpm publishwould. Fail-open core-module snapshot (stale → misses a new builtin, never a false reject).npm-packagereplaces the old plannedts-libroster name acrossconfig.go, the design docs, BACKLOG, HANDOFF; the register code's scaffold-less example moves togo-cli/node-cli.Verified
Real end-to-end (live toolchain), not just unit tests:
target add string-kit --stack npm-package→ realpnpm add→fmt:check/lint/typecheck/build/specify verify= green · 2 passed · 1 locked (lock records both scenarios).scopedkeepsverifygreen when an untagged unit test is added tosrc/.target addrejectsMyKit/http/node_modules(exit 1) and accepts valid names (exit 0).mise run cigreen; new render + drift +ValidateNametests pass.Engine unchanged except the additive
npmnameRule.kind: story(notkind: library— that taxonomy is still pending across all library stacks).