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 oxlint-plugin-t3code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"devDependencies": {
"@effect/language-service": "catalog:",
"@effect/vitest": "catalog:",
"@t3tools/shared": "workspace:*",
"@types/bun": "catalog:",
"typescript": "catalog:",
"vite-plus": "catalog:",
Expand Down
7 changes: 6 additions & 1 deletion oxlint-plugin-t3code/test/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as NodeServices from "@effect/platform-node/NodeServices";
import { resolveWindowsSpawn } from "@t3tools/shared/shell";
import { assert, it } from "@effect/vitest";
import * as Data from "effect/Data";
import * as Effect from "effect/Effect";
Expand Down Expand Up @@ -112,8 +113,12 @@ export const createOxlintRuleHarness = (
);
yield* fs.writeFileString(sourcePath, source);

const spawn = resolveWindowsSpawn(oxlintBin);
const output = yield* spawnAndCollectOutput(
ChildProcess.make(oxlintBin, ["--config", configPath, sourcePath], { cwd: repoRoot }),
ChildProcess.make(spawn.command, ["--config", configPath, sourcePath], {
cwd: repoRoot,
shell: spawn.shell,
}),
);

if (output.exitCode !== 0) {
Expand Down
1 change: 1 addition & 0 deletions packages/effect-acp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"@effect/openapi-generator": "catalog:",
"@effect/platform-node": "catalog:",
"@effect/vitest": "catalog:",
"@t3tools/shared": "workspace:*",
"@types/node": "catalog:",
"typescript": "catalog:",
"vite-plus": "catalog:",
Expand Down
6 changes: 4 additions & 2 deletions packages/effect-acp/src/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import * as Stream from "effect/Stream";
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";

import * as NodeServices from "@effect/platform-node/NodeServices";
import { resolveWindowsSpawn } from "@t3tools/shared/shell";
import { it, assert } from "@effect/vitest";

import * as AcpClient from "./client.ts";
Expand All @@ -34,9 +35,10 @@ it.layer(NodeServices.layer)("effect-acp client", (it) => {
Effect.gen(function* () {
const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
const path = yield* Path.Path;
const command = ChildProcess.make("bun", ["run", yield* mockPeerPath], {
const spawn = resolveWindowsSpawn("bun");
const command = ChildProcess.make(spawn.command, ["run", yield* mockPeerPath], {
cwd: path.join(import.meta.dirname, ".."),
shell: process.platform === "win32",
shell: spawn.shell,
...(env ? { env: { ...process.env, ...env } } : {}),
});
return yield* spawner.spawn(command);
Expand Down
6 changes: 4 additions & 2 deletions packages/effect-acp/src/protocol.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";

import { it, assert } from "@effect/vitest";
import * as NodeServices from "@effect/platform-node/NodeServices";
import { resolveWindowsSpawn } from "@t3tools/shared/shell";

import * as AcpSchema from "./_generated/schema.gen.ts";
import * as AcpProtocol from "./protocol.ts";
Expand Down Expand Up @@ -58,9 +59,10 @@ const makeHandle = (env?: Record<string, string>) =>
Effect.gen(function* () {
const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
const path = yield* Path.Path;
const command = ChildProcess.make("bun", ["run", yield* mockPeerPath], {
const spawn = resolveWindowsSpawn("bun");
const command = ChildProcess.make(spawn.command, ["run", yield* mockPeerPath], {
cwd: path.join(import.meta.dirname, ".."),
shell: process.platform === "win32",
shell: spawn.shell,
...(env ? { env: { ...process.env, ...env } } : {}),
});
return yield* spawner.spawn(command);
Expand Down
1 change: 1 addition & 0 deletions packages/effect-codex-app-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"@effect/openapi-generator": "catalog:",
"@effect/platform-node": "catalog:",
"@effect/vitest": "catalog:",
"@t3tools/shared": "workspace:*",
"@types/node": "catalog:",
"typescript": "catalog:",
"vite-plus": "catalog:",
Expand Down
10 changes: 7 additions & 3 deletions packages/effect-codex-app-server/src/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import * as Scope from "effect/Scope";
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";

import * as NodeServices from "@effect/platform-node/NodeServices";
import { resolveWindowsSpawn } from "@t3tools/shared/shell";
import { assert, it } from "@effect/vitest";

import * as CodexClient from "./client.ts";
Expand All @@ -20,9 +21,10 @@ it.layer(NodeServices.layer)("effect-codex-app-server client", (it) => {
Effect.gen(function* () {
const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
const path = yield* Path.Path;
const command = ChildProcess.make("bun", ["run", yield* mockPeerPath], {
const spawn = resolveWindowsSpawn("bun");
const command = ChildProcess.make(spawn.command, ["run", yield* mockPeerPath], {
cwd: path.join(import.meta.dirname, ".."),
shell: process.platform === "win32",
shell: spawn.shell,
});
return yield* spawner.spawn(command);
});
Expand Down Expand Up @@ -126,10 +128,12 @@ it.layer(NodeServices.layer)("effect-codex-app-server client", (it) => {
Effect.gen(function* () {
const path = yield* Path.Path;
const scope = yield* Scope.make();
const spawn = resolveWindowsSpawn("bun");
const clientLayer = CodexClient.layerCommand({
command: "bun",
command: spawn.command,
args: ["run", yield* mockPeerPath],
cwd: path.join(import.meta.dirname, ".."),
shell: spawn.shell,
});
const context = yield* Layer.buildWithScope(clientLayer, scope);

Expand Down
9 changes: 9 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading