Skip to content

Commit 9258c71

Browse files
committed
Fix formatting
1 parent fffd5b9 commit 9258c71

File tree

6 files changed

+30
-31
lines changed

6 files changed

+30
-31
lines changed

.github/workflows/verify.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,13 @@ jobs:
2626
uses: denoland/setup-deno@v2
2727
with:
2828
deno-version: v2.x
29+
- name: reload dependencies
30+
run: deno cache --reload **/mod.ts
2931

30-
# - name: reload dependencies
31-
# run: deno cache --reload **/mod.ts
32+
- run: deno check tasks/*.ts
3233

33-
# - run: deno check tasks/*.ts
34+
- run: deno fmt --check
3435

35-
# - run: deno fmt --check
36+
- run: deno lint
3637

37-
# - run: deno lint
38-
39-
- run: deno test --trace-leaks --allow-net --allow-read --allow-write --allow-env --allow-run --allow-ffi
38+
- run: deno test --allow-net --allow-read --allow-write --allow-env --allow-run --allow-ffi

process/src/exec/posix.ts

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
import { spawn as spawnProcess } from "node:child_process";
22
import {
3-
all,
3+
all,
44
createSignal,
55
Err,
66
Ok,
7-
race,
87
type Result,
98
sleep,
109
spawn,
1110
withResolvers,
1211
} from "effection";
1312
import process from "node:process";
1413
import { once } from "../eventemitter.ts";
15-
import { box, useReadable } from "../helpers.ts";
14+
import { useReadable } from "../helpers.ts";
1615
import type { CreateOSProcess, ExitStatus, Writable } from "./api.ts";
1716
import { ExecError } from "./error.ts";
1817

@@ -53,20 +52,20 @@ export const createPosixProcess: CreateOSProcess = function* createPosixProcess(
5352
stderrDone: withResolvers<void>(),
5453
};
5554

56-
yield* spawn(function*() {
57-
yield* once(childProcess.stdout, 'readable');
55+
yield* spawn(function* () {
56+
yield* once(childProcess.stdout, "readable");
5857
console.log("posix > stdout is readable");
5958
io.stdoutReady.resolve();
60-
yield* once(childProcess.stdout, 'end');
59+
yield* once(childProcess.stdout, "end");
6160
console.log("posix > stdout is done");
6261
io.stdoutDone.resolve();
6362
});
6463

65-
yield* spawn(function*() {
66-
yield* once(childProcess.stderr, 'readable');
64+
yield* spawn(function* () {
65+
yield* once(childProcess.stderr, "readable");
6766
console.log("posix > stderr is readable");
6867
io.stderrReady.resolve();
69-
yield* once(childProcess.stderr, 'end');
68+
yield* once(childProcess.stderr, "end");
7069
console.log("posix > err is done");
7170
io.stderrDone.resolve();
7271
});
@@ -103,11 +102,15 @@ export const createPosixProcess: CreateOSProcess = function* createPosixProcess(
103102
childProcess.stdin.write(data);
104103
},
105104
};
106-
105+
107106
yield* spawn(function* () {
108107
try {
109108
let value = yield* once<ProcessResultValue>(childProcess, "close");
110-
yield* all([io.stdoutReady.operation, io.stderrReady.operation, sleep(1)]);
109+
yield* all([
110+
io.stdoutReady.operation,
111+
io.stderrReady.operation,
112+
sleep(1),
113+
]);
111114
processResult.resolve(Ok(value));
112115
} finally {
113116
try {

process/src/exec/win32.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,10 @@ export const createWin32Process: CreateOSProcess = function* createWin32Process(
7373
});
7474

7575
yield* spawn(function* trapError() {
76-
const [error] = yield* once<Error[]>(childProcess, "error");
76+
const [error] = yield* once<Error[]>(childProcess, "error");
7777
processResult.resolve(Err(error));
7878
});
7979

80-
8180
let stdin: Writable<string> = {
8281
send(data: string) {
8382
childProcess.stdin.write(data);

process/test/daemon.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ describe("daemon", () => {
1919
task = yield* spawn<void>(function* () {
2020
let proc = yield* daemon("deno", {
2121
arguments: ["run", "-A", "./fixtures/echo-server.ts"],
22-
env: {
23-
PORT: "29000",
22+
env: {
23+
PORT: "29000",
2424
PATH: process.env.PATH as string,
25-
... SystemRoot ? { SystemRoot } : {}
25+
...SystemRoot ? { SystemRoot } : {},
2626
},
2727
cwd: import.meta.dirname,
2828
});
@@ -69,10 +69,10 @@ describe("daemon", () => {
6969
beforeEach(function* () {
7070
let proc = yield* daemon("deno", {
7171
arguments: ["run", "-A", "./fixtures/echo-server.ts"],
72-
env: {
73-
PORT: "29000",
72+
env: {
73+
PORT: "29000",
7474
PATH: process.env.PATH as string,
75-
... SystemRoot ? { SystemRoot } : {}
75+
...SystemRoot ? { SystemRoot } : {},
7676
},
7777
cwd: import.meta.dirname,
7878
});

watch/test/watch.test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function* useFixture(): Operation<Fixture> {
113113
try {
114114
yield* until(emptyDir(tmpDir));
115115
} catch (e) {
116-
console.log(`Encountered error clearing ${tmpDir}`)
116+
console.log(`Encountered error clearing ${tmpDir}`);
117117
console.error(e);
118118
}
119119

@@ -126,8 +126,8 @@ function* useFixture(): Operation<Fixture> {
126126
}),
127127
);
128128
} catch (e) {
129-
console.log(`Encountered error copying from ${fixtureDir} to ${tmpDir}`)
130-
console.error(e)
129+
console.log(`Encountered error copying from ${fixtureDir} to ${tmpDir}`);
130+
console.error(e);
131131
}
132132

133133
return {
@@ -198,7 +198,6 @@ function* inspector(stream: Stream<Start, never>) {
198198
yield* sleep(10);
199199
expected = starts.length;
200200
let result = inspector.starts[inspector.starts.length - 1];
201-
console.log(result)
202201
if (result.ok) {
203202
return result.value;
204203
} else {

watch/watch.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ export function watch(options: WatchOptions): Stream<Start, never> {
120120
}
121121
let [, path] = args;
122122
if (fresh(500)(args) && !gitignored(path)) {
123-
console.log(`received updated: ${JSON.stringify(args)}`)
124123
input.send(args);
125124
}
126125
});

0 commit comments

Comments
 (0)