Skip to content

Commit 9ecc037

Browse files
committed
lint-fix
1 parent d6d11ec commit 9ecc037

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/util.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,20 @@ export function cachedLookup<T, R>(fn: (arg: T) => R): (arg: T) => R {
9696
* Require something with v8-compile-cache, which should make subsequent requires faster.
9797
* Do lots of error-handling so that, worst case, we require without the cache, and users are not blocked.
9898
*/
99-
export function attemptRequireWithV8CompileCache(requireFn: typeof require, specifier: string) {
99+
export function attemptRequireWithV8CompileCache(
100+
requireFn: typeof require,
101+
specifier: string
102+
) {
100103
try {
101-
const v8CC = (require('v8-compile-cache-lib') as typeof import('v8-compile-cache-lib')).install();
104+
const v8CC = (
105+
require('v8-compile-cache-lib') as typeof import('v8-compile-cache-lib')
106+
).install();
102107
try {
103108
return requireFn(specifier);
104109
} finally {
105110
v8CC?.uninstall();
106111
}
107-
} catch(e) {
112+
} catch (e) {
108113
return requireFn(specifier);
109114
}
110115
}

0 commit comments

Comments
 (0)