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