diff --git a/src/utils/__tests__/load-path-aliases.spec.ts b/src/utils/__tests__/load-paths.spec.ts similarity index 82% rename from src/utils/__tests__/load-path-aliases.spec.ts rename to src/utils/__tests__/load-paths.spec.ts index 6a5dd14d..cffd9281 100644 --- a/src/utils/__tests__/load-path-aliases.spec.ts +++ b/src/utils/__tests__/load-paths.spec.ts @@ -1,17 +1,17 @@ /** - * @file Unit Tests - loadPathAliases - * @module tsconfig-utils/utils/tests/unit/loadPathAliases + * @file Unit Tests - loadPaths + * @module tsconfig-utils/utils/tests/unit/loadPaths */ import type { Spy } from '#tests/interfaces' import getTsconfigJson from '#tests/utils/get-tsconfig-json' import type { Paths } from '@flex-development/tsconfig-types' import loadCompilerOptions from '../load-compiler-options' -import testSubject from '../load-path-aliases' +import testSubject from '../load-paths' vi.mock('../load-compiler-options') -describe('unit:utils/loadPathAliases', () => { +describe('unit:utils/loadPaths', () => { let id: string let loadCompilerOptionsMock: Spy diff --git a/src/utils/index.ts b/src/utils/index.ts index 4eb507dd..f55b196e 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -7,7 +7,7 @@ export { default as COMPILER_OPTIONS } from './compiler-options' export { default as LIB } from './lib' export { default as loadCompilerOptions } from './load-compiler-options' export { default as loadLib } from './load-lib' -export { default as loadPathAliases } from './load-path-aliases' +export { default as loadPaths } from './load-paths' export { default as loadPluginConfigs } from './load-plugin-configs' export { default as loadTsconfig } from './load-tsconfig' export { default as normalizeCompilerOptions } from './normalize-compiler-options' diff --git a/src/utils/load-path-aliases.ts b/src/utils/load-paths.ts similarity index 83% rename from src/utils/load-path-aliases.ts rename to src/utils/load-paths.ts index 192dc228..355c0ef6 100644 --- a/src/utils/load-path-aliases.ts +++ b/src/utils/load-paths.ts @@ -1,6 +1,6 @@ /** - * @file Utilities - loadPathAliases - * @module tsconfig-utils/utils/loadPathAliases + * @file Utilities - loadPaths + * @module tsconfig-utils/utils/loadPaths */ import type { LoadTsconfigOptions } from '#src/interfaces' @@ -18,9 +18,9 @@ import loadCompilerOptions from './load-compiler-options' * @param {LoadTsconfigOptions} [options={}] - Tsconfig loading options * @return {Paths} Path alias configuration object */ -const loadPathAliases = ( +const loadPaths = ( id: mlly.ModuleId, options: LoadTsconfigOptions = {} ): Paths => loadCompilerOptions(id, options).paths ?? {} -export default loadPathAliases +export default loadPaths