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.
Files changed (189) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +40 -4
  3. package/bin/rollup +13 -4
  4. package/dist/rollup.browser.js +134 -79
  5. package/dist/rollup.es.js +135 -80
  6. package/dist/rollup.js +136 -81
  7. package/dist/typings/Chunk.d.ts +4 -0
  8. package/dist/typings/Graph.d.ts +1 -2
  9. package/dist/typings/rollup/index.d.ts +1 -0
  10. package/dist/typings/utils/defaults.d.ts +2 -1
  11. package/dist/typings/utils/renderHelpers.d.ts +12 -0
  12. package/dist/typings/watch/index.d.ts +1 -1
  13. package/package.json +10 -5
  14. package/dist/typings/Bundle.d.ts +0 -29
  15. package/dist/typings/ast/Node.d.ts +0 -185
  16. package/dist/typings/ast/nodes/Declaration.d.ts +0 -8
  17. package/dist/typings/ast/nodes/Expression.d.ts +0 -46
  18. package/dist/typings/ast/nodes/Pattern.d.ts +0 -12
  19. package/dist/typings/ast/nodes/Statement.d.ts +0 -10
  20. package/dist/typings/ast/nodes/shared/VirtualObjectExpression.d.ts +0 -7
  21. package/dist/typings/ast/nodes/shared/disallowIllegalReassignment.d.ts +0 -6
  22. package/dist/typings/bin/src/index.d.ts +0 -1
  23. package/dist/typings/bin/src/logging.d.ts +0 -3
  24. package/dist/typings/bin/src/run/alternateScreen.d.ts +0 -8
  25. package/dist/typings/bin/src/run/batchWarnings.d.ts +0 -11
  26. package/dist/typings/bin/src/run/build.d.ts +0 -9
  27. package/dist/typings/bin/src/run/index.d.ts +0 -1
  28. package/dist/typings/bin/src/run/loadConfigFile.d.ts +0 -6
  29. package/dist/typings/bin/src/run/watch.d.ts +0 -8
  30. package/dist/typings/bin/src/sourceMappingUrl.d.ts +0 -2
  31. package/dist/typings/bin/src/utils/sequence.d.ts +0 -4
  32. package/dist/typings/browser/fs.d.ts +0 -5
  33. package/dist/typings/browser/path.d.ts +0 -10
  34. package/dist/typings/src/Bundle.d.ts +0 -29
  35. package/dist/typings/src/ExternalModule.d.ts +0 -23
  36. package/dist/typings/src/Graph.d.ts +0 -60
  37. package/dist/typings/src/Module.d.ts +0 -137
  38. package/dist/typings/src/ast/CallOptions.d.ts +0 -24
  39. package/dist/typings/src/ast/Entity.d.ts +0 -19
  40. package/dist/typings/src/ast/ExecutionPathOptions.d.ts +0 -97
  41. package/dist/typings/src/ast/Node.d.ts +0 -186
  42. package/dist/typings/src/ast/clone.d.ts +0 -1
  43. package/dist/typings/src/ast/comment.d.ts +0 -4
  44. package/dist/typings/src/ast/enhance.d.ts +0 -7
  45. package/dist/typings/src/ast/keys.d.ts +0 -4
  46. package/dist/typings/src/ast/nodes/ArrayExpression.d.ts +0 -9
  47. package/dist/typings/src/ast/nodes/ArrayPattern.d.ts +0 -21
  48. package/dist/typings/src/ast/nodes/ArrowFunctionExpression.d.ts +0 -48
  49. package/dist/typings/src/ast/nodes/AssignmentExpression.d.ts +0 -16
  50. package/dist/typings/src/ast/nodes/AssignmentPattern.d.ts +0 -23
  51. package/dist/typings/src/ast/nodes/AssignmentProperty.d.ts +0 -10
  52. package/dist/typings/src/ast/nodes/AwaitExpression.d.ts +0 -8
  53. package/dist/typings/src/ast/nodes/BinaryExpression.d.ts +0 -38
  54. package/dist/typings/src/ast/nodes/BlockStatement.d.ts +0 -19
  55. package/dist/typings/src/ast/nodes/BreakStatement.d.ts +0 -9
  56. package/dist/typings/src/ast/nodes/CallExpression.d.ts +0 -45
  57. package/dist/typings/src/ast/nodes/CatchClause.d.ts +0 -14
  58. package/dist/typings/src/ast/nodes/ClassBody.d.ts +0 -17
  59. package/dist/typings/src/ast/nodes/ClassDeclaration.d.ts +0 -11
  60. package/dist/typings/src/ast/nodes/ClassExpression.d.ts +0 -10
  61. package/dist/typings/src/ast/nodes/ConditionalExpression.d.ts +0 -50
  62. package/dist/typings/src/ast/nodes/Declaration.d.ts +0 -8
  63. package/dist/typings/src/ast/nodes/DoWhileStatement.d.ts +0 -10
  64. package/dist/typings/src/ast/nodes/EmptyStatement.d.ts +0 -7
  65. package/dist/typings/src/ast/nodes/ExportAllDeclaration.d.ts +0 -11
  66. package/dist/typings/src/ast/nodes/ExportDefaultDeclaration.d.ts +0 -18
  67. package/dist/typings/src/ast/nodes/ExportNamedDeclaration.d.ts +0 -24
  68. package/dist/typings/src/ast/nodes/ExportSpecifier.d.ts +0 -8
  69. package/dist/typings/src/ast/nodes/Expression.d.ts +0 -46
  70. package/dist/typings/src/ast/nodes/ExpressionStatement.d.ts +0 -5
  71. package/dist/typings/src/ast/nodes/ForInStatement.d.ts +0 -17
  72. package/dist/typings/src/ast/nodes/ForOfStatement.d.ts +0 -18
  73. package/dist/typings/src/ast/nodes/ForStatement.d.ts +0 -16
  74. package/dist/typings/src/ast/nodes/FunctionDeclaration.d.ts +0 -9
  75. package/dist/typings/src/ast/nodes/FunctionExpression.d.ts +0 -6
  76. package/dist/typings/src/ast/nodes/Identifier.d.ts +0 -56
  77. package/dist/typings/src/ast/nodes/IfStatement.d.ts +0 -15
  78. package/dist/typings/src/ast/nodes/Import.d.ts +0 -20
  79. package/dist/typings/src/ast/nodes/ImportDeclaration.d.ts +0 -19
  80. package/dist/typings/src/ast/nodes/ImportDefaultSpecifier.d.ts +0 -7
  81. package/dist/typings/src/ast/nodes/ImportNamespaceSpecifier.d.ts +0 -7
  82. package/dist/typings/src/ast/nodes/ImportSpecifier.d.ts +0 -8
  83. package/dist/typings/src/ast/nodes/LabeledStatement.d.ts +0 -10
  84. package/dist/typings/src/ast/nodes/Literal.d.ts +0 -22
  85. package/dist/typings/src/ast/nodes/LogicalExpression.d.ts +0 -47
  86. package/dist/typings/src/ast/nodes/MemberExpression.d.ts +0 -61
  87. package/dist/typings/src/ast/nodes/MethodDefinition.d.ts +0 -20
  88. package/dist/typings/src/ast/nodes/NewExpression.d.ts +0 -17
  89. package/dist/typings/src/ast/nodes/ObjectExpression.d.ts +0 -52
  90. package/dist/typings/src/ast/nodes/ObjectPattern.d.ts +0 -22
  91. package/dist/typings/src/ast/nodes/Pattern.d.ts +0 -12
  92. package/dist/typings/src/ast/nodes/Program.d.ts +0 -7
  93. package/dist/typings/src/ast/nodes/Property.d.ts +0 -57
  94. package/dist/typings/src/ast/nodes/RestElement.d.ts +0 -21
  95. package/dist/typings/src/ast/nodes/ReturnStatement.d.ts +0 -10
  96. package/dist/typings/src/ast/nodes/SequenceExpression.d.ts +0 -12
  97. package/dist/typings/src/ast/nodes/SpreadElement.d.ts +0 -6
  98. package/dist/typings/src/ast/nodes/Statement.d.ts +0 -10
  99. package/dist/typings/src/ast/nodes/SwitchCase.d.ts +0 -9
  100. package/dist/typings/src/ast/nodes/SwitchStatement.d.ts +0 -13
  101. package/dist/typings/src/ast/nodes/TaggedTemplateExpression.d.ts +0 -13
  102. package/dist/typings/src/ast/nodes/TemplateElement.d.ts +0 -12
  103. package/dist/typings/src/ast/nodes/TemplateLiteral.d.ts +0 -10
  104. package/dist/typings/src/ast/nodes/ThisExpression.d.ts +0 -22
  105. package/dist/typings/src/ast/nodes/ThrowStatement.d.ts +0 -9
  106. package/dist/typings/src/ast/nodes/UnaryExpression.d.ts +0 -19
  107. package/dist/typings/src/ast/nodes/UnknownNode.d.ts +0 -5
  108. package/dist/typings/src/ast/nodes/UpdateExpression.d.ts +0 -16
  109. package/dist/typings/src/ast/nodes/VariableDeclaration.d.ts +0 -23
  110. package/dist/typings/src/ast/nodes/VariableDeclarator.d.ts +0 -15
  111. package/dist/typings/src/ast/nodes/WhileStatement.d.ts +0 -10
  112. package/dist/typings/src/ast/nodes/YieldExpression.d.ts +0 -9
  113. package/dist/typings/src/ast/nodes/index.d.ts +0 -69
  114. package/dist/typings/src/ast/nodes/shared/ClassNode.d.ts +0 -27
  115. package/dist/typings/src/ast/nodes/shared/Expression.d.ts +0 -42
  116. package/dist/typings/src/ast/nodes/shared/FunctionNode.d.ts +0 -42
  117. package/dist/typings/src/ast/nodes/shared/Node.d.ts +0 -169
  118. package/dist/typings/src/ast/nodes/shared/Pattern.d.ts +0 -3
  119. package/dist/typings/src/ast/nodes/shared/Statement.d.ts +0 -6
  120. package/dist/typings/src/ast/nodes/shared/VirtualObjectExpression.d.ts +0 -7
  121. package/dist/typings/src/ast/nodes/shared/disallowIllegalReassignment.d.ts +0 -6
  122. package/dist/typings/src/ast/nodes/shared/pureFunctions.d.ts +0 -4
  123. package/dist/typings/src/ast/scopes/BlockScope.d.ts +0 -12
  124. package/dist/typings/src/ast/scopes/CatchScope.d.ts +0 -13
  125. package/dist/typings/src/ast/scopes/FunctionScope.d.ts +0 -27
  126. package/dist/typings/src/ast/scopes/GlobalScope.d.ts +0 -6
  127. package/dist/typings/src/ast/scopes/ModuleScope.d.ts +0 -11
  128. package/dist/typings/src/ast/scopes/ParameterScope.d.ts +0 -16
  129. package/dist/typings/src/ast/scopes/ReturnValueScope.d.ts +0 -24
  130. package/dist/typings/src/ast/scopes/Scope.d.ts +0 -49
  131. package/dist/typings/src/ast/utils/extractNames.d.ts +0 -2
  132. package/dist/typings/src/ast/values.d.ts +0 -5
  133. package/dist/typings/src/ast/variables/ArgumentsVariable.d.ts +0 -30
  134. package/dist/typings/src/ast/variables/ExportDefaultVariable.d.ts +0 -19
  135. package/dist/typings/src/ast/variables/ExternalVariable.d.ts +0 -17
  136. package/dist/typings/src/ast/variables/GlobalVariable.d.ts +0 -12
  137. package/dist/typings/src/ast/variables/LocalVariable.d.ts +0 -51
  138. package/dist/typings/src/ast/variables/NamespaceVariable.d.ts +0 -23
  139. package/dist/typings/src/ast/variables/ParameterVariable.d.ts +0 -6
  140. package/dist/typings/src/ast/variables/ReplaceableInitializationVariable.d.ts +0 -33
  141. package/dist/typings/src/ast/variables/ThisVariable.d.ts +0 -4
  142. package/dist/typings/src/ast/variables/Variable.d.ts +0 -63
  143. package/dist/typings/src/ast/variables/VariableReassignmentTracker.d.ts +0 -25
  144. package/dist/typings/src/banner.d.ts +0 -0
  145. package/dist/typings/src/browser-entry.d.ts +0 -2
  146. package/dist/typings/src/finalisers/amd.d.ts +0 -21
  147. package/dist/typings/src/finalisers/cjs.d.ts +0 -20
  148. package/dist/typings/src/finalisers/es.d.ts +0 -17
  149. package/dist/typings/src/finalisers/iife.d.ts +0 -20
  150. package/dist/typings/src/finalisers/index.d.ts +0 -25
  151. package/dist/typings/src/finalisers/shared/esModuleExport.d.ts +0 -2
  152. package/dist/typings/src/finalisers/shared/getExportBlock.d.ts +0 -6
  153. package/dist/typings/src/finalisers/shared/getGlobalNameMaker.d.ts +0 -9
  154. package/dist/typings/src/finalisers/shared/getInteropBlock.d.ts +0 -6
  155. package/dist/typings/src/finalisers/shared/sanitize.d.ts +0 -2
  156. package/dist/typings/src/finalisers/shared/setupNamespace.d.ts +0 -7
  157. package/dist/typings/src/finalisers/shared/trimEmptyImports.d.ts +0 -5
  158. package/dist/typings/src/finalisers/shared/warnOnBuiltins.d.ts +0 -2
  159. package/dist/typings/src/finalisers/umd.d.ts +0 -21
  160. package/dist/typings/src/node-entry.d.ts +0 -5
  161. package/dist/typings/src/rollup/index.d.ts +0 -172
  162. package/dist/typings/src/utils/array.d.ts +0 -4
  163. package/dist/typings/src/utils/callIfFunction.d.ts +0 -1
  164. package/dist/typings/src/utils/collapseSourcemaps.d.ts +0 -11
  165. package/dist/typings/src/utils/defaults.d.ts +0 -6
  166. package/dist/typings/src/utils/deprecateOptions.d.ts +0 -9
  167. package/dist/typings/src/utils/dynamic-import-plugin.d.ts +0 -8
  168. package/dist/typings/src/utils/ensureArray.d.ts +0 -2
  169. package/dist/typings/src/utils/error.d.ts +0 -18
  170. package/dist/typings/src/utils/first.d.ts +0 -3
  171. package/dist/typings/src/utils/flushTime.d.ts +0 -5
  172. package/dist/typings/src/utils/fs.d.ts +0 -6
  173. package/dist/typings/src/utils/getCodeFrame.d.ts +0 -5
  174. package/dist/typings/src/utils/getExportMode.d.ts +0 -6
  175. package/dist/typings/src/utils/getIndentString.d.ts +0 -7
  176. package/dist/typings/src/utils/identifierHelpers.d.ts +0 -3
  177. package/dist/typings/src/utils/mergeOptions.d.ts +0 -21
  178. package/dist/typings/src/utils/object.d.ts +0 -9
  179. package/dist/typings/src/utils/path.d.ts +0 -6
  180. package/dist/typings/src/utils/promise.d.ts +0 -5
  181. package/dist/typings/src/utils/relativeId.d.ts +0 -1
  182. package/dist/typings/src/utils/sourceMappingURL.d.ts +0 -3
  183. package/dist/typings/src/utils/transform.d.ts +0 -16
  184. package/dist/typings/src/utils/transformBundle.d.ts +0 -8
  185. package/dist/typings/src/watch/chokidar.d.ts +0 -4
  186. package/dist/typings/src/watch/fileWatchers.d.ts +0 -23
  187. package/dist/typings/src/watch/index.d.ts +0 -48
  188. package/dist/typings/utils/array.d.ts +0 -4
  189. package/dist/typings/utils/dynamic-import-plugin.d.ts +0 -13
