-
chore: packaging for release (#11)
发布于
2026-04-21 15:52:42 +00:00 | 47 次提交 在此版本后已推送到 main-
chore: remove unused TUI dependencies
-
fix: remove debug logging and add lazy-loaded config singleton
- Remove console.log/console.error from loadSpecConfig() that corrupted
stdout JSON output for CLI and programmatic consumers - Introduce getSpecConfig() lazy singleton to cache YAML file reads
- Add 3 new tests: no-stdout-pollution, lazy-load validity, cache identity
Fixes Critical Blockers #1 and #2 from pre-publish analysis.
- fix: address high-risk publishing issues
- Add engines field to package.json (node >= 18)
- Add prepublishOnly script to enforce build before publish
- Add Node.js smoke test to CI workflow
- Clean up unused SPEC_VERSION import in test
- fix: derive version from package.json and simplify spec.md resolution
Version:
- Create src/version.ts that reads ../package.json using import.meta.url
- Path is stable across source, bundle, installed, and npx contexts
because npm always includes package.json in the published tarball - Replace hardcoded '0.1.0' in index.ts with dynamic VERSION import
- Add 3 tests: matches package.json, valid semver, not fallback
spec.md path resolution:
- Reduce 5 shotgun candidate paths to 2 deterministic strategies:
- Bundle path: ./spec.md (build copies it alongside entry points)
- Dev path: ../../../../../docs/spec.md (relative to source)
- Add explicit specPath parameter for callers who know the path
- Update build script to copy spec.md to both dist/ and dist/linter/
- Add 3 tests: consistency, content length, explicit path contract
- fix: pre-publish hardening — 5 items
- Move build-only deps to devDependencies (keep zod for type compat)
- citty, mdast, remark-*, unified, unist-util-visit, yaml all bundled
- Zero runtime require() calls to any npm dependency
- Add 'designmd' bin alias for Windows shell compatibility
- cmd.exe confuses .md extension with file association
- Add ./package.json to exports map
- Prevents ERR_PACKAGE_PATH_NOT_EXPORTED in strict ESM bundlers
- Remove stale @types/react from devDependencies
- Add tarball smoke test to CI workflow
- Packs, installs in clean dir, runs CLI + programmatic import
- Catches 'works in monorepo, breaks when installed' bugs
下载附件
-