Skip to content

Commit 961b7fb

Browse files
authored
fix(ci): make @flapi/shared build standalone so the clients gate is green (#88)
* fix(ci): make @flapi/shared build standalone so the clients gate passes 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). * fix(ci): make the VSCode extension build standalone 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).
1 parent d245844 commit 961b7fb

15 files changed

Lines changed: 987 additions & 31 deletions

.github/workflows/clients.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Clients (CLI + VSCode)
22

33
# Compile/test gate for the TypeScript packages under cli/. This exists so a broken
44
# build (like the extension being uncompilable for months) is caught on every PR.
5+
#
6+
# Each job builds @flapi/shared first: the CLI and the extension both resolve
7+
# @flapi/shared to its built dist/, and the extension's prebuild invokes shared's
8+
# tsup, which needs shared's devDependencies installed.
59

610
on:
711
push:
@@ -40,6 +44,11 @@ jobs:
4044
- uses: actions/setup-node@v4
4145
with:
4246
node-version: '22'
47+
- name: Build @flapi/shared (dependency)
48+
working-directory: cli/shared
49+
run: |
50+
npm ci
51+
npm run build
4352
- name: Build & test flapii CLI
4453
working-directory: cli
4554
run: |
@@ -54,6 +63,11 @@ jobs:
5463
- uses: actions/setup-node@v4
5564
with:
5665
node-version: '22'
66+
- name: Build @flapi/shared (dependency)
67+
working-directory: cli/shared
68+
run: |
69+
npm ci
70+
npm run build
5771
- name: Build, typecheck & test the VSCode extension
5872
working-directory: cli/vscode-extension
5973
run: |

0 commit comments

Comments
 (0)