-
Notifications
You must be signed in to change notification settings - Fork 523
chore(repo): bump vitest, add smol top-level vitest config #6567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
cc02729
8105288
0c84451
306048f
7a56032
f5e681c
caeb4fe
82a2c92
94da32f
697206f
e6228e4
6ee8843
dd5371b
786b3bf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,7 +54,6 @@ export default defineConfig({ | |
| { | ||
| resolve: workspacePackageResolve, | ||
| ssr: { resolve: workspacePackageSsrResolve }, | ||
| plugins: [dockerfileTextPlugin()], | ||
| test: { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 MINOR · The per-project Dockerfile loader was removed even though the retained configuration says inline projects do not inherit root Vite configuration. Evidence: apps/cli/vitest.config.ts:19-23 documents non-inheritance; lines 55-56, 64-65, 72-73, and 85-86 still duplicate root resolve settings, but dockerfileTextPlugin now appears only at line 30. Dockerfile text imports remain at apps/cli/src/shared/services/dockerfile-images.ts:1 and apps/cli/src/shared/services/services.shared.unit.test.ts:4. Suggested fix: If Vitest 5 still does not inherit root plugins, restore the plugin to each project. If inheritance changed, remove the obsolete duplication and update the comment. |
||
| name: "unit", | ||
| include: ["**/*.unit.test.ts"], | ||
|
|
@@ -64,7 +63,6 @@ export default defineConfig({ | |
| { | ||
| resolve: workspacePackageResolve, | ||
| ssr: { resolve: workspacePackageSsrResolve }, | ||
| plugins: [dockerfileTextPlugin()], | ||
| test: { | ||
| name: "integration", | ||
| include: ["**/*.integration.test.ts"], | ||
|
|
@@ -73,7 +71,6 @@ export default defineConfig({ | |
| { | ||
| resolve: workspacePackageResolve, | ||
| ssr: { resolve: workspacePackageSsrResolve }, | ||
| plugins: [dockerfileTextPlugin()], | ||
| test: { | ||
| name: "e2e", | ||
| include: ["**/*.e2e.test.ts"], | ||
|
|
@@ -87,7 +84,6 @@ export default defineConfig({ | |
| { | ||
| resolve: workspacePackageResolve, | ||
| ssr: { resolve: workspacePackageSsrResolve }, | ||
| plugins: [dockerfileTextPlugin()], | ||
| test: { | ||
| // Live tests run against one provisioned project on the configured | ||
| // platform. They are never part of the default unit/integration/e2e | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,7 @@ const PROJECT_SCOPES = [ | |
| // Non-project changes that don't map to a single turbo project. `release` | ||
| // isn't a turbo project (tools/release has no package.json) but is a real | ||
| // scope emitted by the automated release-notes-proposal commit. | ||
| const ESCAPE_SCOPES = ["ci", "repo", "misc", "release"]; | ||
| const ESCAPE_SCOPES = ["ci", "deps", "repo", "misc", "release"]; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 MINOR · The new deps scope passes commitlint but remains rejected by the pull-request title check. Evidence: commitlint.config.js:16 adds deps, but .github/workflows/lint-pull-request.yml:47-62 says its scope list mirrors commitlint and omits deps. trusted/CLAUDE.md:149-151 requires these lists to remain synchronized. Suggested fix: Add deps to the workflow's scopes list. |
||
|
|
||
| module.exports = { | ||
| extends: ["@commitlint/config-conventional"], | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,6 +13,7 @@ | |
| "test:unit": "pnpm exec turbo run test:unit:run --filter=!@supabase/cli-go --", | ||
| "test:integration": "pnpm exec turbo run test:integration:run --", | ||
| "test:e2e": "pnpm exec turbo run supabase#build && pnpm exec turbo run test:e2e:run --only --concurrency=1 --", | ||
| "test:vitest": "bun --bun vitest run --project '!supabase (live)'", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 MINOR · The aggregate test:vitest script includes E2E projects but bypasses their required CLI build. Evidence: package.json:16 excludes only supabase (live), while vitest.config.mts:5 loads all package configurations. apps/cli/vitest.config.ts:71-82 defines an e2e project, apps/cli-e2e/vitest.config.ts:5-13 is also E2E, and turbo.json:126-135 gives both E2E tasks a supabase#build dependency. packages/cli-test-helpers/src/harness.ts:95-112 explicitly fails when CLI artifacts are absent. Suggested fix: Build supabase before invoking Vitest, or exclude E2E projects from this aggregate script. |
||
| "check:all": "pnpm exec turbo run types:check lint:check fmt:check knip:check lint:effect:check", | ||
| "fix:all": "pnpm exec turbo run lint:fix fmt:fix knip:fix && pnpm run lint:effect:fix", | ||
| "lint:check": "oxlint --config .oxlintrc.json", | ||
|
|
@@ -44,7 +45,8 @@ | |
| "turbo": "catalog:", | ||
| "typescript": "catalog:", | ||
| "verdaccio": "^6.10.0", | ||
| "vite": "^8.2.2" | ||
| "vite": "^8.2.2", | ||
| "vitest": "catalog:" | ||
| }, | ||
| "devEngines": { | ||
| "packageManager": { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -230,6 +230,7 @@ describe("stack ownership", () => { | |
| Effect.gen(function* () { | ||
| if (process.platform === "win32") return yield* Effect.void; | ||
| const fs = yield* FileSystem.FileSystem; | ||
| const path = yield* Path.Path; | ||
| const root = yield* fs.makeTempDirectoryScoped({ prefix: "supabase-stack-crash-" }); | ||
| const childIdentity = { | ||
| ...identity, | ||
|
|
@@ -242,6 +243,8 @@ describe("stack ownership", () => { | |
| platform: "posix", | ||
| }; | ||
| const moduleUrl = new URL("./Ownership.ts", import.meta.url).href; | ||
| // set the root to `packages/stack` root | ||
| const cwd = path.resolve(import.meta.dirname, "../.."); | ||
| const script = ` | ||
| const { Effect } = await import("effect"); | ||
| const { NodeServices } = await import("@effect/platform-node"); | ||
|
|
@@ -265,7 +268,7 @@ describe("stack ownership", () => { | |
| process.execPath, | ||
| ["--input-type=module", "-e", script], | ||
| { | ||
| cwd: process.cwd(), | ||
| cwd: cwd, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ⚪ NIT · This new call site uses cwd: cwd while the equivalent sibling changes use property shorthand. Evidence: packages/stack/src/state/ownership.integration.test.ts:271 uses cwd: cwd; the new call sites at registry-lease.integration.test.ts:52, handles.integration.test.ts:782, and effect-stack.integration.test.ts:2006 use cwd shorthand. Suggested fix: Change the property to cwd,. |
||
| env: { | ||
| OWNERSHIP_MODULE: moduleUrl, | ||
| OWNERSHIP_STACK_ID: stackId, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚪ NIT ·
comments· source: claude+codexThe newly added cwd comments narrate the following assignments instead of explaining non-obvious rationale.
Evidence: The comment at apps/cli/src/commands/experimental/stack/start/start.e2e.test.ts:52 merely describes line 53. Equivalent narration appears at packages/stack/src/public/effect-stack.integration.test.ts:1979, state/ownership.integration.test.ts:246, state/registry-lease.integration.test.ts:35, and supervisor/handles.integration.test.ts:761. trusted/CLAUDE.md:121-144 explicitly rejects code narration.
Suggested fix: Remove the comments or replace them with the reason the child process must run from the package root.