Skip to content

Commit

Permalink
chore: upgrade execa (#7552)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCalzone authored Jan 14, 2025
1 parent f53c080 commit 2accbab
Show file tree
Hide file tree
Showing 13 changed files with 183 additions and 137 deletions.
4 changes: 2 additions & 2 deletions maintenance/build.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import execa from "execa";
import { type Options as ExecaOptions, execa } from "execa";

const project = process.argv[2] ?? "all";
const buildArgs = process.argv
Expand Down Expand Up @@ -29,7 +29,7 @@ const dependsOnZwaveJs = [
// And CLI in the future
];

const execOptions: execa.Options<string> = {
const execOptions: ExecaOptions = {
stdio: "inherit",
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"eslint": "^9.18.0",
"eslint-plugin-unicorn": "^56.0.1",
"eslint-plugin-unused-imports": "patch:eslint-plugin-unused-imports@npm%3A4.1.4#~/.yarn/patches/eslint-plugin-unused-imports-npm-4.1.4-a7d7c7cdf3.patch",
"execa": "^5.1.1",
"execa": "^9.5.2",
"husky": "^9.1.6",
"json5": "^2.2.3",
"jsonc-eslint-parser": "^2.4.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"json5": "^2.2.3",
"pathe": "^2.0.1",
"semver": "^7.6.3",
"winston": "^3.15.0"
"winston": "^3.17.0"
},
"devDependencies": {
"@alcalzone/esm2cjs": "^1.4.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,15 @@
"ansi-colors": "^4.1.3",
"dayjs": "^1.11.13",
"fflate": "^0.8.2",
"logform": "^2.6.1",
"logform": "^2.7.0",
"nrf-intel-hex": "^1.4.0",
"pathe": "^2.0.1",
"reflect-metadata": "^0.2.2",
"semver": "^7.6.3",
"triple-beam": "*",
"winston": "^3.15.0",
"winston": "^3.17.0",
"winston-daily-rotate-file": "^5.0.0",
"winston-transport": "^4.8.0"
"winston-transport": "^4.9.0"
},
"devDependencies": {
"@alcalzone/esm2cjs": "^1.4.1",
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/log/Colorizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ export const colorizer = format(
info: ZWaveLogInfo,
_opts: ColorizerOptions,
) => {
const textColor = (colors as any)[defaultColors[info.level] as string];
const bgColor = (colors as any)[
getBgColorName(defaultColors[info.level] as string)
];
const levelColorKey =
defaultColors[info.level as keyof typeof defaultColors] as string;
const textColor = (colors as any)[levelColorKey];
const bgColor = (colors as any)[getBgColorName(levelColorKey)];
// Colorize all segments separately
if (typeof info.message === "string") {
info.message = colorizeTextAndTags(
Expand Down
2 changes: 1 addition & 1 deletion packages/maintenance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"del-cli": "^6.0.0",
"dprint": "^0.48.0",
"es-main": "^1.3.0",
"execa": "^5.1.1",
"execa": "^9.5.2",
"globrex": "^0.1.2",
"json5": "^2.2.3",
"piscina": "^4.7.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/maintenance/src/resolveDirtyTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import esMain from "es-main";
import execa from "execa";
import { execa } from "execa";
import crypto from "node:crypto";
import fs from "node:fs";
import path from "node:path";
Expand Down
2 changes: 1 addition & 1 deletion packages/serial/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"@zwave-js/shared": "workspace:*",
"alcalzone-shared": "^5.0.0",
"serialport": "^12.0.0",
"winston": "^3.15.0"
"winston": "^3.17.0"
},
"devDependencies": {
"@alcalzone/esm2cjs": "^1.4.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@
"triple-beam": "*",
"tsx": "^4.19.2",
"typescript": "5.7.3",
"winston-transport": "^4.8.0"
"winston-transport": "^4.9.0"
}
}
2 changes: 1 addition & 1 deletion packages/transformers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"devDependencies": {
"cpy-cli": "^5.0.0",
"del-cli": "^6.0.0",
"execa": "^5.1.1",
"execa": "^9.5.2",
"ts-morph": "^25.0.0",
"tsutils": "^3.21.0",
"typescript": "5.7.3",
Expand Down
5 changes: 3 additions & 2 deletions packages/transformers/src/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import execa from "execa";
import fs from "node:fs/promises";
import path from "node:path";
import { beforeAll, test } from "vitest";
Expand All @@ -7,6 +6,7 @@ const fixturesDir = path.join(__dirname, "../test/fixtures");
const files: string[] = [];

beforeAll(async (t) => {
const { execa } = await import("execa");
await execa("yarn", ["run", "pretest"], { cwd: __dirname });
const jsFiles = (await fs.readdir(fixturesDir)).filter(
(f) =>
Expand All @@ -18,9 +18,10 @@ beforeAll(async (t) => {
}, 360000);

test("run fixtures", async (t) => {
const { execaNode } = await import("execa");
for (const file of files) {
try {
await execa.node(path.join(fixturesDir, file));
await execaNode(path.join(fixturesDir, file));
} catch (e: any) {
throw new Error(`${file} failed to run: ${e.stack}`);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/zwave-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"semver": "^7.6.3",
"serialport": "^12.0.0",
"source-map-support": "^0.5.21",
"winston": "^3.15.0"
"winston": "^3.17.0"
},
"devDependencies": {
"@alcalzone/esm2cjs": "^1.4.1",
Expand Down
Loading

0 comments on commit 2accbab

Please sign in to comment.