From 9e54446f44c84b1ecec55b4476eabac803ced0be Mon Sep 17 00:00:00 2001 From: Aetherinox Date: Sun, 23 Mar 2025 03:14:21 -0700 Subject: [PATCH] build: convert `root.js` from CJS to ESM --- tvapp2/root.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tvapp2/root.js b/tvapp2/root.js index cdc08a94..0c68b860 100644 --- a/tvapp2/root.js +++ b/tvapp2/root.js @@ -1,5 +1,4 @@ #!/usr/bin/env node -/* eslint-disable @typescript-eslint/no-var-requires */ /* build by running @@ -32,8 +31,8 @@ - npm run env-version */ -const fs = require('fs') -const { v5: uuid } = require('uuid') +import fs from 'fs'; +import { v5 as uuidv5 } from 'uuid'; /* * declarations › package.json @@ -56,8 +55,8 @@ if (action === 'guid') { } }) } else if (action === 'generate') { - const buildGuid = uuid(`${repository.url}`, uuid.URL) - const buildUuid = uuid(version, buildGuid) + const buildGuid = uuidv5(`${repository.url}`, uuidV5.URL) + const buildUuid = uuidv5(version, buildGuid) const ids = ` VERSION=${version}