From 8b71a71bd925ce2c12eeb69fe49834ae1e6fb411 Mon Sep 17 00:00:00 2001 From: Harminder Virk Date: Mon, 16 Oct 2023 11:54:49 +0530 Subject: [PATCH] refactor: rename exceptions.ts to errors.ts --- index.ts | 2 +- src/{exceptions.ts => errors.ts} | 0 src/validator.ts | 2 +- test/validator.spec.ts | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename src/{exceptions.ts => errors.ts} (100%) diff --git a/index.ts b/index.ts index 0477a33..89b3113 100644 --- a/index.ts +++ b/index.ts @@ -10,5 +10,5 @@ export { Env } from './src/env.js' export { EnvParser } from './src/parser.js' export { EnvLoader } from './src/loader.js' -export * as errors from './src/exceptions.js' +export * as errors from './src/errors.js' export { EnvProcessor } from './src/processor.js' diff --git a/src/exceptions.ts b/src/errors.ts similarity index 100% rename from src/exceptions.ts rename to src/errors.ts diff --git a/src/validator.ts b/src/validator.ts index ca7cc2c..3edf3d2 100644 --- a/src/validator.ts +++ b/src/validator.ts @@ -10,7 +10,7 @@ import type { Exception } from '@poppinss/utils' import { ValidateFn } from '@poppinss/validator-lite' -import { E_INVALID_ENV_VARIABLES } from './exceptions.js' +import { E_INVALID_ENV_VARIABLES } from './errors.js' /** * Exposes the API to validate environment variables against a diff --git a/test/validator.spec.ts b/test/validator.spec.ts index b98c945..e2679ef 100644 --- a/test/validator.spec.ts +++ b/test/validator.spec.ts @@ -10,7 +10,7 @@ import { test } from '@japa/runner' import { schema } from '@poppinss/validator-lite' import { EnvValidator } from '../src/validator.js' -import { E_INVALID_ENV_VARIABLES } from '../src/exceptions.js' +import { E_INVALID_ENV_VARIABLES } from '../src/errors.js' test.group('Env Validator', () => { test('validate values against pre-defined schema', async ({ assert, expectTypeOf }) => {