Skip to content

Commit 19ca6bf

Browse files
authored
chore: promote the grouped deps bump into 5.3.1 (#123)
* chore: promote the grouped deps bump into 5.3.1 Promote from dev to stable, picking up the one change that landed after the 5.3.1 promotion (#119) and so missed the pending release PR (#120): * deps: bump the minor-and-patch group with 6 updates (#121) — @supabase/supabase-js 2.112.2 -> 2.112.3, js-yaml 5.2.3 -> 5.3.0, @types/node 26.1.2 -> 26.2.0, eslint 10.8.0 -> 10.8.1, tsx 4.23.11 -> 4.23.12, typescript-eslint 8.66.0 -> 8.67.0. Carries only `pnpm-lock.yaml`. Dependabot left `package.json` untouched — every range already admitted the new versions — so this changes nothing for npm consumers, who resolve from those ranges. It matters only for the bun-compiled standalone binaries, which bake in the locked versions. `Release-As: 5.3.1` keeps the pending release PR (#120) on 5.3.1 rather than rolling it to 5.3.2. Release-please regenerates the 5.3.1 section from this commit's bullet alongside #119's three, so the changelog ends up carrying all four entries. Verified locally, because CI cannot check this branch: `pnpm install --frozen-lockfile` (the lockfile agrees with production's package.json), `pnpm lint` (0 errors, the same 32 pre-existing warnings — the eslint 10.8.1 and typescript-eslint 8.67.0 bumps add no findings), `pnpm typecheck`, `pnpm build`, and `pnpm audit --audit-level moderate` (no known vulnerabilities). The integration tests did NOT run: dcd#1036 deleted `mock-api/`, which is also what fails CI's `lint-and-test`, at a step that runs before the linter. Release-As: 5.3.1 * ci: stop reaching into the private dcd repo for the mock-api `lint-and-test` has failed on every same-repo PR since dcd#1036 deleted `mock-api/` from the private devicecloud-dev/dcd repo this morning. CI checked that directory out over an SSH deploy key and ran `pnpm install` in it; the sparse-checkout now matches nothing, so the job dies at that step — before the linter — and takes #120, #122 and #123 down with it. Rather than re-point at a mock, this removes the linkage. dcd-cli is PUBLIC and was holding `DCD_SSH_DEPLOY_KEY`, a credential granting read access to the private repo, and pulling the API's `swagger.json` onto the runner on every same-repo PR. Deleting the checkout drops both. * The `Checkout dcd (mock-api)` and `Install Mock API dependencies` steps are gone, along with the `HAS_PRIVATE_ACCESS` gate that existed only to keep them off fork and Dependabot PRs. Every PR now takes the same path, so forks stop being second-class. * CI runs `pnpm test:unit` — a new script that is the existing runner with `--unit`. `test/unit/*` is pure and needs no backend, so unit coverage is kept rather than dropped along with the integration suite. * `scripts/test-runner.mjs` no longer defaults `MOCK_API_DIR` to `../../dcd/mock-api`. With no mock available it degrades to the unit suite and says so, instead of the bare ENOENT it throws today. Set `MOCK_API_DIR` and the integration specs run exactly as before. `DCD_SSH_DEPLOY_KEY` can now be deleted from the repo's secrets — nothing reads it. That is a separate manual step, not something this commit can do. Two things are genuinely lost, both worth stating plainly rather than discovering later: * `test/integration/*` no longer runs anywhere automatically. * With it goes the CLI<->swagger contract-drift check. Drift used to surface as a Prism 422 — that is how the `googlePlay` multipart break and the `tempPath` missing-example break were both caught. Nothing replaces it yet. Verified locally: `pnpm test:unit` and a bare `pnpm test` both run the unit suite only and print the notice; 81 pass and the 7 `flow-paths` failures are Windows-only, asserting POSIX paths against win32 `path`. The same specs ran green on ubuntu in the last full CI run (job 94750122384, 2026-08-14), which is the platform CI uses. `pnpm lint`, `pnpm typecheck`, `pnpm build` and `pnpm audit --audit-level moderate` are all clean.
1 parent 36610fc commit 19ca6bf

5 files changed

Lines changed: 204 additions & 204 deletions

File tree

.github/workflows/cli-ci.yml

Lines changed: 14 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -45,37 +45,23 @@ jobs:
4545
lint-and-test:
4646
runs-on: ubuntu-latest
4747

48-
# The mock-api lives in the private devicecloud-dev/dcd repo, checked out via an
49-
# SSH deploy key. GitHub does NOT expose secrets to pull_request workflows
50-
# triggered from forks, so that checkout (and the integration tests that need
51-
# it) can only run for same-repo events. Fork PRs still run lint/typecheck/build.
48+
# This repo is PUBLIC and runs no step that reaches into the private
49+
# devicecloud-dev/dcd repo. It used to check out that repo's mock-api over an
50+
# SSH deploy key to run test/integration/*, which meant a private-repo
51+
# credential lived in a public repo's secrets and the API's OpenAPI spec was
52+
# pulled onto the runner on every same-repo PR. dcd#1036 deleted that mock-api;
53+
# rather than re-point at it, the linkage is gone.
5254
#
53-
# Dependabot PRs branch from this repo (so the fork check passes) but ALSO run
54-
# without secrets — treat them like forks and skip the private checkout, or
55-
# the mock-api clone fails with an empty DCD_SSH_DEPLOY_KEY.
56-
env:
57-
HAS_PRIVATE_ACCESS: ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && github.actor != 'dependabot[bot]' }}
58-
55+
# The consequence is deliberate: test/integration/* does NOT run here, and
56+
# neither does the swagger contract-drift check it provided (spec drift used to
57+
# surface as a Prism 422). Only test/unit/* runs — pure, no backend. To run the
58+
# integration suite locally, point MOCK_API_DIR at a mock; see CLAUDE.md.
5959
steps:
6060
- name: Checkout CLI
6161
uses: actions/checkout@v7
6262
with:
6363
path: cli
6464

