Skip to content

Commit

Permalink
refactor(utils): loadPathAliases -> loadPaths
Browse files Browse the repository at this point in the history
Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
  • Loading branch information
unicornware committed Feb 7, 2023
1 parent 87c800d commit f4da989
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -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<typeof loadCompilerOptions>

Expand Down
2 changes: 1 addition & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
8 changes: 4 additions & 4 deletions src/utils/load-path-aliases.ts → src/utils/load-paths.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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

0 comments on commit f4da989

Please sign in to comment.