From 18b5ee504409256a7c052a4b26ffb54e7c31a088 Mon Sep 17 00:00:00 2001 From: Andrea Carraro Date: Thu, 4 Jul 2024 18:48:38 +0200 Subject: [PATCH] chore: convert tag script to ES (#54) --- scripts/tag.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/tag.js b/scripts/tag.js index fd85b17..89cab93 100644 --- a/scripts/tag.js +++ b/scripts/tag.js @@ -1,8 +1,10 @@ -const util = require('node:util'); -const exec = util.promisify(require('node:child_process').exec); -const { version } = require('../package.json'); +import util from 'node:util'; +import { exec as callbackExec } from 'node:child_process'; +import packageJson from '../package.json' assert { type: 'json' }; +const exec = util.promisify(callbackExec); async function tag() { + const { version } = packageJson; const currentVersion = `v${version}`; await exec('git fetch --all --tags'); const gitTagResponse = await exec('git tag');