Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(options, sourceType = "auto") {
super();
this.hooks = {
evaluateTypeof: new HookMap(() => new SyncBailHook(["expression"])),
evaluate: new HookMap(() => new SyncBailHook(["expression"])),
evaluateIdentifier: new HookMap(() => new SyncBailHook(["expression"])),
evaluateDefinedIdentifier: new HookMap(
() => new SyncBailHook(["expression"])
),
evaluateCallExpressionMember: new HookMap(
() => new SyncBailHook(["expression", "param"])
),
statement: new SyncBailHook(["statement"]),
statementIf: new SyncBailHook(["statement"]),
label: new HookMap(() => new SyncBailHook(["statement"])),
import: new SyncBailHook(["statement", "source"]),
importSpecifier: new SyncBailHook([
"statement",
"source",
"exportName",
"identifierName"
]),
export: new SyncBailHook(["statement"]),
exportImport: new SyncBailHook(["statement", "source"]),
exportDeclaration: new SyncBailHook(["statement", "declaration"]),
exportExpression: new SyncBailHook(["statement", "declaration"]),
exportSpecifier: new SyncBailHook([
"statement",
"identifierName",
"exportName",
"index"
constructor(options, sourceType = "auto") {
super();
this.hooks = {
evaluateTypeof: new HookMap(() => new SyncBailHook(["expression"])),
evaluate: new HookMap(() => new SyncBailHook(["expression"])),
evaluateIdentifier: new HookMap(() => new SyncBailHook(["expression"])),
evaluateDefinedIdentifier: new HookMap(
() => new SyncBailHook(["expression"])
),
evaluateCallExpressionMember: new HookMap(
() => new SyncBailHook(["expression", "param"])
),
statement: new SyncBailHook(["statement"]),
statementIf: new SyncBailHook(["statement"]),
label: new HookMap(() => new SyncBailHook(["statement"])),
import: new SyncBailHook(["statement", "source"]),
importSpecifier: new SyncBailHook([
"statement",
"source",
"exportName",
"identifierName"
]),
export: new SyncBailHook(["statement"]),
exportImport: new SyncBailHook(["statement", "source"]),
exportDeclaration: new SyncBailHook(["statement", "declaration"]),
exportExpression: new SyncBailHook(["statement", "declaration"]),
constructor(context, resolverFactory, options) {
super();
this.hooks = {
resolver: new SyncWaterfallHook(["resolver"]),
factory: new SyncWaterfallHook(["factory"]),
beforeResolve: new AsyncSeriesWaterfallHook(["data"]),
afterResolve: new AsyncSeriesWaterfallHook(["data"]),
createModule: new SyncBailHook(["data"]),
module: new SyncWaterfallHook(["module", "data"]),
createParser: new HookMap(() => new SyncBailHook(["parserOptions"])),
parser: new HookMap(() => new SyncHook(["parser", "parserOptions"])),
createGenerator: new HookMap(
() => new SyncBailHook(["generatorOptions"])
),
generator: new HookMap(
() => new SyncHook(["generator", "generatorOptions"])
)
};
this._pluginCompat.tap("NormalModuleFactory", options => {
switch (options.name) {
case "before-resolve":
case "after-resolve":
options.async = true;
break;
case "parser":
this.hooks.parser
"exportName",
"index"
]),
exportImportSpecifier: new SyncBailHook([
"statement",
"source",
"identifierName",
"exportName",
"index"
]),
varDeclaration: new HookMap(() => new SyncBailHook(["declaration"])),
varDeclarationLet: new HookMap(() => new SyncBailHook(["declaration"])),
varDeclarationConst: new HookMap(() => new SyncBailHook(["declaration"])),
varDeclarationVar: new HookMap(() => new SyncBailHook(["declaration"])),
canRename: new HookMap(() => new SyncBailHook(["initExpression"])),
rename: new HookMap(() => new SyncBailHook(["initExpression"])),
assigned: new HookMap(() => new SyncBailHook(["expression"])),
assign: new HookMap(() => new SyncBailHook(["expression"])),
typeof: new HookMap(() => new SyncBailHook(["expression"])),
importCall: new SyncBailHook(["expression"]),
call: new HookMap(() => new SyncBailHook(["expression"])),
callAnyMember: new HookMap(() => new SyncBailHook(["expression"])),
new: new HookMap(() => new SyncBailHook(["expression"])),
expression: new HookMap(() => new SyncBailHook(["expression"])),
expressionAnyMember: new HookMap(() => new SyncBailHook(["expression"])),
expressionConditionalOperator: new SyncBailHook(["expression"]),
expressionLogicalOperator: new SyncBailHook(["expression"]),
program: new SyncBailHook(["ast", "comments"])
};
const HOOK_MAP_COMPAT_CONFIG = {
evaluateTypeof: /^evaluate typeof (.+)$/,
evaluateIdentifier: /^evaluate Identifier (.+)$/,
constructor(options, sourceType = "auto") {
super();
this.hooks = {
evaluateTypeof: new HookMap(() => new SyncBailHook(["expression"])),
evaluate: new HookMap(() => new SyncBailHook(["expression"])),
evaluateIdentifier: new HookMap(() => new SyncBailHook(["expression"])),
evaluateDefinedIdentifier: new HookMap(
() => new SyncBailHook(["expression"])
),
evaluateCallExpressionMember: new HookMap(
() => new SyncBailHook(["expression", "param"])
),
statement: new SyncBailHook(["statement"]),
statementIf: new SyncBailHook(["statement"]),
label: new HookMap(() => new SyncBailHook(["statement"])),
import: new SyncBailHook(["statement", "source"]),
importSpecifier: new SyncBailHook([
"statement",
"source",
"exportName",
"identifierName"
]),
"exportName",
"index"
]),
varDeclaration: new HookMap(() => new SyncBailHook(["declaration"])),
varDeclarationLet: new HookMap(() => new SyncBailHook(["declaration"])),
varDeclarationConst: new HookMap(() => new SyncBailHook(["declaration"])),
varDeclarationVar: new HookMap(() => new SyncBailHook(["declaration"])),
canRename: new HookMap(() => new SyncBailHook(["initExpression"])),
rename: new HookMap(() => new SyncBailHook(["initExpression"])),
assigned: new HookMap(() => new SyncBailHook(["expression"])),
assign: new HookMap(() => new SyncBailHook(["expression"])),
typeof: new HookMap(() => new SyncBailHook(["expression"])),
importCall: new SyncBailHook(["expression"]),
call: new HookMap(() => new SyncBailHook(["expression"])),
callAnyMember: new HookMap(() => new SyncBailHook(["expression"])),
new: new HookMap(() => new SyncBailHook(["expression"])),
expression: new HookMap(() => new SyncBailHook(["expression"])),
expressionAnyMember: new HookMap(() => new SyncBailHook(["expression"])),
expressionConditionalOperator: new SyncBailHook(["expression"]),
expressionLogicalOperator: new SyncBailHook(["expression"]),
program: new SyncBailHook(["ast", "comments"])
};
const HOOK_MAP_COMPAT_CONFIG = {
evaluateTypeof: /^evaluate typeof (.+)$/,
evaluateIdentifier: /^evaluate Identifier (.+)$/,
evaluateDefinedIdentifier: /^evaluate defined Identifier (.+)$/,
evaluateCallExpressionMember: /^evaluate CallExpression .(.+)$/,
evaluate: /^evaluate (.+)$/,
label: /^label (.+)$/,
varDeclarationLet: /^var-let (.+)$/,
varDeclarationConst: /^var-const (.+)$/,
varDeclarationVar: /^var-var (.+)$/,
"exportName",
"index"
]),
varDeclaration: new HookMap(() => new SyncBailHook(["declaration"])),
varDeclarationLet: new HookMap(() => new SyncBailHook(["declaration"])),
varDeclarationConst: new HookMap(() => new SyncBailHook(["declaration"])),
varDeclarationVar: new HookMap(() => new SyncBailHook(["declaration"])),
canRename: new HookMap(() => new SyncBailHook(["initExpression"])),
rename: new HookMap(() => new SyncBailHook(["initExpression"])),
assigned: new HookMap(() => new SyncBailHook(["expression"])),
assign: new HookMap(() => new SyncBailHook(["expression"])),
typeof: new HookMap(() => new SyncBailHook(["expression"])),
importCall: new SyncBailHook(["expression"]),
call: new HookMap(() => new SyncBailHook(["expression"])),
callAnyMember: new HookMap(() => new SyncBailHook(["expression"])),
new: new HookMap(() => new SyncBailHook(["expression"])),
expression: new HookMap(() => new SyncBailHook(["expression"])),
expressionAnyMember: new HookMap(() => new SyncBailHook(["expression"])),
expressionConditionalOperator: new SyncBailHook(["expression"]),
expressionLogicalOperator: new SyncBailHook(["expression"]),
program: new SyncBailHook(["ast", "comments"])
};
const HOOK_MAP_COMPAT_CONFIG = {
evaluateTypeof: /^evaluate typeof (.+)$/,
evaluateIdentifier: /^evaluate Identifier (.+)$/,
evaluateDefinedIdentifier: /^evaluate defined Identifier (.+)$/,
evaluateCallExpressionMember: /^evaluate CallExpression .(.+)$/,
evaluate: /^evaluate (.+)$/,
label: /^label (.+)$/,
varDeclarationLet: /^var-let (.+)$/,
varDeclarationConst: /^var-const (.+)$/,
varDeclarationVar: /^var-var (.+)$/,
constructor(options, sourceType = "auto") {
super();
this.hooks = {
evaluateTypeof: new HookMap(() => new SyncBailHook(["expression"])),
evaluate: new HookMap(() => new SyncBailHook(["expression"])),
evaluateIdentifier: new HookMap(() => new SyncBailHook(["expression"])),
evaluateDefinedIdentifier: new HookMap(
() => new SyncBailHook(["expression"])
),
evaluateCallExpressionMember: new HookMap(
() => new SyncBailHook(["expression", "param"])
),
statement: new SyncBailHook(["statement"]),
statementIf: new SyncBailHook(["statement"]),
label: new HookMap(() => new SyncBailHook(["statement"])),
import: new SyncBailHook(["statement", "source"]),
importSpecifier: new SyncBailHook([
"statement",
"source",
"exportName",
"identifierName"
exportDeclaration: new SyncBailHook(["statement", "declaration"]),
exportExpression: new SyncBailHook(["statement", "declaration"]),
exportSpecifier: new SyncBailHook([
"statement",
"identifierName",
"exportName",
"index"
]),
exportImportSpecifier: new SyncBailHook([
"statement",
"source",
"identifierName",
"exportName",
"index"
]),
varDeclaration: new HookMap(() => new SyncBailHook(["declaration"])),
varDeclarationLet: new HookMap(() => new SyncBailHook(["declaration"])),
varDeclarationConst: new HookMap(() => new SyncBailHook(["declaration"])),
varDeclarationVar: new HookMap(() => new SyncBailHook(["declaration"])),
canRename: new HookMap(() => new SyncBailHook(["initExpression"])),
rename: new HookMap(() => new SyncBailHook(["initExpression"])),
assigned: new HookMap(() => new SyncBailHook(["expression"])),
assign: new HookMap(() => new SyncBailHook(["expression"])),
typeof: new HookMap(() => new SyncBailHook(["expression"])),
importCall: new SyncBailHook(["expression"]),
call: new HookMap(() => new SyncBailHook(["expression"])),
callAnyMember: new HookMap(() => new SyncBailHook(["expression"])),
new: new HookMap(() => new SyncBailHook(["expression"])),
expression: new HookMap(() => new SyncBailHook(["expression"])),
expressionAnyMember: new HookMap(() => new SyncBailHook(["expression"])),
expressionConditionalOperator: new SyncBailHook(["expression"]),
expressionLogicalOperator: new SyncBailHook(["expression"]),