Skip to content

Commit 892b8e7

Browse files
authored
Merge branch 'develop' into 7ttp/cli-2270-ssl-enforcement-command-family-coverage
2 parents 31a1085 + 1f85d4b commit 892b8e7

11 files changed

Lines changed: 975 additions & 718 deletions

File tree

.github/actions/setup/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ runs:
1919
using: "composite"
2020
steps:
2121
- name: Install toolchains
22-
uses: jdx/mise-action@e6a8b3978addb5a52f2b4cd9d91eafa7f0ab959d # v4
22+
uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4.3.0
2323
with:
24-
version: 2026.7.0
24+
version: 2026.9.0
2525

2626
- name: Resolve pnpm store path
2727
if: inputs.dependency-cache == 'true'

.github/workflows/cli-go-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ jobs:
9191
with:
9292
persist-credentials: false
9393

94-
- uses: jdx/mise-action@3c2e0cf82a5b2e5249f0d3635a4d83d0ae861518 # v4
94+
- uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4.3.0
9595
with:
96-
version: 2026.7.0
96+
version: 2026.9.0
9797
install: true
9898
install_args: >-
9999
go

.github/workflows/publish-preview-cli-packages.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ jobs:
131131
PREVIEW_URL: ${{ steps.preview-metadata.outputs.preview_url }}
132132
run: |
133133
set -euo pipefail
134+
# Run outside the checkout: npm enforces the root package.json's
135+
# devEngines.packageManager (pnpm) against itself and would refuse.
136+
cd "${RUNNER_TEMP}"
134137
npx --yes "${PREVIEW_URL}" --version
135138
136139
comment:

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24

