Skip to content

Commit a4d9530

Browse files
committed
move options into func
1 parent 135e19b commit a4d9530

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

packages/jest-resolve/src/defaultResolver.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,12 @@ function readPackageSync(_: unknown, file: Config.Path): PkgJson {
157157
}
158158

159159
function createPackageFilter(conditions?: Array<string>) {
160-
const options: ResolveExportsOptions = conditions
161-
? {conditions, unsafe: true}
162-
: // no conditions were passed - let's assume this is Jest internal and it should be `require`
163-
{browser: false, require: true};
164-
165160
function attemptExportsFallback(pkg: PkgJson) {
161+
const options: ResolveExportsOptions = conditions
162+
? {conditions, unsafe: true}
163+
: // no conditions were passed - let's assume this is Jest internal and it should be `require`
164+
{browser: false, require: true};
165+
166166
try {
167167
return resolveExports(pkg, '.', options);
168168
} catch {

0 commit comments

Comments
 (0)