From 2018782bcd33476efa347b4359114fe776dac698 Mon Sep 17 00:00:00 2001 From: Johnathan Aspinwall Date: Wed, 1 May 2024 11:52:22 -0600 Subject: [PATCH] chore: Rename constants.js to enums.js and update related imports --- scripts/buildEsm.cjs | 14 +++++++------- scripts/config.cjs | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/buildEsm.cjs b/scripts/buildEsm.cjs index 8d13389..6345308 100644 --- a/scripts/buildEsm.cjs +++ b/scripts/buildEsm.cjs @@ -4,21 +4,21 @@ const config = require('./config.cjs'); const { schemasSrc, - constantsSrc, + enumsSrc, indexSrc, validatorSrc, - esmConstantsDst, + esmEnumsDst, esmIndexDst, esmValidatorDst, esmSchemasDst } = config; -const copyConstants = async () => { +const copyEnums = async () => { return fs - .copy(constantsSrc, esmConstantsDst) - .then(() => console.log('Copy constants.js completed!')) + .copy(enumsSrc, esmEnumsDst) + .then(() => console.log('Copy enums.js completed!')) .catch(err => - console.error('An error occurred while copying constants.js', err) + console.error('An error occurred while copying enums.js', err) ); }; @@ -50,7 +50,7 @@ const copySchemas = async () => { }; const buildEsm = async () => { - await copyConstants(); + await copyEnums(); await copyIndex(); await copyValidator(); await copySchemas(); diff --git a/scripts/config.cjs b/scripts/config.cjs index 9ea0153..5621ce9 100644 --- a/scripts/config.cjs +++ b/scripts/config.cjs @@ -1,7 +1,7 @@ const path = require('path'); const srcPath = path.join(__dirname, '..', 'src'); -const constantsSrc = path.join(srcPath, 'constants.js'); +const enumsSrc = path.join(srcPath, 'enums.js'); const examplesSrc = path.join(srcPath, 'examples'); const indexSrc = path.join(srcPath, 'index.js'); const schemasSrc = path.join(srcPath, 'schemas'); @@ -14,7 +14,7 @@ const cjsExamplesDst = path.join(cjsPath, 'examples'); const cjsSchemasDst = path.join(cjsPath, 'schemas'); const esmPath = path.join(distPath, 'esm'); -const esmConstantsDst = path.join(esmPath, 'constants.js'); +const esmEnumsDst = path.join(esmPath, 'enums.js'); const esmIndexDst = path.join(esmPath, 'index.js'); const esmSchemasDst = path.join(esmPath, 'schemas'); const esmValidatorDst = path.join(esmPath, 'lucaValidator.js'); @@ -25,12 +25,12 @@ module.exports = { esmPath, cjsExamplesDst, cjsSchemasDst, - esmConstantsDst, + esmEnumsDst, esmIndexDst, esmValidatorDst, esmSchemasDst, srcPath, - constantsSrc, + enumsSrc, examplesSrc, indexSrc, schemasSrc,