Skip to content

Commit eb1f1a6

Browse files
committed
remove require from files
1 parent 3f049a8 commit eb1f1a6

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/infiniteLoops/detect.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import { generate } from 'astring'
22
import * as es from 'estree'
3+
// @ts-expect-error
4+
import runAltErgo from '@joeychenofficial/alt-ergo-modified'
35

46
import { simple } from '../utils/walkers'
57
import { InfiniteLoopError, InfiniteLoopErrorType } from './errors'
68
import { getOriginalName } from './instrument'
79
import * as st from './state'
810
import { shallowConcretize } from './symbolic'
911

10-
// eslint-disable-next-line @typescript-eslint/no-require-imports
11-
const runAltErgo: any = require('@joeychenofficial/alt-ergo-modified')
12-
1312
const options = {
1413
answers_with_loc: false,
1514
input_format: 'Native',

src/modules/loader/loaders.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,7 @@ export const memoizedGetModuleDocsAsync = getMemoizedDocsImporter()
118118
webpack so that webpack doesn't try to compile them away.
119119
*/
120120
const bundleAndTabImporter = wrapImporter<{ default: ModuleBundle }>(
121-
typeof window !== 'undefined' && process.env.NODE_ENV !== 'test'
122-
? (new Function('path', 'return import(`${path}?q=${Date.now()}`)') as any)
123-
: // eslint-disable-next-line @typescript-eslint/no-require-imports
124-
p => Promise.resolve(require(p))
121+
new Function('path', 'return import(`${path}?q=${Date.now()}`)') as any
125122
)
126123

127124
export async function loadModuleBundleAsync(

0 commit comments

Comments
 (0)