refactor: switch to ES module syntax for exec import in format-package-json script

This commit is contained in:
Ritesh Ghosh
2025-05-12 01:25:34 +05:30
parent 5fada2560d
commit fb488a082a
+2 -2
View File
@@ -1,7 +1,7 @@
const { exec } = require('child_process');
import { exec } from "child_process";
export function preCommit({ tag, version }) {
exec('jq --indent 4 . package.json > tmp.json && mv tmp.json package.json', (error, stdout, stderr) => {
exec("jq --indent 4 . package.json > tmp.json && mv tmp.json package.json", (error, stdout, stderr) => {
if (error) {
console.error(`exec error: ${error}`);
return;