Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/lint-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
process-compose
stack
ci
deps
repo
misc
release
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function isBodyItem(value: unknown): value is IssueFormBodyItem {
}

function issueTemplateDir() {
return resolve(process.cwd(), "../../.github/ISSUE_TEMPLATE");
return resolve(import.meta.dirname, "../../../../../.github/ISSUE_TEMPLATE");
}

function readTemplate(template: string): ReadonlyArray<IssueFormBodyItem> {
Expand Down
16 changes: 1 addition & 15 deletions apps/cli/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ function dockerfileTextPlugin() {

// Workspace packages such as @supabase/config publish a `bun` export condition
// pointing at their TypeScript source; without it, Vite falls through to `default`
// and loads the built `dist/*.js`, which can be stale or missing. Each inline
// `test.projects` entry below needs this too, since Vitest builds a separate Vite
// config per project and does not inherit it from the root config.
// and loads the built `dist/*.js`, which can be stale or missing.
const workspacePackageResolve = { conditions: [...defaultClientConditions, "bun"] };
const workspacePackageSsrResolve = { conditions: [...defaultServerConditions, "bun"] };

Expand Down Expand Up @@ -52,28 +50,19 @@ export default defineConfig({
},
projects: [
{
resolve: workspacePackageResolve,
ssr: { resolve: workspacePackageSsrResolve },
plugins: [dockerfileTextPlugin()],
test: {
Comment thread
kanadgupta marked this conversation as resolved.
Resolved
name: "unit",
include: ["**/*.unit.test.ts"],
env: { FORCE_COLOR: "1" },
},
},
{
resolve: workspacePackageResolve,
ssr: { resolve: workspacePackageSsrResolve },
plugins: [dockerfileTextPlugin()],
test: {
name: "integration",
include: ["**/*.integration.test.ts"],
},
},
{
resolve: workspacePackageResolve,
ssr: { resolve: workspacePackageSsrResolve },
plugins: [dockerfileTextPlugin()],
test: {
name: "e2e",
include: ["**/*.e2e.test.ts"],
Expand All @@ -85,9 +74,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
Expand Down
2 changes: 1 addition & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
Comment thread
kanadgupta marked this conversation as resolved.
Resolved

module.exports = {
extends: ["@commitlint/config-conventional"],
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 '!*e2e*' --project '!*live*'",
"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",
Expand Down Expand Up @@ -44,7 +45,8 @@
"turbo": "catalog:",
"typescript": "catalog:",
"verdaccio": "^6.10.0",
"vite": "^8.2.2"
"vite": "^8.2.2",
"vitest": "catalog:"
},
"devEngines": {
"packageManager": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2031,6 +2031,8 @@ describe("Effect stack lifecycle handoff", () => {
tempRoot: env.tempRoot,
platform: env.platform,
});
// bare imports in a `node -e` script resolve from cwd, so run from the package root
const cwd = path.resolve(import.meta.dirname, "../..");
const child = yield* ChildProcess.make(
process.execPath,
[
Expand All @@ -2056,7 +2058,7 @@ describe("Effect stack lifecycle handoff", () => {
`,
],
{
cwd: process.cwd(),
cwd,
env: {
OWNERSHIP_MODULE: new URL("../state/Ownership.ts", import.meta.url).href,
OWNERSHIP_STACK_ID: id,
Expand Down
5 changes: 4 additions & 1 deletion packages/stack/src/state/ownership.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -242,6 +243,8 @@ describe("stack ownership", () => {
platform: "posix",
};
const moduleUrl = new URL("./Ownership.ts", import.meta.url).href;
// bare imports in a `node -e` script resolve from cwd, so run from the package root
const cwd = path.resolve(import.meta.dirname, "../..");
const script = `
const { Effect } = await import("effect");
const { NodeServices } = await import("@effect/platform-node");
Expand All @@ -265,7 +268,7 @@ describe("stack ownership", () => {
process.execPath,
["--input-type=module", "-e", script],
{
cwd: process.cwd(),
cwd,
env: {
OWNERSHIP_MODULE: moduleUrl,
OWNERSHIP_STACK_ID: stackId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ describe("cross-process registry lease", () => {
const enteredPath = path.join(root, "child-entered");
const competingPath = path.join(root, "competing-entered");
const moduleUrl = new URL("./StackStateStore.ts", import.meta.url).href;
// bare imports in a `node -e` script resolve from cwd, so run from the package root
const cwd = path.resolve(import.meta.dirname, "../..");
const script = `
const { Effect, FileSystem } = await import("effect");
const { NodeServices } = await import("@effect/platform-node");
Expand All @@ -47,7 +49,7 @@ describe("cross-process registry lease", () => {
process.execPath,
["--input-type=module", "-e", script],
{
cwd: process.cwd(),
cwd,
env: { REGISTRY_MODULE: moduleUrl, REGISTRY_ROOT: root, ENTERED_PATH: enteredPath },
extendEnv: true,
stdout: "pipe",
Expand Down
4 changes: 3 additions & 1 deletion packages/stack/src/supervisor/handles.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,8 @@ describe("managed stack handles", { timeout: 30_000 }, () => {
const supabaseHome = path.dirname(project);
const stackModule = new URL("../public/EffectStack.ts", import.meta.url).href;
const encodedStackModule = quoteModuleSpecifier(stackModule);
// bare imports in a `node -e` script resolve from cwd, so run from the package root
const cwd = path.resolve(import.meta.dirname, "../..");
const script = `
const { Effect } = await import("effect");
const { NodeServices } = await import("@effect/platform-node");
Expand All @@ -777,7 +779,7 @@ describe("managed stack handles", { timeout: 30_000 }, () => {
process.execPath,
["--input-type=module", "-e", script, project],
{
cwd: process.cwd(),
cwd,
env: { SUPABASE_HOME: supabaseHome },
extendEnv: true,
stdout: "pipe",
Expand Down
Loading
Loading