Skip to content

Commit

Permalink
refactor: optimzie
Browse files Browse the repository at this point in the history
  • Loading branch information
zanminkian committed Apr 21, 2024
1 parent 189a2f0 commit 59b302c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"devDependencies": {
"@changesets/cli": "2.27.1",
"git-validator": "0.15.13",
"git-validator": "0.16.0",
"typescript": "5.4.5",
"vitest": "1.5.0"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/tscx/src/cmd/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { spawn } from "node:child_process";
import childProcess from "node:child_process";
import path from "node:path";
import process from "node:process";
import { fileURLToPath } from "node:url";
Expand All @@ -15,7 +15,7 @@ const TSC_PATH = path.resolve(
);

function spawnNode(...args: string[]) {
return spawn("node", args, { stdio: "inherit" });
return childProcess.spawn("node", args, { stdio: "inherit" });
}

export function remove(filepath: string) {
Expand Down
4 changes: 2 additions & 2 deletions packages/tscx/src/compiler.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// this file should not have `async` and `await`
import childProcess, { type ChildProcess } from "node:child_process";
import childProcess from "node:child_process";
import path from "node:path";
import process from "node:process";
import type ts from "typescript";
Expand All @@ -21,7 +21,7 @@ export interface TsConfig {

export class Compiler {
private id = "";
private currentSubprocess?: ChildProcess;
private currentSubprocess?: childProcess.ChildProcess;
private tsconfig: TsConfig;

constructor(private readonly options: CompilerOptions) {
Expand Down

0 comments on commit 59b302c

Please sign in to comment.