diff --git a/build/pre-commit.js b/build/pre-commit.cjs similarity index 62% rename from build/pre-commit.js rename to build/pre-commit.cjs index 3441bb94b..51ee28259 100644 --- a/build/pre-commit.js +++ b/build/pre-commit.cjs @@ -3,12 +3,12 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ -import { readFileSync, writeFileSync } from 'fs' +exports.preCommit = async (props) => { + const fs = await import('fs') -export function preCommit(props) { - const old = readFileSync('appinfo/info.xml').toString('utf-8') + const old = fs.readFileSync('appinfo/info.xml').toString('utf-8') const updated = old.replace(/(.+?)<\/version>/, '' + props.version + '') - writeFileSync('appinfo/info.xml', updated) + fs.writeFileSync('appinfo/info.xml', updated) }