CONTRIBUTING.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ See the [`mise` installation docs](https://mise.jdx.dev/getting-started.html) fo
3434

3535
`mise` needs to hook into your shell so it can inject the right tool versions into your `PATH` as you move between directories. Follow the `mise activate` instructions [in this section](https://mise.jdx.dev/getting-started.html#activate-mise) to add the activation line for your shell to its startup file.
3636

37-
This repo relies on `mise` support for reading Node and pnpm versions from `package.json`, so use mise `2026.7.0` or newer.
38-
3937
#### Installing the pinned tool versions
4038

4139
Trust this repo's `mise.toml` once from the repo root so `mise` can read the project setting that enables idiomatic version files:
@@ -52,21 +50,21 @@ mise install
5250

5351
`mise install` resolves the versions this repo expects from a handful of files, rather than hardcoding them all in one place:
5452

55-
| Tool | Version source |
56-
| ------------- | -------------------------------------------- |
57-
| Bun | `.bun-version` |
58-
| Node.js | `devEngines.runtime` field in `package.json` |
59-
| pnpm | `packageManager` field in `package.json` |
60-
| Go | `mise.toml` |
61-
| golangci-lint | `mise.toml` |
53+
| Tool | Version source |
54+
| ------------- | --------------------------------------------------- |
55+
| Bun | `.bun-version` |
56+
| Node.js | `.node-version` |
57+
| pnpm | `devEngines.packageManager` field in `package.json` |
58+
| Go | `mise.toml` |
59+
| golangci-lint | `mise.toml` |
6260

6361
The Go and golangci-lint entries in `mise.toml` are intentionally temporary while the Go CLI remains in the repo. The canonical Go module metadata still lives in `apps/cli-go/go.mod`; keep the `mise.toml` entries aligned only until the Go code is removed.
6462

6563
Once installed, `mise` activates these versions automatically whenever your shell is inside this repo — no manual `nvm use`, `gvm use`, or similar switching required.
6664

6765
#### Without mise
6866

69-
`mise` is not required. If you already have Bun, Node, pnpm, and Go installed and managed some other way, just make sure your versions match the ones pinned in `.bun-version`, `mise.toml`, `package.json`, and `apps/cli-go/go.mod`.
67+
`mise` is not required. If you already have Bun, Node, pnpm, and Go installed and managed some other way, just make sure your versions match the ones pinned in `.bun-version`, `.node-version`, `mise.toml`, `package.json`, and `apps/cli-go/go.mod`.
7068

7169
### Install dependencies
7270

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { type ConfigChangeClass, projectConfigMappingRows } from "@supabase/config/internal";
12
import { expect } from "vitest";
23

34
import { requireLiveSuccess, test } from "../../../../../tests/helpers/live.ts";
@@ -8,18 +9,36 @@ import { requireLiveSuccess, test } from "../../../../../tests/helpers/live.ts";
89
// in diff.integration.test.ts. The `workspace` fixture behind `cli` is a
910
// fresh `supabase init` project directory.
1011
test("diffs a freshly-initialized config against the project", async ({ cli, project }) => {
11-
const result = await cli(["config", "diff", "--project-ref", project.ref]);
12-
expect(`${result.stdout}${result.stderr}`).not.toContain("Unauthorized");
13-
expect(result.stderr).toContain(`Comparing against project ${project.ref} using base config`);
14-
expect(result.stderr).toContain("Comparison scope:");
15-
// The GoTrue-keyed auth record — the one surface mocks cannot prove — must
16-
// classify CLEANLY against a fresh config: the platform's reports of
17-
// unconfigured state (session zeros canonicalized to "0s" via
18-
// unconfiguredValue, platform-rendered mailer subjects via platformRendered,
19-
// disabled notification toggles) are suppressed by the registry's declared
20-
// baselines, not flagged as drift. Asserting only exit 0 here would let that noise through silently.
21-
const authChangeLines = result.stdout.split("\n").filter((line) => line.startsWith("auth."));
22-
expect(authChangeLines, result.stdout).toEqual([]);
12+
const result = await cli([
13+
"config",
14+
"diff",
15+
"--project-ref",
16+
project.ref,
17+
"--output-format",
18+
"json",
19+
]);
2320
// Read-only success regardless of drift (no --exit-code passed).
2421
requireLiveSuccess(result, "config diff");
22+
expect(result.stderr).toContain(`Comparing against project ${project.ref} using base config`);
23+
const payload = JSON.parse(result.stdout) as {
24+
scope: { present: string[] };
25+
changes: Array<{ path: string[]; class: ConfigChangeClass }>;
26+
};
27+
expect(payload.scope.present).toContain("auth");
28+
const changes = payload.changes.map(({ path, class: kind }) => ({ path: path.join("."), kind }));
29+
const classified = changes.map((change) => `${change.path} [${change.kind}]`).join("\n");
30+
// A fresh project legitimately drifts from the init template (confirmations,
31+
// TOTP, site URL), so remote auth values must reach classification, while
32+
// the registry's declared baselines suppress the platform's own defaults.
33+
expect(
34+
changes.some((change) => change.path.startsWith("auth.") && change.kind !== "local_only"),
35+
classified,
36+
).toBe(true);
37+
const baselines = projectConfigMappingRows
38+
.filter((row) => row.unconfiguredValue !== undefined || row.platformRendered === true)
39+
.map((row) => row.configPath.join("."));
40+
expect(
41+
changes.filter((change) => baselines.includes(change.path)),
42+
classified,
43+
).toEqual([]);
2544
});

mise.lock

Lines changed: 58 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mise.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
min_version = '2026.7.0'
1+
min_version = '2026.9.0'
22

33
[tools]
44
go = "1.26.5"

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@
4242
"verdaccio": "^6.10.0"
4343
},
4444
"devEngines": {
45-
"runtime": {
46-
"name": "node",
47-
"version": "24"
45+
"packageManager": {
46+
"name": "pnpm",
47+
"version": "12.3.0",
48+
"onFail": "error"
4849
}
49-
},
50-
"packageManager": "pnpm@11.4.0"
50+
}
5151
}

0 commit comments

Comments
 (0)