From 0ba18b60398fc061dc29c4fb0bd5f4977ca1f25c Mon Sep 17 00:00:00 2001 From: Akalanka Perera Date: Sun, 28 Jul 2024 00:37:18 +0530 Subject: [PATCH] Patch(timekeeper): updated dependencies --- packages/timekeeper/package.json | 1 + packages/timekeeper/src/runner.js | 11 ++--------- pnpm-lock.yaml | 11 +++++++++++ 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/packages/timekeeper/package.json b/packages/timekeeper/package.json index 1f438a5..88a0fdc 100644 --- a/packages/timekeeper/package.json +++ b/packages/timekeeper/package.json @@ -15,6 +15,7 @@ "dependencies": { "@babel/preset-env": "7.25.0", "@colors/colors": "1.5.0", + "@sliit-foss/actions-exec-wrapper": "1.1.2", "@sliit-foss/babel-plugin-transform-trace": "0.3.0", "@sliit-foss/functions": "2.7.0", "commander": "11.1.0" diff --git a/packages/timekeeper/src/runner.js b/packages/timekeeper/src/runner.js index c6da86f..eca2a4e 100644 --- a/packages/timekeeper/src/runner.js +++ b/packages/timekeeper/src/runner.js @@ -2,9 +2,7 @@ import { default as fs } from "fs"; import { default as path } from "path"; -import { default as util } from "util"; - -const exec = util.promisify(require("child_process").exec); +import { default as exec } from "@sliit-foss/actions-exec-wrapper"; const config = { presets: ["@babel/preset-env"], @@ -19,12 +17,7 @@ const runner = async (p, options) => { "clean": options.clean ?? false }); fs.writeFileSync(configPath, `module.exports = ${JSON.stringify(config)}`); - await exec(`npx -p @babel/core@7 -p @babel/node@7 babel-node --config-file=${configPath} ${p}`).then( - ({ stdout, stderr }) => { - if (stdout) console.log(stdout); - if (stderr) console.error(stderr.red); - } - ); + await exec(`npx -p @babel/core@7 -p @babel/node@7 babel-node --config-file=${configPath} ${p}`); }; export default runner; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 42bfa1e..5f197a4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -183,6 +183,9 @@ importers: "@colors/colors": specifier: 1.5.0 version: 1.5.0 + "@sliit-foss/actions-exec-wrapper": + specifier: 1.1.2 + version: 1.1.2 "@sliit-foss/babel-plugin-transform-trace": specifier: 0.3.0 version: 0.3.0(@babel/core@7.24.7)(@sliit-foss/functions@2.7.0) @@ -1913,6 +1916,10 @@ packages: resolution: { integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA== } + "@sliit-foss/actions-exec-wrapper@1.1.2": + resolution: + { integrity: sha512-KuRHjtybPS5Y+5oH6n7T4QkTqpcvFcsr4QKo8iObC4HQALnNFeRFwaZNyJGkJ9QR4gDR58wv8QX9NmhRafZ3XQ== } + "@sliit-foss/babel-plugin-transform-trace@0.3.0": resolution: { integrity: sha512-nJhtwmG+uI7Y0r6n+tU4GoQBED8uu7jXXjqCbjDVKJRm49ELSC4TxN+vkJ1o+zHBEiPn8yl6rm2LgT9wXufrtQ== } @@ -8194,6 +8201,10 @@ snapshots: dependencies: "@sinonjs/commons": 3.0.1 + "@sliit-foss/actions-exec-wrapper@1.1.2": + dependencies: + "@actions/exec": 1.1.1 + "@sliit-foss/babel-plugin-transform-trace@0.3.0(@babel/core@7.24.7)(@sliit-foss/functions@2.7.0)": dependencies: "@babel/core": 7.24.7