feat: monorepo restructure + @flight/claude-code shim package#11
Merged
lewisnsmith merged 2 commits intomainfrom Apr 19, 2026
Merged
feat: monorepo restructure + @flight/claude-code shim package#11lewisnsmith merged 2 commits intomainfrom
lewisnsmith merged 2 commits intomainfrom
Conversation
Converts the repo to an npm workspaces monorepo so `npx @flight/claude-code init` works without a global flight-proxy install. - Move all source, tests, bench, and config into packages/flight-proxy/ so it becomes a proper workspace member (fixes the file: dep issue that breaks npm publish) - Add packages/claude-code/ — a thin wrapper that calls runSetupWizard() from flight-proxy; published as @flight/claude-code with bin flight-claude-code - Root package.json becomes private workspace manager (flight-monorepo) - Fix TSX_BIN paths in 5 test files after npm workspace hoisting moves tsx to root node_modules/.bin/ - Add 5 tests covering --help, -h, unknown subcommand, no subcommand, and idempotent double-init smoke test https://claude.ai/code/session_016gsNArY6RLGbsyazamTQAK
bin/init.js imports from flight-proxy which resolves to dist/index.js; tests were running before the build step so the import failed on CI. https://claude.ai/code/session_016gsNArY6RLGbsyazamTQAK
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.
Summary
packages/flight-proxy/so it becomes a proper npm workspace member — this is required so"flight-proxy": "^1.4.0"resolves via symlink rather than afile:path that breaks onnpm publishpackages/claude-code/: thin shim published as@flight/claude-code;npx @flight/claude-code@latest initcallsrunSetupWizard()from flight-proxy with no global install requiredpackage.jsonbecomes a private workspace manager (flight-monorepo); all scripts delegate to the appropriate workspace../../../node_modules/.bin/tsxnot../node_modules/.bin/tsxNote:
flightis already taken on npm (unrelated "flat file database" package since 2013), so the publishable CLI package staysflight-proxy.New package:
@flight/claude-codeFlags mirror
flight claude setup:--hooks/--no-hooks,--proxy/--no-proxy,--pd/--no-pd,--slash-commands/--no-slash-commands,--banner/--no-banner,--remove.Test plan
packages/flight-proxy: 37 test files, 252 tests pass (npm run check --workspace flight-proxy)packages/claude-code: 5 tests pass —--helpexits 0,-hexits 0, unknown subcommand exits nonzero, no subcommand exits nonzero, idempotent double-init smoke test (asserts exactly one hook entry per event type after two consecutive runs)npm run checkfrom root runs both workspaces cleanly (257 total tests)HOME=$(mktemp -d) npx --prefix /tmp/scratch ./packages/claude-code-0.1.0.tgz init— asserts~/.claude/settings.jsonhook entries + slash commands created, no duplicates on second runhttps://claude.ai/code/session_016gsNArY6RLGbsyazamTQAK