@@ -1,185 +0,0 @@
1
- import { PredicateFunction, UnknownAssignment } from "./values";
2
- import ExecutionPathOptions from "./ExecutionPathOptions";
3
- import Scope from "./scopes/Scope";
4
- import Module from "../Module";
5
- import MagicString from "magic-string";
6
- import CallOptions from "./CallOptions";
7
- import Expression from "./nodes/Expression";
8
- import Declaration from "./nodes/Declaration";
9
- import { ObjectPath } from "./variables/VariableReassignmentTracker";
10
- export declare type ForEachReturnExpressionCallback = (
11
- options: ExecutionPathOptions
12
- ) => (node: Node | UnknownAssignment) => void;
13
- export default class Node {
14
- type: string;
15
- keys: string[];
16
- included: boolean;
17
- scope: Scope;
18
- start: number;
19
- end: number;
20
- leadingCommentStart: number;
21
- trailingCommentEnd: number;
22
- next: number;
23
- module: Module;
24
- parent: Node | Module;
25
- __enhanced: boolean;
26
- constructor();
27
- /**
28
- * Called once all nodes have been initialised and the scopes have been populated.
29
- * Usually one should not override this function but override bindNode and/or
30
- * bindChildren instead.
31
- */
32
- bind(): void;
33
- /**
34
- * Reassign a given path of an object.
35
- * E.g., node.reassignPath(['x', 'y']) is called when something
36
- * is assigned to node.x.y.
37
- * The default noop implementation is ok as long as hasEffectsWhenAssignedAtPath
38
- * always returns true for this node. Otherwise it should be overridden.
39
- * @param {String[]} _path
40
- * @param {ExecutionPathOptions} _options
41
- */
42
- reassignPath(_path: ObjectPath, _options: ExecutionPathOptions): void;
43
- /**
44
- * Override to control on which children "bind" is called.
45
- */
46
- bindChildren(): void;
47
- /**
48
- * Override this to bind assignments to variables and do any initialisations that
49
- * require the scopes to be populated with variables.
50
- */
51
- bindNode(): void;
52
- eachChild(callback: (node: Node) => void): void;
53
- /**
54
- * Executes the callback on each possible return expression when calling this node.
55
- * @param {String[]} _path
56
- * @param {CallOptions} _callOptions
57
- * @param {Function} _callback
58
- * @param {ExecutionPathOptions} _options
59
- */
60
- forEachReturnExpressionWhenCalledAtPath(
61
- _path: ObjectPath,
62
- _callOptions: CallOptions,
63
- _callback: ForEachReturnExpressionCallback,
64
- _options: ExecutionPathOptions
65
- ): void;
66
- getValue(): {
67
- toString: () => string;
68
- };
69
- /**
70
- * Determine if this Node would have an effect on the bundle.
71
- * This is usually true for already included nodes. Exceptions are e.g. break statements
72
- * which only have an effect if their surrounding loop or switch statement is included.
73
- * The options pass on information like this about the current execution path.
74
- * @param {ExecutionPathOptions} options
75
- * @return {boolean}
76
- */
77
- hasEffects(options: ExecutionPathOptions): boolean;
78
- /**
79
- * @param {String[]} path
80
- * @param {ExecutionPathOptions} _options
81
- * @return {boolean}
82
- */
83
- hasEffectsWhenAccessedAtPath(
84
- path: ObjectPath,
85
- _options: ExecutionPathOptions
86
- ): boolean;
87
- /**
88
- * @param {String[]} _path
89
- * @param {ExecutionPathOptions} _options
90
- * @return {boolean}
91
- */
92
- hasEffectsWhenAssignedAtPath(
93
- _path: ObjectPath,
94
- _options: ExecutionPathOptions
95
- ): boolean;
96
- /**
97
- * @param {String[]} _path
98
- * @param {CallOptions} _callOptions
99
- * @param {ExecutionPathOptions} _options
100
- * @return {boolean}
101
- */
102
- hasEffectsWhenCalledAtPath(
103
- _path: ObjectPath,
104
- _callOptions: CallOptions,
105
- _options: ExecutionPathOptions
106
- ): boolean;
107
- /**
108
- * Returns true if this node or any of its children is included.
109
- * @return {boolean}
110
- */
111
- hasIncludedChild(): boolean;
112
- /**
113
- * Includes the node in the bundle. Children are usually included if they are
114
- * necessary for this node (e.g. a function body) or if they have effects.
115
- * Necessary variables need to be included as well. Should return true if any
116
- * nodes or variables have been added that were missing before.
117
- * @return {boolean}
118
- */
119
- includeInBundle(): boolean;
120
- /**
121
- * Alternative version of includeInBundle to override the default behaviour of
122
- * declarations to only include nodes for declarators that have an effect. Necessary
123
- * for for-loops that do not use a declared loop variable.
124
- * @return {boolean}
125
- */
126
- includeWithAllDeclarations(): boolean;
127
- /**
128
- * Assign a scope to this node and make sure all children have the right scopes.
129
- * Perform any additional initialisation that does not depend on the scope being
130
- * populated with variables.
131
- * Usually one should not override this function but override initialiseScope,
132
- * initialiseNode and/or initialiseChildren instead. BlockScopes have a special
133
- * alternative initialisation initialiseAndReplaceScope.
134
- * @param {Scope} parentScope
135
- */
136
- initialise(parentScope: Scope): void;
137
- initialiseAndDeclare(
138
- _parentScope: Scope,
139
- _kind: string,
140
- _init: Declaration | Expression | UnknownAssignment | null
141
- ): void;
142
- /**
143
- * Override to change how and with what scopes children are initialised
144
- * @param {Scope} _parentScope
145
- */
146
- initialiseChildren(_parentScope: Scope): void;
147
- /**
148
- * Override to perform special initialisation steps after the scope is initialised
149
- * @param {Scope} _parentScope
150
- */
151
- initialiseNode(_parentScope: Scope): void;
152
- /**
153
- * Override if this scope should receive a different scope than the parent scope.
154
- * @param {Scope} parentScope
155
- */
156
- initialiseScope(parentScope: Scope): void;
157
- insertSemicolon(code: MagicString): void;
158
- locate(): any;
159
- render(code: MagicString, es: boolean): void;
160
- /**
161
- * Start a new execution path to determine if this node has an effect on the bundle and
162
- * should therefore be included. Included nodes should always be included again in subsequent
163
- * visits as the inclusion of additional variables may require the inclusion of more child
164
- * nodes in e.g. block statements.
165
- * @return {boolean}
166
- */
167
- shouldBeIncluded(): boolean;
168
- someChild(callback: (node: Node) => boolean): boolean;
169
- /**
170
- * Returns true if some possible return expression when called at the given
171
- * path returns true. predicateFunction receives a `node` as parameter.
172
- * @param {String[]} _path
173
- * @param {CallOptions} _callOptions
174
- * @param {Function} predicateFunction
175
- * @param {ExecutionPathOptions} options
176
- * @returns {boolean}
177
- */
178
- someReturnExpressionWhenCalledAtPath(
179
- _path: ObjectPath,
180
- _callOptions: CallOptions,
181
- predicateFunction: (options: ExecutionPathOptions) => PredicateFunction,
182
- options: ExecutionPathOptions
183
- ): boolean;
184
- toString(): string;
185
- }
@@ -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,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,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;
@@ -1,10 +0,0 @@
1
- import { default as StatementBaseClass } from "./shared/Statement";
2
- import FunctionDeclaration from "./FunctionDeclaration";
3
- import VariableDeclaration from "./VariableDeclaration";
4
- import ClassDeclaration from "./ClassDeclaration";
5
- declare type Statement =
6
- | FunctionDeclaration
7
- | VariableDeclaration
8
- | ClassDeclaration
9
- | StatementBaseClass;
10
- export default Statement;
@@ -1,7 +0,0 @@
1
- import Node from "../../Node";
2
- import { ObjectPath } from "../../variables/VariableReassignmentTracker";
3
- export default class VirtualObjectExpression extends Node {
4
- hasEffectsWhenAccessedAtPath(path: ObjectPath): boolean;
5
- hasEffectsWhenAssignedAtPath(path: ObjectPath): boolean;
6
- toString(): string;
7
- }
@@ -1,6 +0,0 @@
1
- import Scope from "../../scopes/Scope";
2
- import Node from "../../Node";
3
- export default function disallowIllegalReassignment(
4
- scope: Scope,
5
- node: Node
6
- ): void;
@@ -1 +0,0 @@
1
- /// <reference path="../../../../bin/src/index.d.ts" />
@@ -1,3 +0,0 @@
1
- import { RollupError } from "../../src/utils/error";
2
- export declare const stderr: any;
3
- export declare function handleError(err: RollupError, recover?: boolean): void;
@@ -1,8 +0,0 @@
1
- /// <reference path="../../../../../bin/src/run/alternateScreen.d.ts" />
2
- export default function alternateScreen(
3
- enabled: boolean
4
- ): {
5
- open(): void;
6
- close(): void;
7
- reset(heading: string): void;
8
- };
@@ -1,11 +0,0 @@
1
- import { RollupWarning } from "../../../src/rollup/index";
2
- export interface BatchWarnings {
3
- readonly count: number;
4
- add: (warning: string | RollupWarning) => void;
5
- flush: () => void;
6
- }
7
- export default function batchWarnings(): {
8
- readonly count: number;
9
- add: (warning: string | RollupWarning) => void;
10
- flush: () => void;
11
- };
@@ -1,9 +0,0 @@
1
- /// <reference path="../../../../../bin/src/run/build.d.ts" />
2
- import { InputOptions, OutputOptions } from "../../../src/rollup/index";
3
- import { BatchWarnings } from "./batchWarnings";
4
- export default function build(
5
- inputOptions: InputOptions,
6
- outputOptions: OutputOptions[],
7
- warnings: BatchWarnings,
8
- silent?: boolean
9
- ): any;
@@ -1 +0,0 @@
1
- export default function runRollup(command: any): Promise<{}[]>;
@@ -1,6 +0,0 @@
1
- /// <reference path="../../../../../bin/src/run/loadConfigFile.d.ts" />
2
- import { InputOptions } from "../../../src/rollup/index";
3
- export default function loadConfigFile(
4
- configFile: string,
5
- silent?: boolean
6
- ): Promise<InputOptions[]>;
@@ -1,8 +0,0 @@
1
- /// <reference path="../../../../../bin/src/run/watch.d.ts" />
2
- import { RollupWatchOptions } from "../../../src/watch/index";
3
- export default function watch(
4
- configFile: string,
5
- configs: RollupWatchOptions[],
6
- command: any,
7
- silent?: boolean
8
- ): void;
@@ -1,2 +0,0 @@
1
- declare let SOURCEMAPPING_URL: string;
2
- export default SOURCEMAPPING_URL;
@@ -1,4 +0,0 @@
1
- export default function sequence<T, U>(
2
- array: T[],
3
- fn: (member: T) => Promise<U>
4
- ): Promise<U[]>;
@@ -1,5 +0,0 @@
1
- export declare const lstatSync: string;
2
- export declare const readdirSync: string;
3
- export declare const readFileSync: string;
4
- export declare const realpathSync: string;
5
- export declare const writeFile: string;
@@ -1,10 +0,0 @@
1
- export declare const absolutePath: RegExp;
2
- export declare const relativePath: RegExp;
3
- export declare function isAbsolute(path: string): boolean;
4
- export declare function isRelative(path: string): boolean;
5
- export declare function normalize(path: string): string;
6
- export declare function basename(path: string): string;
7
- export declare function dirname(path: string): string;
8
- export declare function extname(path: string): string;
9
- export declare function relative(from: string, to: string): string;
10
- export declare function resolve(...paths: string[]): string;
@@ -1,29 +0,0 @@
1
- import Module from "./Module";
2
- import { OutputOptions } from "./rollup/index";
3
- import Graph from "./Graph";
4
- import ExternalModule from "./ExternalModule";
5
- export default class Bundle {
6
- graph: Graph;
7
- orderedModules: Module[];
8
- externalModules: ExternalModule[];
9
- entryModule: Module;
10
- constructor(graph: Graph, orderedModules: Module[]);
11
- bind(): void;
12
- includeMarked(treeshake: boolean): void;
13
- setFascade(entryModule: Module): void;
14
- processExternals(): void;
15
- collectAddon(
16
- initialAddon: string,
17
- addonName: "banner" | "footer" | "intro" | "outro",
18
- sep?: string
19
- ): Promise<string>;
20
- getPathRelativeToEntryDirname(resolvedId: string): string;
21
- deconflict(): void;
22
- private setRenderResolutions(options);
23
- render(
24
- options: OutputOptions
25
- ): Promise<{
26
- code: string;
27
- map: any;
28
- }>;
29
- }
@@ -1,23 +0,0 @@
1
- import Variable from "./ast/variables/Variable";
2
- import Graph from "./Graph";
3
- export default class ExternalModule {
4
- graph: Graph;
5
- declarations: {
6
- [name: string]: Variable;
7
- };
8
- exportsNames: boolean;
9
- exportsNamespace: boolean;
10
- id: string;
11
- isExternal: boolean;
12
- name: string;
13
- mostCommonSuggestion: number;
14
- nameSuggestions: {
15
- [name: string]: number;
16
- };
17
- reexported: boolean;
18
- used: boolean;
19
- constructor(graph: Graph, id: string);
20
- suggestName(name: string): void;
21
- warnUnusedImports(): void;
22
- traceExport(name: string): Variable;
23
- }
@@ -1,60 +0,0 @@
1
- import Module, { ModuleJSON } from "./Module";
2
- import ExternalModule from "./ExternalModule";
3
- import GlobalScope from "./ast/scopes/GlobalScope";
4
- import {
5
- InputOptions,
6
- IsExternalHook,
7
- Plugin,
8
- RollupWarning,
9
- SourceDescription,
10
- TreeshakingOptions,
11
- WarningHandler
12
- } from "./rollup/index";
13
- import { Node } from "./ast/nodes/shared/Node";
14
- import Bundle from "./Bundle";
15
- export declare type ResolveDynamicImportHandler = (
16
- specifier: string | Node,
17
- parentId: string
18
- ) => Promise<string | void>;
19
- export default class Graph {
20
- acornOptions: any;
21
- cachedModules: Map<string, ModuleJSON>;
22
- context: string;
23
- dynamicImport: boolean;
24
- externalModules: ExternalModule[];
25
- getModuleContext: (id: string) => string;
26
- hasLoaders: boolean;
27
- isExternal: IsExternalHook;
28
- isPureExternalModule: (id: string) => boolean;
29
- legacy: boolean;
30
- load: (id: string) => Promise<SourceDescription | string | void>;
31
- moduleById: Map<string, Module | ExternalModule>;
32
- modules: Module[];
33
- onwarn: WarningHandler;
34
- plugins: Plugin[];
35
- resolveDynamicImport: ResolveDynamicImportHandler;
36
- resolveId: (id: string, parent: string) => Promise<string | boolean | void>;
37
- scope: GlobalScope;
38
- treeshakingOptions: TreeshakingOptions;
39
- varOrConst: "var" | "const";
40
- dependsOn: {
41
- [id: string]: {
42
- [id: string]: boolean;
43
- };
44
- };
45
- stronglyDependsOn: {
46
- [id: string]: {
47
- [id: string]: boolean;
48
- };
49
- };
50
- treeshake: boolean;
51
- constructor(options: InputOptions);
52
- private loadModule(entryName);
53
- private link();
54
- buildSingle(entryModuleId: string): Promise<Bundle>;
55
- private analyseExecution(entryModule);
56
- private warnCycle(ordered, entryModules);
57
- private fetchModule(id, importer);
58
- private fetchAllDependencies(module);
59
- warn(warning: RollupWarning): void;
60
- }
@@ -1,137 +0,0 @@
1
- import MagicString from "magic-string";
2
- import { RollupError } from "./utils/error";
3
- import NamespaceVariable from "./ast/variables/NamespaceVariable";
4
- import ModuleScope from "./ast/scopes/ModuleScope";
5
- import { RawSourceMap } from "source-map";
6
- import ImportSpecifier from "./ast/nodes/ImportSpecifier";
7
- import Graph from "./Graph";
8
- import Variable from "./ast/variables/Variable";
9
- import Program from "./ast/nodes/Program";
10
- import { Node } from "./ast/nodes/shared/Node";
11
- import ImportDefaultSpecifier from "./ast/nodes/ImportDefaultSpecifier";
12
- import ImportNamespaceSpecifier from "./ast/nodes/ImportNamespaceSpecifier";
13
- import { RollupWarning } from "./rollup/index";
14
- import ExternalModule from "./ExternalModule";
15
- import Import from "./ast/nodes/Import";
16
- export interface IdMap {
17
- [key: string]: string;
18
- }
19
- export interface CommentDescription {
20
- block: boolean;
21
- text: string;
22
- start: number;
23
- end: number;
24
- }
25
- export interface ExportDescription {
26
- localName: string;
27
- identifier?: string;
28
- }
29
- export interface ReexportDescription {
30
- localName: string;
31
- start: number;
32
- source: string;
33
- module: Module;
34
- }
35
- export interface ModuleJSON {
36
- id: string;
37
- dependencies: string[];
38
- code: string;
39
- originalCode: string;
40
- originalSourcemap: RawSourceMap;
41
- ast: Program;
42
- sourcemapChain: RawSourceMap[];
43
- resolvedIds: IdMap;
44
- resolvedExternalIds: IdMap;
45
- }
46
- export default class Module {
47
- type: "Module";
48
- graph: Graph;
49
- code: string;
50
- comments: CommentDescription[];
51
- context: string;
52
- dependencies: Module[];
53
- excludeFromSourcemap: boolean;
54
- exports: {
55
- [name: string]: ExportDescription;
56
- };
57
- exportsAll: {
58
- [name: string]: string;
59
- };
60
- exportAllSources: string[];
61
- id: string;
62
- imports: {
63
- [name: string]: {
64
- source: string;
65
- specifier:
66
- | ImportSpecifier
67
- | ImportNamespaceSpecifier
68
- | ImportDefaultSpecifier;
69
- name: string;
70
- module: Module | ExternalModule | null;
71
- };
72
- };
73
- isExternal: false;
74
- magicString: MagicString;
75
- originalCode: string;
76
- originalSourcemap: RawSourceMap;
77
- reexports: {
78
- [name: string]: ReexportDescription;
79
- };
80
- resolvedExternalIds: IdMap;
81
- resolvedIds: IdMap;
82
- scope: ModuleScope;
83
- sourcemapChain: RawSourceMap[];
84
- sources: string[];
85
- strongDependencies: (Module | ExternalModule)[];
86
- dynamicImports: Import[];
87
- dynamicImportResolutions: (Module | ExternalModule | string | void)[];
88
- ast: Program;
89
- private astClone;
90
- declarations: {
91
- "*"?: NamespaceVariable;
92
- [name: string]: Variable;
93
- };
94
- private exportAllModules;
95
- constructor({
96
- id,
97
- code,
98
- originalCode,
99
- originalSourcemap,
100
- ast,
101
- sourcemapChain,
102
- resolvedIds,
103
- resolvedExternalIds,
104
- graph
105
- }: {
106
- id: string;
107
- code: string;
108
- originalCode: string;
109
- originalSourcemap: RawSourceMap;
110
- ast: Program;
111
- sourcemapChain: RawSourceMap[];
112
- resolvedIds: IdMap;
113
- resolvedExternalIds?: IdMap;
114
- graph: Graph;
115
- });
116
- private addExport(node);
117
- private addImport(node);
118
- private analyse();
119
- basename(): string;
120
- mark(): void;
121
- link(): void;
122
- bindImportSpecifiers(): void;
123
- bindReferences(): void;
124
- getDynamicImportExpressions(): (string | Node)[];
125
- private getOriginalLocation(sourcemapChain, line, column);
126
- error(props: RollupError, pos: number): void;
127
- getExports(): string[];
128
- getReexports(): string[];
129
- includeAllInBundle(): void;
130
- includeInBundle(): boolean;
131
- namespace(): NamespaceVariable;
132
- render(es: boolean, legacy: boolean, freeze: boolean): MagicString;
133
- toJSON(): ModuleJSON;
134
- trace(name: string): Variable;
135
- traceExport(name: string): Variable;
136
- warn(warning: RollupWarning, pos: number): void;
137
- }
@@ -1,24 +0,0 @@
1
- import { ExpressionEntity } from "./nodes/shared/Expression";
2
- import SpreadElement from "./nodes/SpreadElement";
3
- import TaggedTemplateExpression from "./nodes/TaggedTemplateExpression";
4
- import NewExpression from "./nodes/NewExpression";
5
- import Property from "./nodes/Property";
6
- import CallExpression from "./nodes/CallExpression";
7
- export declare type CallExpressionType =
8
- | TaggedTemplateExpression
9
- | CallExpression
10
- | NewExpression
11
- | Property;
12
- export interface CallCreateOptions {
13
- withNew: boolean;
14
- args?: (ExpressionEntity | SpreadElement)[];
15
- caller: CallExpressionType;
16
- }
17
- export default class CallOptions implements CallCreateOptions {
18
- withNew: boolean;
19
- args: (ExpressionEntity | SpreadElement)[];
20
- caller: CallExpressionType;
21
- static create(callOptions: CallCreateOptions): CallOptions;
22
- constructor({ withNew, args, caller }?: CallCreateOptions);
23
- equals(callOptions: CallOptions): boolean;
24
- }
@@ -1,19 +0,0 @@
1
- import ExecutionPathOptions from "./ExecutionPathOptions";
2
- import { ObjectPath } from "./variables/VariableReassignmentTracker";
3
- export interface Entity {
4
- toString: () => string;
5
- }
6
- export interface WritableEntity extends Entity {
7
- hasEffectsWhenAssignedAtPath(
8
- path: ObjectPath,
9
- options: ExecutionPathOptions
10
- ): boolean;
11
- /**
12
- * Reassign a given path of an object.
13
- * E.g., node.reassignPath(['x', 'y']) is called when something
14
- * is assigned to node.x.y.
15
- * The default noop implementation is ok as long as hasEffectsWhenAssignedAtPath
16
- * always returns true for this node. Otherwise it should be overridden.
17
- */
18
- reassignPath(path: ObjectPath, options: ExecutionPathOptions): void;
19
- }