Skip to content

Commit

Permalink
fix(deps): bump locter to v1.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
tada5hi committed Mar 13, 2023
1 parent 87a1eee commit ce0abc0
Show file tree
Hide file tree
Showing 5 changed files with 167 additions and 35 deletions.
176 changes: 155 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"license": "MIT",
"dependencies": {
"@faker-js/faker": "^7.6.0",
"locter": "^1.0.5",
"locter": "^1.0.9",
"rapiq": "^0.8.0",
"reflect-metadata": "^0.1.13",
"yargs": "^17.6.2"
Expand Down
10 changes: 5 additions & 5 deletions src/data-source/find/module.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
getModuleExport,
isObject,
load,
locate,
Expand All @@ -8,7 +9,7 @@ import path from 'node:path';
import type { DataSource } from 'typeorm';
import { InstanceChecker } from 'typeorm';
import {
CodeTransformation, hasOwnProperty, isCodeTransformation, safeReplaceWindowsSeparator, transformFilePath,
CodeTransformation, isCodeTransformation, safeReplaceWindowsSeparator, transformFilePath,
} from '../../utils';
import type { DataSourceFindOptions } from './type';
import { readTsConfig } from '../../utils/tsconfig';
Expand Down Expand Up @@ -89,10 +90,9 @@ export async function findDataSource(
return fileExports;
}

if (
hasOwnProperty(fileExports, 'default') &&
InstanceChecker.isDataSource(fileExports.default)
) {
const defaultExport = getModuleExport(fileExports);

if (InstanceChecker.isDataSource(defaultExport.value)) {
return fileExports.default;
}

Expand Down
Loading

0 comments on commit ce0abc0

Please sign in to comment.