refactor: switch to ES module syntax for exec import in format-package-json script
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
const { exec } = require('child_process');
|
import { exec } from "child_process";
|
||||||
|
|
||||||
export function preCommit({ tag, version }) {
|
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) {
|
if (error) {
|
||||||
console.error(`exec error: ${error}`);
|
console.error(`exec error: ${error}`);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user