65-
- name: Checkout dcd (mock-api)
66-
if: env.HAS_PRIVATE_ACCESS == 'true'
67-
uses: actions/checkout@v7
68-
with:
69-
repository: devicecloud-dev/dcd
70-
path: dcd
71-
ssh-key: ${{ secrets.DCD_SSH_DEPLOY_KEY }}
72-
# api/swagger.json is a file, which cone-mode sparse checkout rejects
73-
# as of git 2.51 ("is not a directory") — use non-cone patterns.
74-
sparse-checkout-cone-mode: false
75-
sparse-checkout: |
76-
/mock-api/
77-
/api/swagger.json
78-
7965
- name: Setup pnpm
8066
uses: pnpm/action-setup@v6.0.10
8167
with:
@@ -93,11 +79,6 @@ jobs:
9379
working-directory: ./cli
9480
run: pnpm install --frozen-lockfile
9581

96-
- name: Install Mock API dependencies
97-
if: env.HAS_PRIVATE_ACCESS == 'true'
98-
working-directory: ./dcd/mock-api
99-
run: pnpm install --frozen-lockfile
100-
10182
- name: Run CLI linter
10283
working-directory: ./cli
10384
run: pnpm lint
@@ -106,16 +87,12 @@ jobs:
10687
working-directory: ./cli
10788
run: pnpm typecheck
10889

109-
- name: Run CLI tests
110-
if: env.HAS_PRIVATE_ACCESS == 'true'
90+
- name: Run CLI unit tests
11191
working-directory: ./cli
112-
env:
113-
MOCK_API_DIR: ${{ github.workspace }}/dcd/mock-api
114-
run: pnpm test
92+
run: pnpm test:unit
11593

116-
- name: Skip integration tests (fork PR — no mock-api access)
117-
if: env.HAS_PRIVATE_ACCESS != 'true'
118-
run: echo "::notice::Integration tests skipped — the mock-api (private devicecloud-dev/dcd) is not accessible from fork PRs. Lint, typecheck, and build still ran."
94+
- name: Note skipped integration tests
95+
run: echo "::notice::Integration tests are not run in CI — they need a mock of the dcd API, and this public repo does not reach into the private one. Lint, typecheck, unit tests, build and audit all ran."
11996

