build: convert root.js from CJS to ESM

This commit is contained in:
2025-03-23 03:14:21 -07:00
parent 811380215a
commit 9e54446f44

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node #!/usr/bin/env node
/* eslint-disable @typescript-eslint/no-var-requires */
/* /*
build by running build by running
@@ -32,8 +31,8 @@
- npm run env-version - npm run env-version
*/ */
const fs = require('fs') import fs from 'fs';
const { v5: uuid } = require('uuid') import { v5 as uuidv5 } from 'uuid';
/* /*
* declarations package.json * declarations package.json
@@ -56,8 +55,8 @@ if (action === 'guid') {
} }
}) })
} else if (action === 'generate') { } else if (action === 'generate') {
const buildGuid = uuid(`${repository.url}`, uuid.URL) const buildGuid = uuidv5(`${repository.url}`, uuidV5.URL)
const buildUuid = uuid(version, buildGuid) const buildUuid = uuidv5(version, buildGuid)
const ids = ` const ids = `
VERSION=${version} VERSION=${version}