Skip to content

chore: repackage as single publishable ui-lineage npm package#22

Merged
officialCodeWork merged 1 commit into
developmentfrom
chore/publish-ui-lineage
Jul 14, 2026
Merged

chore: repackage as single publishable ui-lineage npm package#22
officialCodeWork merged 1 commit into
developmentfrom
chore/publish-ui-lineage

Conversation

@officialCodeWork

Copy link
Copy Markdown
Owner

Make it publishable as ui-lineage

You asked whether this could ship to npm. Findings: the @coderadar/* scope is owned by another account (gbh24679), so it's unusable — but every ui-lineage name is free. This PR turns the CLI package into one self-contained package named ui-lineage, bundling the internal workspace packages in so consumers depend only on ui-lineage + three external deps.

Changes

  • packages/cliui-lineage: bin ui-lineage; new src/lib.ts re-exports the core query API + the React scanner; main/exports/typesdist/lib.
  • tsup bundle: inlines @coderadar/core + @coderadar/parser-react into both the JS and the .d.ts (dts.resolve), keeps ts-morph/yaml/commander external, preserves the CLI shebang.
  • @coderadar/core + @coderadar/parser-reactprivate: true — their code ships bundled inside ui-lineage; also prevents accidental publish to the taken scope.
  • Rebranded CLI name/help/default graph filename; added package README (npm listing) + prepublishOnly; ignore *.graph.json.

Verified (not published — packaging only)

  • pnpm -r build / typecheck / test + pnpm eval: 185 checks green, precision/recall 1.000.
  • Real consumer test: npm packnpm install ./ui-lineage-0.1.0.tgz in a clean project →
    • ui-lineage scan + ui-lineage journeys bin works
    • import { scanReact, journeys } from "ui-lineage" resolves (bare specifier)
    • zero @coderadar imports in the bundle; tarball is 10 files / ~89 KB.

How to actually publish (your call, your npm account)

git checkout development && git pull        # after merge
pnpm -r build
cd packages/cli
npm login                                    # your own account
npm publish                                  # ui-lineage is unscoped → public by default

ui-lineage is a fresh name so 0.1.0 is fine. Consider npm publish --tag next while it's pre-1.0.

🤖 Generated with Claude Code

Turn the CLI package into one self-contained npm package named `ui-lineage`
(the @CodeRadar scope is owned by another account and unusable). The internal
@coderadar/core and @coderadar/parser-react workspace packages are bundled into
the output via tsup, so consumers depend only on `ui-lineage` plus its three
external deps (ts-morph, yaml, commander).

- packages/cli → name "ui-lineage"; bin `ui-lineage`; library entry src/lib.ts
  re-exports the core query API + the React scanner (main/exports/types → lib).
- tsup config: bundle @coderadar/* into JS *and* d.ts (dts.resolve), keep the
  heavy deps external; preserves the CLI shebang; emits index (bin) + lib.
- Mark @coderadar/core and @coderadar/parser-react private (their code ships
  inside ui-lineage; also prevents accidental publish to the taken scope).
- Rebrand CLI program name / help / default graph filename to ui-lineage.
- Add package README (npm listing) and prepublishOnly; ignore *.graph.json.

Verified: pnpm -r build/typecheck/test + eval all green (185 checks, precision/
recall 1.000). npm pack → npm install of the tarball into a clean project works:
the `ui-lineage` bin runs and `import { scanReact, journeys } from "ui-lineage"`
resolves with no @CodeRadar imports in the bundle. Not published — packaging only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@officialCodeWork
officialCodeWork merged commit a639643 into development Jul 14, 2026
1 check passed
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.

2 participants