12097
- name: Build CLI
12198
working-directory: ./cli

CLAUDE.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
99
- `pnpm build:binaries``scripts/build-binaries.mjs` produces the bun-compiled, self-contained `dcd-<platform>-<arch>` binaries published to GitHub Releases (the install `dcd upgrade` self-updates). The platform/arch keys must stay in sync with `ASSET_BY_PLATFORM` in `src/commands/upgrade.ts`.
1010
- `pnpm lint` — ESLint over `src/` and `test/`.
1111
- `pnpm typecheck``tsc --noEmit -p tsconfig.test.json` over `src/` and `test/` (strict mode; `pnpm build` only compiles `src/`). Requires Node `>=22`.
12-
- `pnpm test` — runs `scripts/test-runner.mjs`: builds the CLI, boots the mock API, then runs all `test/**/*.test.ts` via mocha. TypeScript is loaded by **tsx** (`.mocharc.json`'s `node-option: ["import=tsx"]`), *not* ts-node — Mocha 11 imports specs as ESM, which bypasses the `require: ts-node/register` hook. The mock API lives in the **sibling `dcd/` repo** (`../dcd/mock-api`, started via `npm run start:auth` on port 3001). Override its location with `MOCK_API_DIR=/path/to/mock-api`. The runner isolates `DCD_CONFIG_DIR` to a temp dir so tests never touch your real `dcd login` session.
13-
- Tests split into `test/unit/*` (pure, no backend) and `test/integration/*` (drive the built CLI against the mock API). Run a single test: `pnpm mocha test/integration/cloud.integration.test.ts --timeout 60000` (picks up `.mocharc.json` which wires tsx; integration specs require the mock API already running on port 3001).
12+
- `pnpm test` — runs `scripts/test-runner.mjs`: builds the CLI, boots the mock API if one is available, then runs mocha. TypeScript is loaded by **tsx** (`.mocharc.json`'s `node-option: ["import=tsx"]`), *not* ts-node — Mocha 11 imports specs as ESM, which bypasses the `require: ts-node/register` hook. The runner isolates `DCD_CONFIG_DIR` to a temp dir so tests never touch your real `dcd login` session.
13+
- `pnpm test:unit` — the same runner with `--unit`: unit specs only, no mock API. **This is what CI runs.**
14+
- Tests split into `test/unit/*` (pure, no backend) and `test/integration/*` (drive the built CLI against a Prism mock of the dcd API on port 3001).
15+
- **There is no default mock API any more.** It used to live in the sibling private `dcd/` repo; dcd#1036 deleted it, and this repo — which is public — deliberately no longer reaches into that one (no deploy key, no `swagger.json` pull). So `pnpm test` with no `MOCK_API_DIR` set **silently degrades to the unit suite** and prints a notice. To run `test/integration/*`, stand up a Prism mock over the API's `swagger.json` and point `MOCK_API_DIR=/path/to/mock-api` at it (it needs a `start:auth` npm script serving port 3001).
16+
- Consequence worth knowing: CI no longer catches **CLI↔swagger contract drift**, which used to surface as a Prism 422 from the integration specs. Nothing replaces that check yet.
17+
- Run a single test: `pnpm mocha test/integration/cloud.integration.test.ts --timeout 60000` (picks up `.mocharc.json` which wires tsx; integration specs require the mock API already running on port 3001).
1418

1519
## Entry point
1620

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
"lint": "eslint src test --ext .ts",
6767
"prepare": "pnpm build && husky",
6868
"test": "node scripts/test-runner.mjs",
69+
"test:unit": "node scripts/test-runner.mjs --unit",
6970
"typecheck": "tsc --noEmit -p tsconfig.test.json"
7071
},
7172
"version": "5.3.0",

0 commit comments

Comments
 (0)