refactor: replace lodash.template with eta
test / test (push) Failing after 3m8s

This commit is contained in:
2026-10-25 14:58:31 +03:00
parent bf9ac8a8bf
commit f45effe571
9 changed files with 789 additions and 808 deletions
+3 -3
View File
@@ -1,10 +1,10 @@
import colors from "ansi-colors";
import cp from "child_process";
import { defaults, template } from "lodash";
import path from "path";
import stream from "stream";
import util from "util";
import Vinyl from "vinyl";
import template from "../common/template";
export class Command {
private command: string;
@@ -14,7 +14,7 @@ export class Command {
constructor(command: string, options?: any) {
this.command = command;
this.isWindows = process.platform.lastIndexOf("win") === 0;
this.options = defaults(options || {}, {
this.options = Object.assign(options || {}, {
cwd: process.cwd(),
env: process.env,
verbosity: options && options.silent ? 1 : 2,
@@ -69,7 +69,7 @@ export class Command {
// execute the command.
// we spawn the command in a subshell, so things like i/o redirection
// just work. e.g. `echo hello world >> ./hello.txt` works as expected.
const command = template(this.command)({
const command = template.renderString(this.command, {
file: stdin,
});