From 064eb43ab2833a22466276570148061846ccc677 Mon Sep 17 00:00:00 2001 From: Dirk Date: Wed, 28 Aug 2024 15:31:17 +0200 Subject: [PATCH] fix: compatibility issues with pre-commit hook --- .husky/pre-commit.mjs | 7 +++---- package-lock.json | 20 +++++++++++++++----- package.json | 2 +- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/.husky/pre-commit.mjs b/.husky/pre-commit.mjs index cb30e931f7..59045069a5 100644 --- a/.husky/pre-commit.mjs +++ b/.husky/pre-commit.mjs @@ -2,10 +2,9 @@ import { exec } from "node:child_process"; const run = (cmd) => new Promise((resolve, reject) => exec( cmd, - (error, stdout, stderr) => { - if (error) reject(); - if (stderr) reject(stderr); - resolve(stdout); + (error, stdout) => { + if (error) reject(error); + else resolve(stdout); } )); diff --git a/package-lock.json b/package-lock.json index 722d3fd8d0..97f9eacf20 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "eslint-plugin-json": "3.1.0", "eslint-plugin-xwalk": "github:adobe-rnd/eslint-plugin-xwalk#v0.1.0", "husky": "9.1.1", - "merge-json-cli": "^1.0.3", + "merge-json-cli": "^1.0.4", "npm-run-all": "4.1.5", "stylelint": "16.6.1", "stylelint-config-standard": "36.0.0" @@ -2978,12 +2978,13 @@ } }, "node_modules/merge-json-cli": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/merge-json-cli/-/merge-json-cli-1.0.3.tgz", - "integrity": "sha512-FYxuhEFQRAaLhysnXdLICWzpnqzOTxm0bJwc52ps/RuiUMg/5it4Kql+UtUIDb1B92En1xfq4F9iGWwu1Dd2dg==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/merge-json-cli/-/merge-json-cli-1.0.4.tgz", + "integrity": "sha512-LUHbIFh/aPh0MebiVEAcWRaqR6a5e+HjTp2LyDxwSAaNnPruAq+AWZukeieSi3HKHdrX1Wy6tUEZdSLS0KjwJA==", "dev": true, "dependencies": { - "fast-glob": "^3.3.2" + "fast-glob": "^3.3.2", + "yargs-parser": "^21.1.1" }, "bin": { "merge-json-cli": "src/cli.js" @@ -4671,6 +4672,15 @@ "dev": true, "peer": true }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 42a2fce5e2..53528177f5 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "eslint-plugin-json": "3.1.0", "eslint-plugin-xwalk": "github:adobe-rnd/eslint-plugin-xwalk#v0.1.0", "husky": "9.1.1", - "merge-json-cli": "1.0.3", + "merge-json-cli": "^1.0.4", "npm-run-all": "4.1.5", "stylelint": "16.6.1", "stylelint-config-standard": "36.0.0"