@@ -5,7 +5,6 @@ import path from "node:path";
55
66// Import Third-party Dependencies
77import type { ESTree } from "meriyah" ;
8- import isMinified from "is-minified-code" ;
98
109// Import Internal Dependencies
1110import {
@@ -22,7 +21,8 @@ import { ProbeRunner, type Probe } from "./ProbeRunner.js";
2221import { walkEnter } from "./walker/index.js" ;
2322import * as trojan from "./obfuscators/trojan-source.js" ;
2423import {
25- isOneLineExpressionExport
24+ isOneLineExpressionExport ,
25+ isMinifiedCode
2626} from "./utils/index.js" ;
2727import {
2828 PipelineRunner ,
@@ -221,7 +221,7 @@ export class AstAnalyser {
221221 const str = await fs . readFile ( pathToFile , "utf-8" ) ;
222222 const filePathString = pathToFile instanceof URL ? pathToFile . href : pathToFile ;
223223
224- const isMin = filePathString . includes ( ".min" ) || isMinified ( str ) ;
224+ const isMin = filePathString . includes ( ".min" ) || isMinifiedCode ( str ) ;
225225 const data = this . analyse ( str , {
226226 isMinified : isMin ,
227227 module : path . extname ( filePathString ) === ".mjs" ? true : module ,
@@ -274,7 +274,7 @@ export class AstAnalyser {
274274 const str = fsSync . readFileSync ( pathToFile , "utf-8" ) ;
275275 const filePathString = pathToFile instanceof URL ? pathToFile . href : pathToFile ;
276276
277- const isMin = filePathString . includes ( ".min" ) || isMinified ( str ) ;
277+ const isMin = filePathString . includes ( ".min" ) || isMinifiedCode ( str ) ;
278278 const data = this . analyse ( str , {
279279 isMinified : isMin ,
280280 module : path . extname ( filePathString ) === ".mjs" ? true : module ,
0 commit comments