Skip to content

fix(ci): make @flapi/shared build standalone so the clients gate is green#88

Merged
jrosskopf merged 2 commits into
mainfrom
fix/clients-ci-tsup-config
Jun 14, 2026
Merged

fix(ci): make @flapi/shared build standalone so the clients gate is green#88
jrosskopf merged 2 commits into
mainfrom
fix/clients-ci-tsup-config

Conversation

@jrosskopf

Copy link
Copy Markdown
Contributor

The Clients (CLI + VSCode) gate added in #87 is red on main. Root cause: @flapi/shared only builds when its deps are hoisted from cli/node_modules; building it in isolation (as CI — and any publish — does) fails two ways:

  1. Under-declared dependencies. shared/src imports axios-retry, boxen, camelcase, chalk, cli-table3, colorette, figures, lodash.kebabcase, log-symbols, ora and node builtins, but package.json listed only axios + js-yaml. Now declared (+ @types/node, @types/js-yaml).
  2. tsup config walk-up. shared had no tsup.config, so tsup found the parent cli/tsup.config.ts and couldn't resolve tsup from the empty cli/ in CI. Added cli/shared/tsup.config.ts.

Also made each CI job build @flapi/shared before its dependents.

Test plan

  • @flapi/shared builds with cli/node_modules removed (true CI isolation) — npm ci && npm run build exits 0
  • CLI builds + 41/41 tests; extension tsc --noEmit 0 errors + webpack build + 12/12 tests

The clients CI workflow built @flapi/shared in isolation and failed two ways,
both masked locally by dependency hoisting from cli/node_modules:

- shared/src imported axios-retry, boxen, camelcase, chalk, cli-table3,
  colorette, figures, lodash.kebabcase, log-symbols, ora and node builtins,
  but shared/package.json only declared axios + js-yaml. Declare the real deps
  (+ @types/node, @types/js-yaml).
- shared had no tsup.config, so tsup walked up to cli/tsup.config.ts and could
  not resolve tsup from the empty cli/ in CI. Add shared/tsup.config.ts.

Verified by building shared with cli/node_modules removed (true CI isolation).
The extension relied on axios being hoisted from cli/node_modules; in the
isolated CI job it failed to resolve 'axios' and cascaded into implicit-any /
strict errors.

- Source the AxiosInstance type from @flapi/shared (the single canonical axios)
  in the 8 type-only importers, avoiding a dual-axios type clash.
- Declare axios as a direct dependency for endpointTestService, which calls
  axios() at runtime, and coerce its broad header value types to string.

Verified by typechecking/building/testing the extension with cli/node_modules
removed (true CI isolation).
@jrosskopf jrosskopf merged commit 961b7fb into main Jun 14, 2026
11 checks passed
@jrosskopf jrosskopf deleted the fix/clients-ci-tsup-config branch June 14, 2026 13:52
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.

1 participant