rollup 0.55.1 → 0.55.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +40 -4
- package/bin/rollup +13 -4
- package/dist/rollup.browser.js +134 -79
- package/dist/rollup.es.js +135 -80
- package/dist/rollup.js +136 -81
- package/dist/typings/Chunk.d.ts +4 -0
- package/dist/typings/Graph.d.ts +1 -2
- package/dist/typings/rollup/index.d.ts +1 -0
- package/dist/typings/utils/defaults.d.ts +2 -1
- package/dist/typings/utils/renderHelpers.d.ts +12 -0
- package/dist/typings/watch/index.d.ts +1 -1
- package/package.json +10 -5
- package/dist/typings/Bundle.d.ts +0 -29
- package/dist/typings/ast/Node.d.ts +0 -185
- package/dist/typings/ast/nodes/Declaration.d.ts +0 -8
- package/dist/typings/ast/nodes/Expression.d.ts +0 -46
- package/dist/typings/ast/nodes/Pattern.d.ts +0 -12
- package/dist/typings/ast/nodes/Statement.d.ts +0 -10
- package/dist/typings/ast/nodes/shared/VirtualObjectExpression.d.ts +0 -7
- package/dist/typings/ast/nodes/shared/disallowIllegalReassignment.d.ts +0 -6
- package/dist/typings/bin/src/index.d.ts +0 -1
- package/dist/typings/bin/src/logging.d.ts +0 -3
- package/dist/typings/bin/src/run/alternateScreen.d.ts +0 -8
- package/dist/typings/bin/src/run/batchWarnings.d.ts +0 -11
- package/dist/typings/bin/src/run/build.d.ts +0 -9
- package/dist/typings/bin/src/run/index.d.ts +0 -1
- package/dist/typings/bin/src/run/loadConfigFile.d.ts +0 -6
- package/dist/typings/bin/src/run/watch.d.ts +0 -8
- package/dist/typings/bin/src/sourceMappingUrl.d.ts +0 -2
- package/dist/typings/bin/src/utils/sequence.d.ts +0 -4
- package/dist/typings/browser/fs.d.ts +0 -5
- package/dist/typings/browser/path.d.ts +0 -10
- package/dist/typings/src/Bundle.d.ts +0 -29
- package/dist/typings/src/ExternalModule.d.ts +0 -23
- package/dist/typings/src/Graph.d.ts +0 -60
- package/dist/typings/src/Module.d.ts +0 -137
- package/dist/typings/src/ast/CallOptions.d.ts +0 -24
- package/dist/typings/src/ast/Entity.d.ts +0 -19
- package/dist/typings/src/ast/ExecutionPathOptions.d.ts +0 -97
- package/dist/typings/src/ast/Node.d.ts +0 -186
- package/dist/typings/src/ast/clone.d.ts +0 -1
- package/dist/typings/src/ast/comment.d.ts +0 -4
- package/dist/typings/src/ast/enhance.d.ts +0 -7
- package/dist/typings/src/ast/keys.d.ts +0 -4
- package/dist/typings/src/ast/nodes/ArrayExpression.d.ts +0 -9
- package/dist/typings/src/ast/nodes/ArrayPattern.d.ts +0 -21
- package/dist/typings/src/ast/nodes/ArrowFunctionExpression.d.ts +0 -48
- package/dist/typings/src/ast/nodes/AssignmentExpression.d.ts +0 -16
- package/dist/typings/src/ast/nodes/AssignmentPattern.d.ts +0 -23
- package/dist/typings/src/ast/nodes/AssignmentProperty.d.ts +0 -10
- package/dist/typings/src/ast/nodes/AwaitExpression.d.ts +0 -8
- package/dist/typings/src/ast/nodes/BinaryExpression.d.ts +0 -38
- package/dist/typings/src/ast/nodes/BlockStatement.d.ts +0 -19
- package/dist/typings/src/ast/nodes/BreakStatement.d.ts +0 -9
- package/dist/typings/src/ast/nodes/CallExpression.d.ts +0 -45
- package/dist/typings/src/ast/nodes/CatchClause.d.ts +0 -14
- package/dist/typings/src/ast/nodes/ClassBody.d.ts +0 -17
- package/dist/typings/src/ast/nodes/ClassDeclaration.d.ts +0 -11
- package/dist/typings/src/ast/nodes/ClassExpression.d.ts +0 -10
- package/dist/typings/src/ast/nodes/ConditionalExpression.d.ts +0 -50
- package/dist/typings/src/ast/nodes/Declaration.d.ts +0 -8
- package/dist/typings/src/ast/nodes/DoWhileStatement.d.ts +0 -10
- package/dist/typings/src/ast/nodes/EmptyStatement.d.ts +0 -7
- package/dist/typings/src/ast/nodes/ExportAllDeclaration.d.ts +0 -11
- package/dist/typings/src/ast/nodes/ExportDefaultDeclaration.d.ts +0 -18
- package/dist/typings/src/ast/nodes/ExportNamedDeclaration.d.ts +0 -24
- package/dist/typings/src/ast/nodes/ExportSpecifier.d.ts +0 -8
- package/dist/typings/src/ast/nodes/Expression.d.ts +0 -46
- package/dist/typings/src/ast/nodes/ExpressionStatement.d.ts +0 -5
- package/dist/typings/src/ast/nodes/ForInStatement.d.ts +0 -17
- package/dist/typings/src/ast/nodes/ForOfStatement.d.ts +0 -18
- package/dist/typings/src/ast/nodes/ForStatement.d.ts +0 -16
- package/dist/typings/src/ast/nodes/FunctionDeclaration.d.ts +0 -9
- package/dist/typings/src/ast/nodes/FunctionExpression.d.ts +0 -6
- package/dist/typings/src/ast/nodes/Identifier.d.ts +0 -56
- package/dist/typings/src/ast/nodes/IfStatement.d.ts +0 -15
- package/dist/typings/src/ast/nodes/Import.d.ts +0 -20
- package/dist/typings/src/ast/nodes/ImportDeclaration.d.ts +0 -19
- package/dist/typings/src/ast/nodes/ImportDefaultSpecifier.d.ts +0 -7
- package/dist/typings/src/ast/nodes/ImportNamespaceSpecifier.d.ts +0 -7
- package/dist/typings/src/ast/nodes/ImportSpecifier.d.ts +0 -8
- package/dist/typings/src/ast/nodes/LabeledStatement.d.ts +0 -10
- package/dist/typings/src/ast/nodes/Literal.d.ts +0 -22
- package/dist/typings/src/ast/nodes/LogicalExpression.d.ts +0 -47
- package/dist/typings/src/ast/nodes/MemberExpression.d.ts +0 -61
- package/dist/typings/src/ast/nodes/MethodDefinition.d.ts +0 -20
- package/dist/typings/src/ast/nodes/NewExpression.d.ts +0 -17
- package/dist/typings/src/ast/nodes/ObjectExpression.d.ts +0 -52
- package/dist/typings/src/ast/nodes/ObjectPattern.d.ts +0 -22
- package/dist/typings/src/ast/nodes/Pattern.d.ts +0 -12
- package/dist/typings/src/ast/nodes/Program.d.ts +0 -7
- package/dist/typings/src/ast/nodes/Property.d.ts +0 -57
- package/dist/typings/src/ast/nodes/RestElement.d.ts +0 -21
- package/dist/typings/src/ast/nodes/ReturnStatement.d.ts +0 -10
- package/dist/typings/src/ast/nodes/SequenceExpression.d.ts +0 -12
- package/dist/typings/src/ast/nodes/SpreadElement.d.ts +0 -6
- package/dist/typings/src/ast/nodes/Statement.d.ts +0 -10
- package/dist/typings/src/ast/nodes/SwitchCase.d.ts +0 -9
- package/dist/typings/src/ast/nodes/SwitchStatement.d.ts +0 -13
- package/dist/typings/src/ast/nodes/TaggedTemplateExpression.d.ts +0 -13
- package/dist/typings/src/ast/nodes/TemplateElement.d.ts +0 -12
- package/dist/typings/src/ast/nodes/TemplateLiteral.d.ts +0 -10
- package/dist/typings/src/ast/nodes/ThisExpression.d.ts +0 -22
- package/dist/typings/src/ast/nodes/ThrowStatement.d.ts +0 -9
- package/dist/typings/src/ast/nodes/UnaryExpression.d.ts +0 -19
- package/dist/typings/src/ast/nodes/UnknownNode.d.ts +0 -5
- package/dist/typings/src/ast/nodes/UpdateExpression.d.ts +0 -16
- package/dist/typings/src/ast/nodes/VariableDeclaration.d.ts +0 -23
- package/dist/typings/src/ast/nodes/VariableDeclarator.d.ts +0 -15
- package/dist/typings/src/ast/nodes/WhileStatement.d.ts +0 -10
- package/dist/typings/src/ast/nodes/YieldExpression.d.ts +0 -9
- package/dist/typings/src/ast/nodes/index.d.ts +0 -69
- package/dist/typings/src/ast/nodes/shared/ClassNode.d.ts +0 -27
- package/dist/typings/src/ast/nodes/shared/Expression.d.ts +0 -42
- package/dist/typings/src/ast/nodes/shared/FunctionNode.d.ts +0 -42
- package/dist/typings/src/ast/nodes/shared/Node.d.ts +0 -169
- package/dist/typings/src/ast/nodes/shared/Pattern.d.ts +0 -3
- package/dist/typings/src/ast/nodes/shared/Statement.d.ts +0 -6
- package/dist/typings/src/ast/nodes/shared/VirtualObjectExpression.d.ts +0 -7
- package/dist/typings/src/ast/nodes/shared/disallowIllegalReassignment.d.ts +0 -6
- package/dist/typings/src/ast/nodes/shared/pureFunctions.d.ts +0 -4
- package/dist/typings/src/ast/scopes/BlockScope.d.ts +0 -12
- package/dist/typings/src/ast/scopes/CatchScope.d.ts +0 -13
- package/dist/typings/src/ast/scopes/FunctionScope.d.ts +0 -27
- package/dist/typings/src/ast/scopes/GlobalScope.d.ts +0 -6
- package/dist/typings/src/ast/scopes/ModuleScope.d.ts +0 -11
- package/dist/typings/src/ast/scopes/ParameterScope.d.ts +0 -16
- package/dist/typings/src/ast/scopes/ReturnValueScope.d.ts +0 -24
- package/dist/typings/src/ast/scopes/Scope.d.ts +0 -49
- package/dist/typings/src/ast/utils/extractNames.d.ts +0 -2
- package/dist/typings/src/ast/values.d.ts +0 -5
- package/dist/typings/src/ast/variables/ArgumentsVariable.d.ts +0 -30
- package/dist/typings/src/ast/variables/ExportDefaultVariable.d.ts +0 -19
- package/dist/typings/src/ast/variables/ExternalVariable.d.ts +0 -17
- package/dist/typings/src/ast/variables/GlobalVariable.d.ts +0 -12
- package/dist/typings/src/ast/variables/LocalVariable.d.ts +0 -51
- package/dist/typings/src/ast/variables/NamespaceVariable.d.ts +0 -23
- package/dist/typings/src/ast/variables/ParameterVariable.d.ts +0 -6
- package/dist/typings/src/ast/variables/ReplaceableInitializationVariable.d.ts +0 -33
- package/dist/typings/src/ast/variables/ThisVariable.d.ts +0 -4
- package/dist/typings/src/ast/variables/Variable.d.ts +0 -63
- package/dist/typings/src/ast/variables/VariableReassignmentTracker.d.ts +0 -25
- package/dist/typings/src/banner.d.ts +0 -0
- package/dist/typings/src/browser-entry.d.ts +0 -2
- package/dist/typings/src/finalisers/amd.d.ts +0 -21
- package/dist/typings/src/finalisers/cjs.d.ts +0 -20
- package/dist/typings/src/finalisers/es.d.ts +0 -17
- package/dist/typings/src/finalisers/iife.d.ts +0 -20
- package/dist/typings/src/finalisers/index.d.ts +0 -25
- package/dist/typings/src/finalisers/shared/esModuleExport.d.ts +0 -2
- package/dist/typings/src/finalisers/shared/getExportBlock.d.ts +0 -6
- package/dist/typings/src/finalisers/shared/getGlobalNameMaker.d.ts +0 -9
- package/dist/typings/src/finalisers/shared/getInteropBlock.d.ts +0 -6
- package/dist/typings/src/finalisers/shared/sanitize.d.ts +0 -2
- package/dist/typings/src/finalisers/shared/setupNamespace.d.ts +0 -7
- package/dist/typings/src/finalisers/shared/trimEmptyImports.d.ts +0 -5
- package/dist/typings/src/finalisers/shared/warnOnBuiltins.d.ts +0 -2
- package/dist/typings/src/finalisers/umd.d.ts +0 -21
- package/dist/typings/src/node-entry.d.ts +0 -5
- package/dist/typings/src/rollup/index.d.ts +0 -172
- package/dist/typings/src/utils/array.d.ts +0 -4
- package/dist/typings/src/utils/callIfFunction.d.ts +0 -1
- package/dist/typings/src/utils/collapseSourcemaps.d.ts +0 -11
- package/dist/typings/src/utils/defaults.d.ts +0 -6
- package/dist/typings/src/utils/deprecateOptions.d.ts +0 -9
- package/dist/typings/src/utils/dynamic-import-plugin.d.ts +0 -8
- package/dist/typings/src/utils/ensureArray.d.ts +0 -2
- package/dist/typings/src/utils/error.d.ts +0 -18
- package/dist/typings/src/utils/first.d.ts +0 -3
- package/dist/typings/src/utils/flushTime.d.ts +0 -5
- package/dist/typings/src/utils/fs.d.ts +0 -6
- package/dist/typings/src/utils/getCodeFrame.d.ts +0 -5
- package/dist/typings/src/utils/getExportMode.d.ts +0 -6
- package/dist/typings/src/utils/getIndentString.d.ts +0 -7
- package/dist/typings/src/utils/identifierHelpers.d.ts +0 -3
- package/dist/typings/src/utils/mergeOptions.d.ts +0 -21
- package/dist/typings/src/utils/object.d.ts +0 -9
- package/dist/typings/src/utils/path.d.ts +0 -6
- package/dist/typings/src/utils/promise.d.ts +0 -5
- package/dist/typings/src/utils/relativeId.d.ts +0 -1
- package/dist/typings/src/utils/sourceMappingURL.d.ts +0 -3
- package/dist/typings/src/utils/transform.d.ts +0 -16
- package/dist/typings/src/utils/transformBundle.d.ts +0 -8
- package/dist/typings/src/watch/chokidar.d.ts +0 -4
- package/dist/typings/src/watch/fileWatchers.d.ts +0 -23
- package/dist/typings/src/watch/index.d.ts +0 -48
- package/dist/typings/utils/array.d.ts +0 -4
- package/dist/typings/utils/dynamic-import-plugin.d.ts +0 -13
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import FunctionDeclaration from "./FunctionDeclaration";
|
|
2
|
-
import VariableDeclaration from "./VariableDeclaration";
|
|
3
|
-
import ClassDeclaration from "./ClassDeclaration";
|
|
4
|
-
declare type Declaration =
|
|
5
|
-
| FunctionDeclaration
|
|
6
|
-
| VariableDeclaration
|
|
7
|
-
| ClassDeclaration;
|
|
8
|
-
export default Declaration;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import ExecutionPathOptions from "../ExecutionPathOptions";
|
|
2
|
-
import { StatementBase, StatementNode } from "./shared/Statement";
|
|
3
|
-
import { ExpressionNode } from "./shared/Node";
|
|
4
|
-
import { NodeType } from "./index";
|
|
5
|
-
export default class DoWhileStatement extends StatementBase {
|
|
6
|
-
type: NodeType.DoWhileStatement;
|
|
7
|
-
body: StatementNode;
|
|
8
|
-
test: ExpressionNode;
|
|
9
|
-
hasEffects(options: ExecutionPathOptions): boolean;
|
|
10
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import MagicString from "magic-string";
|
|
2
|
-
import { StatementBase } from "./shared/Statement";
|
|
3
|
-
import { NodeType } from "./index";
|
|
4
|
-
export default class EmptyStatement extends StatementBase {
|
|
5
|
-
type: NodeType.EmptyStatement;
|
|
6
|
-
render(code: MagicString, _es: boolean): void;
|
|
7
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { NodeBase } from "./shared/Node";
|
|
2
|
-
import Literal from "./Literal";
|
|
3
|
-
import MagicString from "magic-string";
|
|
4
|
-
import { NodeType } from "./index";
|
|
5
|
-
export default class ExportAllDeclaration extends NodeBase {
|
|
6
|
-
type: NodeType.ExportAllDeclaration;
|
|
7
|
-
source: Literal<string>;
|
|
8
|
-
isExportDeclaration: true;
|
|
9
|
-
initialiseNode(): void;
|
|
10
|
-
render(code: MagicString, _es: boolean): void;
|
|
11
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ExpressionNode, NodeBase } from "./shared/Node";
|
|
2
|
-
import ExportDefaultVariable from "../variables/ExportDefaultVariable";
|
|
3
|
-
import ClassDeclaration from "./ClassDeclaration";
|
|
4
|
-
import FunctionDeclaration from "./FunctionDeclaration";
|
|
5
|
-
import MagicString from "magic-string";
|
|
6
|
-
import { NodeType } from "./index";
|
|
7
|
-
export default class ExportDefaultDeclaration extends NodeBase {
|
|
8
|
-
type: NodeType.ExportDefaultDeclaration;
|
|
9
|
-
declaration: FunctionDeclaration | ClassDeclaration | ExpressionNode;
|
|
10
|
-
private _declarationName;
|
|
11
|
-
isExportDeclaration: true;
|
|
12
|
-
variable: ExportDefaultVariable;
|
|
13
|
-
bindNode(): void;
|
|
14
|
-
includeDefaultExport(): void;
|
|
15
|
-
includeInBundle(): boolean;
|
|
16
|
-
initialiseNode(): void;
|
|
17
|
-
render(code: MagicString, es: boolean): void;
|
|
18
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { NodeBase } from "./shared/Node";
|
|
2
|
-
import ExecutionPathOptions from "../ExecutionPathOptions";
|
|
3
|
-
import Literal from "./Literal";
|
|
4
|
-
import MagicString from "magic-string";
|
|
5
|
-
import ExportSpecifier from "./ExportSpecifier";
|
|
6
|
-
import FunctionDeclaration from "./FunctionDeclaration";
|
|
7
|
-
import ClassDeclaration from "./ClassDeclaration";
|
|
8
|
-
import VariableDeclaration from "./VariableDeclaration";
|
|
9
|
-
import { NodeType } from "./index";
|
|
10
|
-
export default class ExportNamedDeclaration extends NodeBase {
|
|
11
|
-
type: NodeType.ExportNamedDeclaration;
|
|
12
|
-
declaration:
|
|
13
|
-
| FunctionDeclaration
|
|
14
|
-
| ClassDeclaration
|
|
15
|
-
| VariableDeclaration
|
|
16
|
-
| null;
|
|
17
|
-
specifiers: ExportSpecifier[];
|
|
18
|
-
source: Literal<string> | null;
|
|
19
|
-
isExportDeclaration: true;
|
|
20
|
-
bindChildren(): void;
|
|
21
|
-
hasEffects(options: ExecutionPathOptions): boolean;
|
|
22
|
-
initialiseNode(): void;
|
|
23
|
-
render(code: MagicString, es: boolean): void;
|
|
24
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import ThisExpression from "./ThisExpression";
|
|
2
|
-
import ArrayExpression from "./ArrayExpression";
|
|
3
|
-
import ObjectExpression from "./ObjectExpression";
|
|
4
|
-
import FunctionExpression from "./FunctionExpression";
|
|
5
|
-
import UnaryExpression from "./UnaryExpression";
|
|
6
|
-
import UpdateExpression from "./UpdateExpression";
|
|
7
|
-
import BinaryExpression from "./BinaryExpression";
|
|
8
|
-
import AssignmentExpression from "./AssignmentExpression";
|
|
9
|
-
import LogicalExpression from "./LogicalExpression";
|
|
10
|
-
import MemberExpression from "./MemberExpression";
|
|
11
|
-
import ConditionalExpression from "./ConditionalExpression";
|
|
12
|
-
import CallExpression from "./CallExpression";
|
|
13
|
-
import NewExpression from "./NewExpression";
|
|
14
|
-
import SequenceExpression from "./SequenceExpression";
|
|
15
|
-
import ArrowFunctionExpression from "./ArrowFunctionExpression";
|
|
16
|
-
import YieldExpression from "./YieldExpression";
|
|
17
|
-
import Identifier from "./Identifier";
|
|
18
|
-
import Literal from "./Literal";
|
|
19
|
-
import AwaitExpression from "./AwaitExpression";
|
|
20
|
-
import TemplateLiteral from "./TemplateLiteral";
|
|
21
|
-
import TaggedTemplateExpression from "./TaggedTemplateExpression";
|
|
22
|
-
import ClassExpression from "./ClassExpression";
|
|
23
|
-
declare type Expression =
|
|
24
|
-
| ThisExpression
|
|
25
|
-
| ArrayExpression
|
|
26
|
-
| ObjectExpression
|
|
27
|
-
| FunctionExpression
|
|
28
|
-
| UnaryExpression
|
|
29
|
-
| UpdateExpression
|
|
30
|
-
| BinaryExpression
|
|
31
|
-
| AssignmentExpression
|
|
32
|
-
| LogicalExpression
|
|
33
|
-
| MemberExpression
|
|
34
|
-
| ConditionalExpression
|
|
35
|
-
| CallExpression
|
|
36
|
-
| NewExpression
|
|
37
|
-
| SequenceExpression
|
|
38
|
-
| ArrowFunctionExpression
|
|
39
|
-
| YieldExpression
|
|
40
|
-
| TemplateLiteral
|
|
41
|
-
| TaggedTemplateExpression
|
|
42
|
-
| ClassExpression
|
|
43
|
-
| Identifier
|
|
44
|
-
| Literal
|
|
45
|
-
| AwaitExpression;
|
|
46
|
-
export default Expression;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import VariableDeclaration from "./VariableDeclaration";
|
|
2
|
-
import Scope from "../scopes/Scope";
|
|
3
|
-
import ExecutionPathOptions from "../ExecutionPathOptions";
|
|
4
|
-
import { StatementBase, StatementNode } from "./shared/Statement";
|
|
5
|
-
import { PatternNode } from "./shared/Pattern";
|
|
6
|
-
import { NodeType } from "./index";
|
|
7
|
-
import { ExpressionNode } from "./shared/Node";
|
|
8
|
-
export default class ForInStatement extends StatementBase {
|
|
9
|
-
type: NodeType.ForInStatement;
|
|
10
|
-
left: VariableDeclaration | PatternNode;
|
|
11
|
-
right: ExpressionNode;
|
|
12
|
-
body: StatementNode;
|
|
13
|
-
hasEffects(options: ExecutionPathOptions): boolean;
|
|
14
|
-
initialiseChildren(): void;
|
|
15
|
-
includeInBundle(): boolean;
|
|
16
|
-
initialiseScope(parentScope: Scope): void;
|
|
17
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import ExecutionPathOptions from "../ExecutionPathOptions";
|
|
2
|
-
import VariableDeclaration from "./VariableDeclaration";
|
|
3
|
-
import Scope from "../scopes/Scope";
|
|
4
|
-
import { StatementBase, StatementNode } from "./shared/Statement";
|
|
5
|
-
import { PatternNode } from "./shared/Pattern";
|
|
6
|
-
import { NodeType } from "./index";
|
|
7
|
-
import { ExpressionNode } from "./shared/Node";
|
|
8
|
-
export default class ForOfStatement extends StatementBase {
|
|
9
|
-
type: NodeType.ForOfStatement;
|
|
10
|
-
left: VariableDeclaration | PatternNode;
|
|
11
|
-
right: ExpressionNode;
|
|
12
|
-
body: StatementNode;
|
|
13
|
-
bindNode(): void;
|
|
14
|
-
hasEffects(options: ExecutionPathOptions): boolean;
|
|
15
|
-
includeInBundle(): boolean;
|
|
16
|
-
initialiseChildren(): void;
|
|
17
|
-
initialiseScope(parentScope: Scope): void;
|
|
18
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import VariableDeclaration from "./VariableDeclaration";
|
|
2
|
-
import ExecutionPathOptions from "../ExecutionPathOptions";
|
|
3
|
-
import Scope from "../scopes/Scope";
|
|
4
|
-
import { StatementBase, StatementNode } from "./shared/Statement";
|
|
5
|
-
import { NodeType } from "./index";
|
|
6
|
-
import { ExpressionNode } from "./shared/Node";
|
|
7
|
-
export default class ForStatement extends StatementBase {
|
|
8
|
-
type: NodeType.ForStatement;
|
|
9
|
-
init: VariableDeclaration | ExpressionNode | null;
|
|
10
|
-
test: ExpressionNode | null;
|
|
11
|
-
update: ExpressionNode | null;
|
|
12
|
-
body: StatementNode;
|
|
13
|
-
hasEffects(options: ExecutionPathOptions): boolean;
|
|
14
|
-
initialiseChildren(): void;
|
|
15
|
-
initialiseScope(parentScope: Scope): void;
|
|
16
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import FunctionNode from "./shared/FunctionNode";
|
|
2
|
-
import Scope from "../scopes/Scope";
|
|
3
|
-
import MagicString from "magic-string";
|
|
4
|
-
import { NodeType } from "./index";
|
|
5
|
-
export default class FunctionDeclaration extends FunctionNode {
|
|
6
|
-
type: NodeType.FunctionDeclaration;
|
|
7
|
-
initialiseChildren(parentScope: Scope): void;
|
|
8
|
-
render(code: MagicString, es: boolean): void;
|
|
9
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/// <reference path="../../../../../src/ast/nodes/Identifier.d.ts" />
|
|
2
|
-
import { Node, NodeBase } from "./shared/Node";
|
|
3
|
-
import Scope from "../scopes/Scope";
|
|
4
|
-
import ExecutionPathOptions from "../ExecutionPathOptions";
|
|
5
|
-
import Variable from "../variables/Variable";
|
|
6
|
-
import CallOptions from "../CallOptions";
|
|
7
|
-
import MagicString from "magic-string";
|
|
8
|
-
import { ObjectPath } from "../variables/VariableReassignmentTracker";
|
|
9
|
-
import {
|
|
10
|
-
ExpressionEntity,
|
|
11
|
-
ForEachReturnExpressionCallback,
|
|
12
|
-
SomeReturnExpressionCallback
|
|
13
|
-
} from "./shared/Expression";
|
|
14
|
-
import { NodeType } from "./index";
|
|
15
|
-
export declare function isIdentifier(node: Node): node is Identifier;
|
|
16
|
-
export default class Identifier extends NodeBase {
|
|
17
|
-
type: NodeType.Identifier;
|
|
18
|
-
name: string;
|
|
19
|
-
variable: Variable;
|
|
20
|
-
private isBound;
|
|
21
|
-
bindNode(): void;
|
|
22
|
-
forEachReturnExpressionWhenCalledAtPath(
|
|
23
|
-
path: ObjectPath,
|
|
24
|
-
callOptions: CallOptions,
|
|
25
|
-
callback: ForEachReturnExpressionCallback,
|
|
26
|
-
options: ExecutionPathOptions
|
|
27
|
-
): void;
|
|
28
|
-
hasEffectsWhenAccessedAtPath(
|
|
29
|
-
path: ObjectPath,
|
|
30
|
-
options: ExecutionPathOptions
|
|
31
|
-
): boolean;
|
|
32
|
-
hasEffectsWhenAssignedAtPath(
|
|
33
|
-
path: ObjectPath,
|
|
34
|
-
options: ExecutionPathOptions
|
|
35
|
-
): boolean;
|
|
36
|
-
hasEffectsWhenCalledAtPath(
|
|
37
|
-
path: ObjectPath,
|
|
38
|
-
callOptions: CallOptions,
|
|
39
|
-
options: ExecutionPathOptions
|
|
40
|
-
): boolean;
|
|
41
|
-
includeInBundle(): boolean;
|
|
42
|
-
initialiseAndDeclare(
|
|
43
|
-
parentScope: Scope,
|
|
44
|
-
kind: string,
|
|
45
|
-
init: ExpressionEntity | null
|
|
46
|
-
): void;
|
|
47
|
-
reassignPath(path: ObjectPath, options: ExecutionPathOptions): void;
|
|
48
|
-
private disallowImportReassignment();
|
|
49
|
-
render(code: MagicString, es: boolean): void;
|
|
50
|
-
someReturnExpressionWhenCalledAtPath(
|
|
51
|
-
path: ObjectPath,
|
|
52
|
-
callOptions: CallOptions,
|
|
53
|
-
predicateFunction: SomeReturnExpressionCallback,
|
|
54
|
-
options: ExecutionPathOptions
|
|
55
|
-
): boolean;
|
|
56
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import Scope from "../scopes/Scope";
|
|
2
|
-
import { ExpressionNode } from "./shared/Node";
|
|
3
|
-
import MagicString from "magic-string";
|
|
4
|
-
import { StatementBase, StatementNode } from "./shared/Statement";
|
|
5
|
-
import { NodeType } from "./index";
|
|
6
|
-
export default class IfStatement extends StatementBase {
|
|
7
|
-
type: NodeType.IfStatement;
|
|
8
|
-
test: ExpressionNode;
|
|
9
|
-
consequent: StatementNode;
|
|
10
|
-
alternate: StatementNode | null;
|
|
11
|
-
testValue: any;
|
|
12
|
-
hoistedVars: string[];
|
|
13
|
-
initialiseChildren(parentScope: Scope): void;
|
|
14
|
-
render(code: MagicString, es: boolean): void;
|
|
15
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import CallExpression from "./CallExpression";
|
|
2
|
-
import { NodeType } from "./index";
|
|
3
|
-
import MagicString from "magic-string";
|
|
4
|
-
import NamespaceVariable from "../variables/NamespaceVariable";
|
|
5
|
-
import { NodeBase } from "./shared/Node";
|
|
6
|
-
export interface DynamicImportMechanism {
|
|
7
|
-
left: string;
|
|
8
|
-
right: string;
|
|
9
|
-
}
|
|
10
|
-
export default class Import extends NodeBase {
|
|
11
|
-
type: NodeType.Import;
|
|
12
|
-
parent: CallExpression;
|
|
13
|
-
private resolution;
|
|
14
|
-
private mechanism;
|
|
15
|
-
setResolution(
|
|
16
|
-
resolution: NamespaceVariable | string | void,
|
|
17
|
-
mechanism?: DynamicImportMechanism | void
|
|
18
|
-
): void;
|
|
19
|
-
render(code: MagicString, _es: boolean): void;
|
|
20
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { NodeBase } from "./shared/Node";
|
|
2
|
-
import Literal from "./Literal";
|
|
3
|
-
import ImportSpecifier from "./ImportSpecifier";
|
|
4
|
-
import ImportDefaultSpecifier from "./ImportDefaultSpecifier";
|
|
5
|
-
import ImportNamespaceSpecifier from "./ImportNamespaceSpecifier";
|
|
6
|
-
import MagicString from "magic-string";
|
|
7
|
-
import { NodeType } from "./index";
|
|
8
|
-
export default class ImportDeclaration extends NodeBase {
|
|
9
|
-
type: NodeType.ImportDeclaration;
|
|
10
|
-
isImportDeclaration: true;
|
|
11
|
-
specifiers: (
|
|
12
|
-
| ImportSpecifier
|
|
13
|
-
| ImportDefaultSpecifier
|
|
14
|
-
| ImportNamespaceSpecifier)[];
|
|
15
|
-
source: Literal<string>;
|
|
16
|
-
bindChildren(): void;
|
|
17
|
-
initialiseNode(): void;
|
|
18
|
-
render(code: MagicString): void;
|
|
19
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import ExecutionPathOptions from "../ExecutionPathOptions";
|
|
2
|
-
import Identifier from "./Identifier";
|
|
3
|
-
import { StatementBase, StatementNode } from "./shared/Statement";
|
|
4
|
-
import { NodeType } from "./index";
|
|
5
|
-
export default class LabeledStatement extends StatementBase {
|
|
6
|
-
type: NodeType.LabeledStatement;
|
|
7
|
-
label: Identifier;
|
|
8
|
-
body: StatementNode;
|
|
9
|
-
hasEffects(options: ExecutionPathOptions): boolean;
|
|
10
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import ExecutionPathOptions from "../ExecutionPathOptions";
|
|
2
|
-
import MagicString from "magic-string";
|
|
3
|
-
import { ObjectPath } from "../variables/VariableReassignmentTracker";
|
|
4
|
-
import { Node, NodeBase } from "./shared/Node";
|
|
5
|
-
import { NodeType } from "./index";
|
|
6
|
-
export declare function isLiteral(node: Node): node is Literal;
|
|
7
|
-
export default class Literal<
|
|
8
|
-
T = string | boolean | null | number | RegExp
|
|
9
|
-
> extends NodeBase {
|
|
10
|
-
type: NodeType.Literal;
|
|
11
|
-
value: T;
|
|
12
|
-
getValue(): T;
|
|
13
|
-
hasEffectsWhenAccessedAtPath(
|
|
14
|
-
path: ObjectPath,
|
|
15
|
-
_options: ExecutionPathOptions
|
|
16
|
-
): boolean;
|
|
17
|
-
hasEffectsWhenAssignedAtPath(
|
|
18
|
-
path: ObjectPath,
|
|
19
|
-
_options: ExecutionPathOptions
|
|
20
|
-
): boolean;
|
|
21
|
-
render(code: MagicString, _es: boolean): void;
|
|
22
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import CallOptions from "../CallOptions";
|
|
2
|
-
import ExecutionPathOptions from "../ExecutionPathOptions";
|
|
3
|
-
import { ObjectPath } from "../variables/VariableReassignmentTracker";
|
|
4
|
-
import {
|
|
5
|
-
ForEachReturnExpressionCallback,
|
|
6
|
-
PredicateFunction,
|
|
7
|
-
SomeReturnExpressionCallback
|
|
8
|
-
} from "./shared/Expression";
|
|
9
|
-
import { NodeType } from "./index";
|
|
10
|
-
import { ExpressionNode, NodeBase } from "./shared/Node";
|
|
11
|
-
export declare type LogicalOperator = "||" | "&&";
|
|
12
|
-
export default class LogicalExpression extends NodeBase {
|
|
13
|
-
type: NodeType.LogicalExpression;
|
|
14
|
-
operator: LogicalOperator;
|
|
15
|
-
left: ExpressionNode;
|
|
16
|
-
right: ExpressionNode;
|
|
17
|
-
reassignPath(path: ObjectPath, options: ExecutionPathOptions): void;
|
|
18
|
-
forEachReturnExpressionWhenCalledAtPath(
|
|
19
|
-
path: ObjectPath,
|
|
20
|
-
callOptions: CallOptions,
|
|
21
|
-
callback: ForEachReturnExpressionCallback,
|
|
22
|
-
options: ExecutionPathOptions
|
|
23
|
-
): void;
|
|
24
|
-
getValue(): any;
|
|
25
|
-
hasEffects(options: ExecutionPathOptions): boolean;
|
|
26
|
-
hasEffectsWhenAccessedAtPath(
|
|
27
|
-
path: ObjectPath,
|
|
28
|
-
options: ExecutionPathOptions
|
|
29
|
-
): boolean;
|
|
30
|
-
hasEffectsWhenAssignedAtPath(
|
|
31
|
-
path: ObjectPath,
|
|
32
|
-
options: ExecutionPathOptions
|
|
33
|
-
): boolean;
|
|
34
|
-
hasEffectsWhenCalledAtPath(
|
|
35
|
-
path: ObjectPath,
|
|
36
|
-
callOptions: CallOptions,
|
|
37
|
-
options: ExecutionPathOptions
|
|
38
|
-
): boolean;
|
|
39
|
-
someReturnExpressionWhenCalledAtPath(
|
|
40
|
-
path: ObjectPath,
|
|
41
|
-
callOptions: CallOptions,
|
|
42
|
-
predicateFunction: SomeReturnExpressionCallback,
|
|
43
|
-
options: ExecutionPathOptions
|
|
44
|
-
): boolean;
|
|
45
|
-
_forEachRelevantBranch(callback: (node: ExpressionNode) => void): void;
|
|
46
|
-
_someRelevantBranch(predicateFunction: PredicateFunction): boolean;
|
|
47
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { ExpressionNode, Node, NodeBase } from "./shared/Node";
|
|
2
|
-
import {
|
|
3
|
-
ObjectPath,
|
|
4
|
-
ObjectPathKey
|
|
5
|
-
} from "../variables/VariableReassignmentTracker";
|
|
6
|
-
import Variable from "../variables/Variable";
|
|
7
|
-
import ExecutionPathOptions from "../ExecutionPathOptions";
|
|
8
|
-
import CallOptions from "../CallOptions";
|
|
9
|
-
import MagicString from "magic-string";
|
|
10
|
-
import {
|
|
11
|
-
ForEachReturnExpressionCallback,
|
|
12
|
-
SomeReturnExpressionCallback
|
|
13
|
-
} from "./shared/Expression";
|
|
14
|
-
import { NodeType } from "./index";
|
|
15
|
-
export declare function isMemberExpression(
|
|
16
|
-
node: Node
|
|
17
|
-
): node is MemberExpression;
|
|
18
|
-
export default class MemberExpression extends NodeBase {
|
|
19
|
-
type: NodeType.MemberExpression;
|
|
20
|
-
object: ExpressionNode;
|
|
21
|
-
property: ExpressionNode;
|
|
22
|
-
computed: boolean;
|
|
23
|
-
propertyKey: ObjectPathKey;
|
|
24
|
-
variable: Variable;
|
|
25
|
-
private isBound;
|
|
26
|
-
private replacement;
|
|
27
|
-
private arePropertyReadSideEffectsChecked;
|
|
28
|
-
bind(): void;
|
|
29
|
-
private resolveNamespaceVariables(baseVariable, path);
|
|
30
|
-
forEachReturnExpressionWhenCalledAtPath(
|
|
31
|
-
path: ObjectPath,
|
|
32
|
-
callOptions: CallOptions,
|
|
33
|
-
callback: ForEachReturnExpressionCallback,
|
|
34
|
-
options: ExecutionPathOptions
|
|
35
|
-
): void;
|
|
36
|
-
hasEffects(options: ExecutionPathOptions): boolean;
|
|
37
|
-
hasEffectsWhenAccessedAtPath(
|
|
38
|
-
path: ObjectPath,
|
|
39
|
-
options: ExecutionPathOptions
|
|
40
|
-
): boolean;
|
|
41
|
-
hasEffectsWhenAssignedAtPath(
|
|
42
|
-
path: ObjectPath,
|
|
43
|
-
options: ExecutionPathOptions
|
|
44
|
-
): boolean;
|
|
45
|
-
hasEffectsWhenCalledAtPath(
|
|
46
|
-
path: ObjectPath,
|
|
47
|
-
callOptions: CallOptions,
|
|
48
|
-
options: ExecutionPathOptions
|
|
49
|
-
): boolean;
|
|
50
|
-
includeInBundle(): boolean;
|
|
51
|
-
initialiseNode(): void;
|
|
52
|
-
reassignPath(path: ObjectPath, options: ExecutionPathOptions): void;
|
|
53
|
-
private disallowNamespaceReassignment();
|
|
54
|
-
render(code: MagicString, es: boolean): void;
|
|
55
|
-
someReturnExpressionWhenCalledAtPath(
|
|
56
|
-
path: ObjectPath,
|
|
57
|
-
callOptions: CallOptions,
|
|
58
|
-
predicateFunction: SomeReturnExpressionCallback,
|
|
59
|
-
options: ExecutionPathOptions
|
|
60
|
-
): boolean;
|
|
61
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ExpressionNode, NodeBase } from "./shared/Node";
|
|
2
|
-
import ExecutionPathOptions from "../ExecutionPathOptions";
|
|
3
|
-
import FunctionExpression from "./FunctionExpression";
|
|
4
|
-
import CallOptions from "../CallOptions";
|
|
5
|
-
import { ObjectPath } from "../variables/VariableReassignmentTracker";
|
|
6
|
-
import { NodeType } from "./index";
|
|
7
|
-
export default class MethodDefinition extends NodeBase {
|
|
8
|
-
type: NodeType.MethodDefinition;
|
|
9
|
-
key: ExpressionNode;
|
|
10
|
-
value: FunctionExpression;
|
|
11
|
-
kind: "constructor" | "method" | "get" | "set";
|
|
12
|
-
computed: boolean;
|
|
13
|
-
static: boolean;
|
|
14
|
-
hasEffects(options: ExecutionPathOptions): boolean;
|
|
15
|
-
hasEffectsWhenCalledAtPath(
|
|
16
|
-
path: ObjectPath,
|
|
17
|
-
callOptions: CallOptions,
|
|
18
|
-
options: ExecutionPathOptions
|
|
19
|
-
): boolean;
|
|
20
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import CallOptions from "../CallOptions";
|
|
2
|
-
import ExecutionPathOptions from "../ExecutionPathOptions";
|
|
3
|
-
import { ObjectPath } from "../variables/VariableReassignmentTracker";
|
|
4
|
-
import { ExpressionNode, NodeBase } from "./shared/Node";
|
|
5
|
-
import { NodeType } from "./index";
|
|
6
|
-
export default class NewExpression extends NodeBase {
|
|
7
|
-
type: NodeType.NewExpression;
|
|
8
|
-
callee: ExpressionNode;
|
|
9
|
-
arguments: ExpressionNode[];
|
|
10
|
-
_callOptions: CallOptions;
|
|
11
|
-
hasEffects(options: ExecutionPathOptions): boolean;
|
|
12
|
-
hasEffectsWhenAccessedAtPath(
|
|
13
|
-
path: ObjectPath,
|
|
14
|
-
_options: ExecutionPathOptions
|
|
15
|
-
): boolean;
|
|
16
|
-
initialiseNode(): void;
|
|
17
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ObjectPath,
|
|
3
|
-
ObjectPathKey
|
|
4
|
-
} from "../variables/VariableReassignmentTracker";
|
|
5
|
-
import Property from "./Property";
|
|
6
|
-
import CallOptions from "../CallOptions";
|
|
7
|
-
import ExecutionPathOptions from "../ExecutionPathOptions";
|
|
8
|
-
import {
|
|
9
|
-
ExpressionEntity,
|
|
10
|
-
ForEachReturnExpressionCallback,
|
|
11
|
-
SomeReturnExpressionCallback
|
|
12
|
-
} from "./shared/Expression";
|
|
13
|
-
import { NodeBase } from "./shared/Node";
|
|
14
|
-
import { NodeType } from "./index";
|
|
15
|
-
export declare const UNKNOWN_OBJECT_EXPRESSION: ExpressionEntity;
|
|
16
|
-
export default class ObjectExpression extends NodeBase {
|
|
17
|
-
type: NodeType.ObjectExpression;
|
|
18
|
-
properties: Property[];
|
|
19
|
-
reassignPath(path: ObjectPath, options: ExecutionPathOptions): void;
|
|
20
|
-
forEachReturnExpressionWhenCalledAtPath(
|
|
21
|
-
path: ObjectPath,
|
|
22
|
-
callOptions: CallOptions,
|
|
23
|
-
callback: ForEachReturnExpressionCallback,
|
|
24
|
-
options: ExecutionPathOptions
|
|
25
|
-
): void;
|
|
26
|
-
_getPossiblePropertiesWithName(
|
|
27
|
-
name: ObjectPathKey,
|
|
28
|
-
kinds: ObjectPath
|
|
29
|
-
): {
|
|
30
|
-
properties: Property[];
|
|
31
|
-
hasCertainHit: boolean;
|
|
32
|
-
};
|
|
33
|
-
hasEffectsWhenAccessedAtPath(
|
|
34
|
-
path: ObjectPath,
|
|
35
|
-
options: ExecutionPathOptions
|
|
36
|
-
): boolean;
|
|
37
|
-
hasEffectsWhenAssignedAtPath(
|
|
38
|
-
path: ObjectPath,
|
|
39
|
-
options: ExecutionPathOptions
|
|
40
|
-
): boolean;
|
|
41
|
-
hasEffectsWhenCalledAtPath(
|
|
42
|
-
path: ObjectPath,
|
|
43
|
-
callOptions: CallOptions,
|
|
44
|
-
options: ExecutionPathOptions
|
|
45
|
-
): boolean;
|
|
46
|
-
someReturnExpressionWhenCalledAtPath(
|
|
47
|
-
path: ObjectPath,
|
|
48
|
-
callOptions: CallOptions,
|
|
49
|
-
predicateFunction: SomeReturnExpressionCallback,
|
|
50
|
-
options: ExecutionPathOptions
|
|
51
|
-
): boolean;
|
|
52
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import AssignmentProperty from "./AssignmentProperty";
|
|
2
|
-
import Scope from "../scopes/Scope";
|
|
3
|
-
import ExecutionPathOptions from "../ExecutionPathOptions";
|
|
4
|
-
import { ObjectPath } from "../variables/VariableReassignmentTracker";
|
|
5
|
-
import { ExpressionEntity } from "./shared/Expression";
|
|
6
|
-
import { PatternNode } from "./shared/Pattern";
|
|
7
|
-
import { NodeBase } from "./shared/Node";
|
|
8
|
-
import { NodeType } from "./index";
|
|
9
|
-
export default class ObjectPattern extends NodeBase implements PatternNode {
|
|
10
|
-
type: NodeType.ObjectPattern;
|
|
11
|
-
properties: AssignmentProperty[];
|
|
12
|
-
reassignPath(path: ObjectPath, options: ExecutionPathOptions): void;
|
|
13
|
-
hasEffectsWhenAssignedAtPath(
|
|
14
|
-
path: ObjectPath,
|
|
15
|
-
options: ExecutionPathOptions
|
|
16
|
-
): boolean;
|
|
17
|
-
initialiseAndDeclare(
|
|
18
|
-
parentScope: Scope,
|
|
19
|
-
kind: string,
|
|
20
|
-
init: ExpressionEntity | null
|
|
21
|
-
): void;
|
|
22
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import ObjectPattern from "./ObjectPattern";
|
|
2
|
-
import ArrayPattern from "./ArrayPattern";
|
|
3
|
-
import RestElement from "./RestElement";
|
|
4
|
-
import AssignmentPattern from "./AssignmentPattern";
|
|
5
|
-
import Identifier from "./Identifier";
|
|
6
|
-
declare type Pattern =
|
|
7
|
-
| ObjectPattern
|
|
8
|
-
| ArrayPattern
|
|
9
|
-
| RestElement
|
|
10
|
-
| AssignmentPattern
|
|
11
|
-
| Identifier;
|
|
12
|
-
export default Pattern;
|