chore: repackage as single publishable ui-lineage npm package#22
Merged
Conversation
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>
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.
Make it publishable as
ui-lineageYou asked whether this could ship to npm. Findings: the
@coderadar/*scope is owned by another account (gbh24679), so it's unusable — but everyui-lineagename is free. This PR turns the CLI package into one self-contained package namedui-lineage, bundling the internal workspace packages in so consumers depend only onui-lineage+ three external deps.Changes
packages/cli→ui-lineage: binui-lineage; newsrc/lib.tsre-exports the core query API + the React scanner;main/exports/types→dist/lib.@coderadar/core+@coderadar/parser-reactinto both the JS and the.d.ts(dts.resolve), keepsts-morph/yaml/commanderexternal, preserves the CLI shebang.@coderadar/core+@coderadar/parser-react→private: true— their code ships bundled insideui-lineage; also prevents accidental publish to the taken scope.prepublishOnly; ignore*.graph.json.Verified (not published — packaging only)
pnpm -r build / typecheck / test+pnpm eval: 185 checks green, precision/recall 1.000.npm pack→npm install ./ui-lineage-0.1.0.tgzin a clean project →ui-lineage scan+ui-lineage journeysbin worksimport { scanReact, journeys } from "ui-lineage"resolves (bare specifier)@coderadarimports in the bundle; tarball is 10 files / ~89 KB.How to actually publish (your call, your npm account)
ui-lineageis a fresh name so0.1.0is fine. Considernpm publish --tag nextwhile it's pre-1.0.🤖 Generated with Claude Code