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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# rollup changelog
|
|
2
2
|
|
|
3
|
+
## 0.55.5
|
|
4
|
+
* Remove OpenCollective dependency ([#1915](https://github.com/rollup/rollup/pull/1915))
|
|
5
|
+
|
|
6
|
+
## 0.55.4
|
|
7
|
+
* Improve name deconflicting of external variables ([#1930](https://github.com/rollup/rollup/pull/1930))
|
|
8
|
+
* Improve re-export handling ([#1947](https://github.com/rollup/rollup/pull/1947))
|
|
9
|
+
* Mark preserveSymlinks option as optional ([#1939](https://github.com/rollup/rollup/pull/1939))
|
|
10
|
+
* Enable code-splitting tests to check directory structures ([#1924](https://github.com/rollup/rollup/pull/1924))
|
|
11
|
+
* Improve TypeScript definition test ([#1954](https://github.com/rollup/rollup/pull/1954))
|
|
12
|
+
|
|
13
|
+
## 0.55.3
|
|
14
|
+
* Remove OpenCollective dependency ([#1915](https://github.com/rollup/rollup/pull/1915))
|
|
15
|
+
|
|
16
|
+
## 0.55.2
|
|
17
|
+
* Add option to not follow symlinks ([#1819](https://github.com/rollup/rollup/pull/1819))
|
|
18
|
+
* Fix crash in windows shell ([#1928](https://github.com/rollup/rollup/pull/1928))
|
|
19
|
+
* Fix and test for external TypeScript errors ([#1903](https://github.com/rollup/rollup/pull/1903))
|
|
20
|
+
* Activate OpenCollective ([#1915](https://github.com/rollup/rollup/pull/1915))
|
|
21
|
+
* Optimize CI scripts ([#1921](https://github.com/rollup/rollup/pull/1921))
|
|
22
|
+
|
|
3
23
|
## 0.55.1
|
|
4
24
|
* Improve dynamic import workflow ([#1907](https://github.com/rollup/rollup/pull/1907))
|
|
5
25
|
* Properly handle multiple dynamic imports of the same module ([#1911](https://github.com/rollup/rollup/pull/1911))
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
alt="build status">
|
|
7
7
|
</a>
|
|
8
8
|
<a href="https://www.npmjs.com/package/rollup">
|
|
9
|
-
<img src="https://img.shields.io/npm/v/rollup.svg"
|
|
9
|
+
<a href="#backers" alt="sponsors on Open Collective"><img src="https://opencollective.com/rollup/backers/badge.svg" /></a> <a href="#sponsors" alt="Sponsors on Open Collective"><img src="https://opencollective.com/rollup/sponsors/badge.svg" /></a> <img src="https://img.shields.io/npm/v/rollup.svg"
|
|
10
10
|
alt="npm version">
|
|
11
11
|
</a>
|
|
12
12
|
<a href="https://github.com/rollup/rollup/blob/master/LICENSE.md">
|
|
@@ -17,15 +17,21 @@
|
|
|
17
17
|
<img src="https://david-dm.org/rollup/rollup/status.svg"
|
|
18
18
|
alt="dependency status">
|
|
19
19
|
</a>
|
|
20
|
-
<a href="https://codecov.io/github/rollup/rollup?branch=master">
|
|
21
|
-
<img src="https://codecov.io/gh/rollup/rollup/branch/master/graph/badge.svg" alt="Coverage via Codecov" />
|
|
22
|
-
</a>
|
|
23
20
|
<a href='https://gitter.im/rollup/rollup?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge'>
|
|
24
21
|
<img src='https://badges.gitter.im/rollup/rollup.svg'
|
|
25
22
|
alt='Join the chat at https://gitter.im/rollup/rollup'>
|
|
26
23
|
</a>
|
|
24
|
+
<a href='https://opencollective.com/rollup/backers'>
|
|
25
|
+
<img src='https://opencollective.com/rollup/backers/badge.svg'
|
|
26
|
+
alt='Backers on Open Collective'>
|
|
27
|
+
</a>
|
|
28
|
+
<a href='https://opencollective.com/rollup/sponsors'>
|
|
29
|
+
<img src='https://opencollective.com/rollup/sponsors/badge.svg'
|
|
30
|
+
alt='Sponsors on Open Collective'>
|
|
31
|
+
</a>
|
|
27
32
|
</p>
|
|
28
33
|
|
|
34
|
+
|
|
29
35
|
## Overview
|
|
30
36
|
|
|
31
37
|
Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library or application. It uses the new standardized format for code modules included in the ES6 revision of JavaScript, instead of previous idiosyncratic solutions such as CommonJS and AMD. ES6 modules let you freely and seamlessly combine the most useful individual functions from your favorite libraries. This will eventually be possible natively, but Rollup lets you do it today.
|
|
@@ -106,6 +112,36 @@ To make sure your ES6 modules are immediately usable by tools that work with Com
|
|
|
106
112
|
- step-by-step [tutorial video series](https://code.lengstorf.com/learn-rollup-js/), with accompanying written walkthrough
|
|
107
113
|
- miscellaneous issues in the [wiki](https://github.com/rollup/rollup/wiki)
|
|
108
114
|
|
|
115
|
+
## Contributors
|
|
116
|
+
|
|
117
|
+
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
|
|
118
|
+
<a href="https://github.com/rollup/rollup/graphs/contributors"><img src="https://opencollective.com/rollup/contributors.svg?width=890" /></a>
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
## Backers
|
|
122
|
+
|
|
123
|
+
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/rollup#backer)]
|
|
124
|
+
|
|
125
|
+
<a href="https://opencollective.com/rollup#backers" target="_blank"><img src="https://opencollective.com/rollup/backers.svg?width=890"></a>
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
## Sponsors
|
|
129
|
+
|
|
130
|
+
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/rollup#sponsor)]
|
|
131
|
+
|
|
132
|
+
<a href="https://opencollective.com/rollup/sponsor/0/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/0/avatar.svg"></a>
|
|
133
|
+
<a href="https://opencollective.com/rollup/sponsor/1/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/1/avatar.svg"></a>
|
|
134
|
+
<a href="https://opencollective.com/rollup/sponsor/2/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/2/avatar.svg"></a>
|
|
135
|
+
<a href="https://opencollective.com/rollup/sponsor/3/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/3/avatar.svg"></a>
|
|
136
|
+
<a href="https://opencollective.com/rollup/sponsor/4/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/4/avatar.svg"></a>
|
|
137
|
+
<a href="https://opencollective.com/rollup/sponsor/5/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/5/avatar.svg"></a>
|
|
138
|
+
<a href="https://opencollective.com/rollup/sponsor/6/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/6/avatar.svg"></a>
|
|
139
|
+
<a href="https://opencollective.com/rollup/sponsor/7/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/7/avatar.svg"></a>
|
|
140
|
+
<a href="https://opencollective.com/rollup/sponsor/8/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/8/avatar.svg"></a>
|
|
141
|
+
<a href="https://opencollective.com/rollup/sponsor/9/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/9/avatar.svg"></a>
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
109
145
|
## License
|
|
110
146
|
|
|
111
147
|
[MIT](https://github.com/rollup/rollup/blob/master/LICENSE.md)
|
package/bin/rollup
CHANGED
|
@@ -250,7 +250,7 @@ function isNumber (x) {
|
|
|
250
250
|
|
|
251
251
|
var help = "rollup version __VERSION__\n=====================================\n\nUsage: rollup [options] <entry file>\n\nBasic options:\n\n-v, --version Show version number\n-h, --help Show this help message\n-c, --config Use this config file (if argument is used but value\n is unspecified, defaults to rollup.config.js)\n-w, --watch Watch files in bundle and rebuild on changes\n-i, --input Input (alternative to <entry file>)\n-o, --output.file <output> Output (if absent, prints to stdout)\n-f, --output.format [es] Type of output (amd, cjs, es, iife, umd)\n-e, --external Comma-separate list of module IDs to exclude\n-g, --globals Comma-separate list of `module ID:Global` pairs\n Any module IDs defined here are added to external\n-n, --name Name for UMD export\n-m, --sourcemap Generate sourcemap (`-m inline` for inline map)\n-l, --legacy Support IE8\n--amd.id ID for AMD module (default is anonymous)\n--amd.define Function to use in place of `define`\n--no-strict Don't emit a `\"use strict\";` in the generated modules.\n--no-indent Don't indent result\n--environment <values> Settings passed to config file (see example)\n--no-conflict Generate a noConflict method for UMD globals\n--no-treeshake Disable tree-shaking\n--silent Don't print warnings\n--intro Content to insert at top of bundle (inside wrapper)\n--outro Content to insert at end of bundle (inside wrapper)\n--banner Content to insert at top of bundle (outside wrapper)\n--footer Content to insert at end of bundle (outside wrapper)\n--interop Include interop block (true by default)\n\nExamples:\n\n# use settings in config file\nrollup -c\n\n# in config file, process.env.INCLUDE_DEPS === 'true'\n# and process.env.BUILD === 'production'\nrollup -c --environment INCLUDE_DEPS,BUILD:production\n\n# create CommonJS bundle.js from src/main.js\nrollup --format=cjs --output=bundle.js -- src/main.js\n\n# create self-executing IIFE using `window.jQuery`\n# and `window._` as external globals\nrollup -f iife --globals jquery:jQuery,lodash:_ \\\n -i src/app.js -o build/app.js -m build/app.js.map\n\nNotes:\n\n* When piping to stdout, only inline sourcemaps are permitted\n\nFor more information visit https://rollupjs.org\n";
|
|
252
252
|
|
|
253
|
-
var version = "0.55.
|
|
253
|
+
var version = "0.55.5";
|
|
254
254
|
|
|
255
255
|
var modules = {};
|
|
256
256
|
|
|
@@ -2346,7 +2346,8 @@ function mergeOptions(_a) {
|
|
|
2346
2346
|
cache: getInputOption('cache'),
|
|
2347
2347
|
preferConst: getInputOption('preferConst'),
|
|
2348
2348
|
experimentalDynamicImport: getInputOption('experimentalDynamicImport'),
|
|
2349
|
-
experimentalCodeSplitting: getInputOption('experimentalCodeSplitting')
|
|
2349
|
+
experimentalCodeSplitting: getInputOption('experimentalCodeSplitting'),
|
|
2350
|
+
preserveSymlinks: getInputOption('preserveSymlinks')
|
|
2350
2351
|
};
|
|
2351
2352
|
// legacy, to ensure e.g. commonjs plugin still works
|
|
2352
2353
|
inputOptions.entry = inputOptions.input;
|
|
@@ -3730,6 +3731,10 @@ x.iTerm.setCwd = cwd => '\u001B]50;CurrentDir=' + (cwd || process.cwd()) + '\u00
|
|
|
3730
3731
|
|
|
3731
3732
|
var SHOW_ALTERNATE_SCREEN = '\u001B[?1049h';
|
|
3732
3733
|
var HIDE_ALTERNATE_SCREEN = '\u001B[?1049l';
|
|
3734
|
+
var isWindows = process.platform === 'win32';
|
|
3735
|
+
var isMintty = isWindows && !!(process.env.SHELL || process.env.TERM);
|
|
3736
|
+
var isConEmuAnsiOn = (process.env.ConEmuANSI || '').toLowerCase() === 'on';
|
|
3737
|
+
var supportsAnsi = !isWindows || isMintty || isConEmuAnsiOn;
|
|
3733
3738
|
function alternateScreen(enabled) {
|
|
3734
3739
|
if (!enabled) {
|
|
3735
3740
|
var needAnnounce_1 = true;
|
|
@@ -3746,10 +3751,14 @@ function alternateScreen(enabled) {
|
|
|
3746
3751
|
}
|
|
3747
3752
|
return {
|
|
3748
3753
|
open: function () {
|
|
3749
|
-
|
|
3754
|
+
if (supportsAnsi) {
|
|
3755
|
+
process.stderr.write(SHOW_ALTERNATE_SCREEN);
|
|
3756
|
+
}
|
|
3750
3757
|
},
|
|
3751
3758
|
close: function () {
|
|
3752
|
-
|
|
3759
|
+
if (supportsAnsi) {
|
|
3760
|
+
process.stderr.write(HIDE_ALTERNATE_SCREEN);
|
|
3761
|
+
}
|
|
3753
3762
|
},
|
|
3754
3763
|
reset: function (heading) {
|
|
3755
3764
|
stderr("" + ansiEscapes.eraseScreen + ansiEscapes.cursorTo(0, 0) + heading);
|
package/dist/rollup.browser.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Rollup.js v0.55.
|
|
3
|
-
|
|
2
|
+
Rollup.js v0.55.5
|
|
3
|
+
Sat Feb 10 2018 08:50:44 GMT+0100 (CET) - commit 82fe34dfe39d6c2aea9ca32444ea4a68e3afe814
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
@@ -382,7 +382,8 @@ function mergeOptions(_a) {
|
|
|
382
382
|
cache: getInputOption('cache'),
|
|
383
383
|
preferConst: getInputOption('preferConst'),
|
|
384
384
|
experimentalDynamicImport: getInputOption('experimentalDynamicImport'),
|
|
385
|
-
experimentalCodeSplitting: getInputOption('experimentalCodeSplitting')
|
|
385
|
+
experimentalCodeSplitting: getInputOption('experimentalCodeSplitting'),
|
|
386
|
+
preserveSymlinks: getInputOption('preserveSymlinks')
|
|
386
387
|
};
|
|
387
388
|
// legacy, to ensure e.g. commonjs plugin still works
|
|
388
389
|
inputOptions.entry = inputOptions.input;
|
|
@@ -17431,12 +17432,12 @@ var ExternalModule = /** @class */ (function () {
|
|
|
17431
17432
|
function load(id) {
|
|
17432
17433
|
return readFileSync(id, 'utf-8');
|
|
17433
17434
|
}
|
|
17434
|
-
function findFile(file) {
|
|
17435
|
+
function findFile(file, preserveSymlinks) {
|
|
17435
17436
|
try {
|
|
17436
17437
|
var stats = lstatSync(file);
|
|
17437
|
-
if (stats.isSymbolicLink())
|
|
17438
|
-
return findFile(realpathSync(file));
|
|
17439
|
-
if (stats.isFile()) {
|
|
17438
|
+
if (!preserveSymlinks && stats.isSymbolicLink())
|
|
17439
|
+
return findFile(realpathSync(file), preserveSymlinks);
|
|
17440
|
+
if ((preserveSymlinks && stats.isSymbolicLink()) || stats.isFile()) {
|
|
17440
17441
|
// check case
|
|
17441
17442
|
var name = basename(file);
|
|
17442
17443
|
var files = readdirSync(dirname(file));
|
|
@@ -17448,26 +17449,28 @@ function findFile(file) {
|
|
|
17448
17449
|
// suppress
|
|
17449
17450
|
}
|
|
17450
17451
|
}
|
|
17451
|
-
function addJsExtensionIfNecessary(file) {
|
|
17452
|
-
return findFile(file) || findFile(file + '.js');
|
|
17452
|
+
function addJsExtensionIfNecessary(file, preserveSymlinks) {
|
|
17453
|
+
return findFile(file, preserveSymlinks) || findFile(file + '.js', preserveSymlinks);
|
|
17453
17454
|
}
|
|
17454
|
-
function resolveId(
|
|
17455
|
-
|
|
17456
|
-
|
|
17457
|
-
|
|
17458
|
-
|
|
17459
|
-
|
|
17460
|
-
|
|
17461
|
-
|
|
17462
|
-
|
|
17463
|
-
|
|
17464
|
-
|
|
17465
|
-
|
|
17466
|
-
|
|
17467
|
-
|
|
17468
|
-
|
|
17469
|
-
|
|
17470
|
-
|
|
17455
|
+
function resolveId(options) {
|
|
17456
|
+
return function (importee, importer) {
|
|
17457
|
+
if (typeof process === 'undefined') {
|
|
17458
|
+
error({
|
|
17459
|
+
code: 'MISSING_PROCESS',
|
|
17460
|
+
message: "It looks like you're using Rollup in a non-Node.js environment. This means you must supply a plugin with custom resolveId and load functions",
|
|
17461
|
+
url: 'https://github.com/rollup/rollup/wiki/Plugins'
|
|
17462
|
+
});
|
|
17463
|
+
}
|
|
17464
|
+
// external modules (non-entry modules that start with neither '.' or '/')
|
|
17465
|
+
// are skipped at this stage.
|
|
17466
|
+
if (importer !== undefined && !isAbsolute(importee) && importee[0] !== '.')
|
|
17467
|
+
return null;
|
|
17468
|
+
// `resolve` processes paths from right to left, prepending them until an
|
|
17469
|
+
// absolute path is created. Absolute importees therefore shortcircuit the
|
|
17470
|
+
// resolve call and require no special handing on our part.
|
|
17471
|
+
// See https://nodejs.org/api/path.html#path_path_resolve_paths
|
|
17472
|
+
return addJsExtensionIfNecessary(resolve(importer ? dirname(importer) : resolve(), importee), options.preserveSymlinks);
|
|
17473
|
+
};
|
|
17471
17474
|
}
|
|
17472
17475
|
function makeOnwarn() {
|
|
17473
17476
|
var warned = blank();
|
|
@@ -17718,23 +17721,38 @@ function getExportBlock(exports, dependencies, exportMode, mechanism) {
|
|
|
17718
17721
|
return mechanism + " " + local_1 + ";";
|
|
17719
17722
|
}
|
|
17720
17723
|
var exportBlock = '';
|
|
17724
|
+
// star exports must always output first for precedence
|
|
17721
17725
|
dependencies.forEach(function (_a) {
|
|
17722
17726
|
var name = _a.name, reexports = _a.reexports;
|
|
17723
17727
|
if (reexports && exportMode !== 'default') {
|
|
17724
17728
|
reexports.forEach(function (specifier) {
|
|
17725
|
-
if (specifier.
|
|
17729
|
+
if (specifier.reexported === '*') {
|
|
17726
17730
|
exportBlock += (exportBlock ? '\n' : '') + "Object.keys(" + name + ").forEach(function (key) { exports[key] = " + name + "[key]; });";
|
|
17727
17731
|
}
|
|
17728
17732
|
});
|
|
17729
17733
|
}
|
|
17730
17734
|
});
|
|
17731
17735
|
dependencies.forEach(function (_a) {
|
|
17732
|
-
var name = _a.name, reexports = _a.reexports;
|
|
17736
|
+
var name = _a.name, imports = _a.imports, reexports = _a.reexports;
|
|
17733
17737
|
if (reexports && exportMode !== 'default') {
|
|
17734
17738
|
reexports.forEach(function (specifier) {
|
|
17735
|
-
if (specifier.imported
|
|
17739
|
+
if (specifier.imported === 'default') {
|
|
17740
|
+
var exportsNamesOrNamespace = imports &&
|
|
17741
|
+
imports.some(function (specifier) { return specifier.imported === '*' || specifier.imported !== 'default'; }) ||
|
|
17742
|
+
reexports && reexports.some(function (specifier) { return specifier.imported !== 'default' && specifier.imported !== '*'; });
|
|
17743
|
+
if (exportsNamesOrNamespace) {
|
|
17744
|
+
exportBlock += (exportBlock ? '\n' : '') + "exports." + specifier.reexported + " = " + name + "__default;";
|
|
17745
|
+
}
|
|
17746
|
+
else {
|
|
17747
|
+
exportBlock += (exportBlock ? '\n' : '') + "exports." + specifier.reexported + " = " + name + ";";
|
|
17748
|
+
}
|
|
17749
|
+
}
|
|
17750
|
+
else if (specifier.imported !== '*') {
|
|
17736
17751
|
exportBlock += (exportBlock ? '\n' : '') + "exports." + specifier.reexported + " = " + name + "." + specifier.imported + ";";
|
|
17737
17752
|
}
|
|
17753
|
+
else if (specifier.reexported !== '*') {
|
|
17754
|
+
exportBlock += (exportBlock ? '\n' : '') + "exports." + specifier.reexported + " = " + name + ";";
|
|
17755
|
+
}
|
|
17738
17756
|
});
|
|
17739
17757
|
}
|
|
17740
17758
|
});
|
|
@@ -17863,7 +17881,7 @@ function cjs(chunk, magicString, _a, options) {
|
|
|
17863
17881
|
}
|
|
17864
17882
|
needsInterop = true;
|
|
17865
17883
|
var exportsNames = imports && imports.some(function (specifier) { return specifier.imported !== 'default' && specifier.imported !== '*'; }) ||
|
|
17866
|
-
reexports && reexports.some(function (specifier) { return specifier.imported
|
|
17884
|
+
reexports && reexports.some(function (specifier) { return specifier.imported !== 'default' && specifier.imported !== '*'; });
|
|
17867
17885
|
if (exportsNames) {
|
|
17868
17886
|
return varOrConst + " " + name + " = require('" + getPath(id) + "');" +
|
|
17869
17887
|
("\n" + varOrConst + " " + name + "__default = _interopDefault(" + name + ");");
|
|
@@ -17889,23 +17907,25 @@ function es(chunk, magicString, _a) {
|
|
|
17889
17907
|
var getPath = _a.getPath, intro = _a.intro, outro = _a.outro;
|
|
17890
17908
|
var _b = chunk.getModuleDeclarations(), dependencies = _b.dependencies, exports = _b.exports;
|
|
17891
17909
|
var importBlock = dependencies.map(function (_a) {
|
|
17892
|
-
var id = _a.id, reexports = _a.reexports, imports = _a.imports;
|
|
17910
|
+
var id = _a.id, reexports = _a.reexports, imports = _a.imports, name = _a.name;
|
|
17893
17911
|
if (!reexports && !imports) {
|
|
17894
17912
|
return "import '" + getPath(id) + "';";
|
|
17895
17913
|
}
|
|
17896
17914
|
var output = '';
|
|
17897
17915
|
if (imports) {
|
|
17898
17916
|
var defaultImport_1 = imports.find(function (specifier) { return specifier.imported === 'default'; });
|
|
17899
|
-
var
|
|
17900
|
-
if (
|
|
17901
|
-
output += "import * as " +
|
|
17917
|
+
var starImport_1 = imports.find(function (specifier) { return specifier.imported === '*'; });
|
|
17918
|
+
if (starImport_1) {
|
|
17919
|
+
output += "import * as " + starImport_1.local + " from '" + getPath(id) + "';";
|
|
17920
|
+
if (imports.length > 1)
|
|
17921
|
+
output += '\n';
|
|
17902
17922
|
}
|
|
17903
|
-
|
|
17923
|
+
if (defaultImport_1 && imports.length === 1) {
|
|
17904
17924
|
output += "import " + defaultImport_1.local + " from '" + getPath(id) + "';";
|
|
17905
17925
|
}
|
|
17906
|
-
else {
|
|
17926
|
+
else if (!starImport_1 || imports.length > 1) {
|
|
17907
17927
|
output += "import " + (defaultImport_1 ? defaultImport_1.local + ", " : '') + "{ " + imports
|
|
17908
|
-
.filter(function (specifier) { return specifier !== defaultImport_1; })
|
|
17928
|
+
.filter(function (specifier) { return specifier !== defaultImport_1 && specifier !== starImport_1; })
|
|
17909
17929
|
.map(function (specifier) {
|
|
17910
17930
|
if (specifier.imported === specifier.local) {
|
|
17911
17931
|
return specifier.imported;
|
|
@@ -17918,16 +17938,27 @@ function es(chunk, magicString, _a) {
|
|
|
17918
17938
|
}
|
|
17919
17939
|
}
|
|
17920
17940
|
if (reexports) {
|
|
17941
|
+
if (imports)
|
|
17942
|
+
output += '\n';
|
|
17921
17943
|
var starExport_1 = reexports.find(function (specifier) { return specifier.reexported === '*'; });
|
|
17944
|
+
var namespaceReexport_1 = reexports.find(function (specifier) { return specifier.imported === '*' && specifier.reexported !== '*'; });
|
|
17922
17945
|
if (starExport_1) {
|
|
17923
|
-
output += "export * from '" + id + "';";
|
|
17946
|
+
output += "export * from '" + getPath(id) + "';";
|
|
17924
17947
|
if (reexports.length === 1) {
|
|
17925
17948
|
return output;
|
|
17926
17949
|
}
|
|
17927
17950
|
output += '\n';
|
|
17928
17951
|
}
|
|
17952
|
+
if (namespaceReexport_1) {
|
|
17953
|
+
output += "import * as " + name + " from '" + getPath(id) + "';\n";
|
|
17954
|
+
output += "export { " + (name === namespaceReexport_1.reexported ? name : name + " as " + namespaceReexport_1.reexported) + " };";
|
|
17955
|
+
if (reexports.length === (starExport_1 ? 2 : 1)) {
|
|
17956
|
+
return output;
|
|
17957
|
+
}
|
|
17958
|
+
output += '\n';
|
|
17959
|
+
}
|
|
17929
17960
|
output += "export { " + reexports
|
|
17930
|
-
.filter(function (specifier) { return specifier !== starExport_1; })
|
|
17961
|
+
.filter(function (specifier) { return specifier !== starExport_1 && specifier !== namespaceReexport_1; })
|
|
17931
17962
|
.map(function (specifier) {
|
|
17932
17963
|
if (specifier.imported === specifier.reexported) {
|
|
17933
17964
|
return specifier.imported;
|
|
@@ -18552,21 +18583,7 @@ var Chunk$1 = /** @class */ (function () {
|
|
|
18552
18583
|
this.orderedModules.forEach(function (module) {
|
|
18553
18584
|
Object.keys(module.imports).forEach(function (importName) {
|
|
18554
18585
|
var declaration = module.imports[importName];
|
|
18555
|
-
|
|
18556
|
-
// ignore imports to modules already in this chunk
|
|
18557
|
-
if (!tracedExport || tracedExport.module.chunk === _this) {
|
|
18558
|
-
return;
|
|
18559
|
-
}
|
|
18560
|
-
var variable = tracedExport.module.traceExport(tracedExport.name);
|
|
18561
|
-
// namespace variable can indicate multiple imports
|
|
18562
|
-
if (tracedExport.name === '*') {
|
|
18563
|
-
Object.keys(variable.originals || variable.module.declarations).forEach(function (importName) {
|
|
18564
|
-
var original = (variable.originals || variable.module.declarations)[importName];
|
|
18565
|
-
_this.populateImport(original, tracedExport);
|
|
18566
|
-
});
|
|
18567
|
-
return;
|
|
18568
|
-
}
|
|
18569
|
-
_this.populateImport(variable, tracedExport);
|
|
18586
|
+
_this.traceImport(declaration.module, declaration.name);
|
|
18570
18587
|
});
|
|
18571
18588
|
});
|
|
18572
18589
|
};
|
|
@@ -18607,6 +18624,25 @@ var Chunk$1 = /** @class */ (function () {
|
|
|
18607
18624
|
Chunk.prototype.getJsonModules = function () {
|
|
18608
18625
|
return this.orderedModules.map(function (module) { return module.toJSON(); });
|
|
18609
18626
|
};
|
|
18627
|
+
Chunk.prototype.traceImport = function (module, exportName) {
|
|
18628
|
+
var _this = this;
|
|
18629
|
+
var tracedExport = this.traceExport(module, exportName);
|
|
18630
|
+
// ignore imports to modules already in this chunk
|
|
18631
|
+
if (!tracedExport || tracedExport.module.chunk === this) {
|
|
18632
|
+
return tracedExport;
|
|
18633
|
+
}
|
|
18634
|
+
var variable = tracedExport.module.traceExport(tracedExport.name);
|
|
18635
|
+
// namespace variable can indicate multiple imports
|
|
18636
|
+
if (tracedExport.name === '*') {
|
|
18637
|
+
Object.keys(variable.originals || variable.module.declarations).forEach(function (importName) {
|
|
18638
|
+
var original = (variable.originals || variable.module.declarations)[importName];
|
|
18639
|
+
_this.populateImport(original, tracedExport);
|
|
18640
|
+
});
|
|
18641
|
+
return tracedExport;
|
|
18642
|
+
}
|
|
18643
|
+
this.populateImport(variable, tracedExport);
|
|
18644
|
+
return tracedExport;
|
|
18645
|
+
};
|
|
18610
18646
|
// trace a module export to its exposed chunk module export
|
|
18611
18647
|
// either in this chunk or in another
|
|
18612
18648
|
// we follow reexports if they are not entry points in the hope
|
|
@@ -18622,7 +18658,12 @@ var Chunk$1 = /** @class */ (function () {
|
|
|
18622
18658
|
if (module.chunk !== this && module.isEntryPoint) {
|
|
18623
18659
|
return { name: name, module: module };
|
|
18624
18660
|
}
|
|
18625
|
-
|
|
18661
|
+
var exportDeclaration = module.exports[name];
|
|
18662
|
+
if (exportDeclaration) {
|
|
18663
|
+
// if export binding is itself an import binding then continue tracing
|
|
18664
|
+
var importDeclaration = module.imports[exportDeclaration.localName];
|
|
18665
|
+
if (importDeclaration)
|
|
18666
|
+
return this.traceImport(importDeclaration.module, importDeclaration.name);
|
|
18626
18667
|
return { name: name, module: module };
|
|
18627
18668
|
}
|
|
18628
18669
|
var reexportDeclaration = module.reexports[name];
|
|
@@ -18748,13 +18789,13 @@ var Chunk$1 = /** @class */ (function () {
|
|
|
18748
18789
|
used['_setter'] = used['_starExcludes'] = used['_$p'] = 1;
|
|
18749
18790
|
}
|
|
18750
18791
|
var toDeshadow = new Set();
|
|
18751
|
-
|
|
18752
|
-
|
|
18792
|
+
if (!es) {
|
|
18793
|
+
this.externalModules.forEach(function (module) {
|
|
18753
18794
|
var safeName = getSafeName(module.name);
|
|
18754
18795
|
toDeshadow.add(safeName);
|
|
18755
18796
|
module.name = safeName;
|
|
18756
|
-
}
|
|
18757
|
-
}
|
|
18797
|
+
});
|
|
18798
|
+
}
|
|
18758
18799
|
this.imports.forEach(function (impt) {
|
|
18759
18800
|
impt.variables.forEach(function (_a) {
|
|
18760
18801
|
var name = _a.name, module = _a.module, variable = _a.variable;
|
|
@@ -18772,9 +18813,10 @@ var Chunk$1 = /** @class */ (function () {
|
|
|
18772
18813
|
}
|
|
18773
18814
|
}
|
|
18774
18815
|
else {
|
|
18775
|
-
safeName = (es || system) ?
|
|
18816
|
+
safeName = (es || system) ? variable.name : module.name + "." + name;
|
|
18776
18817
|
}
|
|
18777
18818
|
if (es || system) {
|
|
18819
|
+
safeName = getSafeName(safeName);
|
|
18778
18820
|
toDeshadow.add(safeName);
|
|
18779
18821
|
}
|
|
18780
18822
|
}
|
|
@@ -19058,7 +19100,6 @@ function firstSync(candidates) {
|
|
|
19058
19100
|
};
|
|
19059
19101
|
}
|
|
19060
19102
|
|
|
19061
|
-
/// <reference path="./Graph.d.ts" />
|
|
19062
19103
|
function generateChunkName(id, chunkNames, startAtTwo) {
|
|
19063
19104
|
if (startAtTwo === void 0) { startAtTwo = false; }
|
|
19064
19105
|
var name = basename(id);
|
|
@@ -19123,7 +19164,7 @@ var Graph = /** @class */ (function () {
|
|
|
19123
19164
|
}
|
|
19124
19165
|
this.resolveId = first([(function (id, parentId) { return (_this.isExternal(id, parentId, false) ? false : null); })]
|
|
19125
19166
|
.concat(this.plugins.map(function (plugin) { return plugin.resolveId; }).filter(Boolean))
|
|
19126
|
-
.concat(resolveId));
|
|
19167
|
+
.concat(resolveId(options)));
|
|
19127
19168
|
var loaders = this.plugins.map(function (plugin) { return plugin.load; }).filter(Boolean);
|
|
19128
19169
|
this.hasLoaders = loaders.length !== 0;
|
|
19129
19170
|
this.load = first(loaders.concat(load));
|
|
@@ -19236,10 +19277,7 @@ var Graph = /** @class */ (function () {
|
|
|
19236
19277
|
// determine the topological execution order for the bundle
|
|
19237
19278
|
timeStart('phase 2');
|
|
19238
19279
|
_this.link();
|
|
19239
|
-
var _a = _this.analyseExecution([entryModule]), orderedModules = _a.orderedModules, dynamicImports = _a.dynamicImports
|
|
19240
|
-
if (hasCycles) {
|
|
19241
|
-
_this.warnCycle(entryModule, orderedModules);
|
|
19242
|
-
}
|
|
19280
|
+
var _a = _this.analyseExecution([entryModule]), orderedModules = _a.orderedModules, dynamicImports = _a.dynamicImports;
|
|
19243
19281
|
timeEnd('phase 2');
|
|
19244
19282
|
// Phase 3 – marking. We include all statements that should be included
|
|
19245
19283
|
timeStart('phase 3');
|
|
@@ -19369,17 +19407,12 @@ var Graph = /** @class */ (function () {
|
|
|
19369
19407
|
};
|
|
19370
19408
|
Graph.prototype.analyseExecution = function (entryModules) {
|
|
19371
19409
|
var _this = this;
|
|
19372
|
-
var
|
|
19410
|
+
var curEntry, curEntryHash;
|
|
19373
19411
|
var allSeen = {};
|
|
19374
19412
|
var ordered = [];
|
|
19375
19413
|
var dynamicImports = [];
|
|
19376
|
-
var visit = function (module,
|
|
19377
|
-
if (
|
|
19378
|
-
if (seen[module.id]) {
|
|
19379
|
-
hasCycles = true;
|
|
19380
|
-
return;
|
|
19381
|
-
}
|
|
19382
|
-
seen[module.id] = true;
|
|
19414
|
+
var visit = function (module, parents) {
|
|
19415
|
+
if (parents === void 0) { parents = (_a = {}, _a[module.id] = null, _a); }
|
|
19383
19416
|
if (module.isEntryPoint && module !== curEntry)
|
|
19384
19417
|
return;
|
|
19385
19418
|
// Track entry point graph colouring by tracing all modules loaded by a given
|
|
@@ -19389,7 +19422,14 @@ var Graph = /** @class */ (function () {
|
|
|
19389
19422
|
Uint8ArrayXor(module.entryPointsHash, curEntryHash);
|
|
19390
19423
|
module.dependencies.forEach(function (depModule) {
|
|
19391
19424
|
if (!depModule.isExternal) {
|
|
19392
|
-
|
|
19425
|
+
if (depModule.id in parents) {
|
|
19426
|
+
if (!allSeen[depModule.id]) {
|
|
19427
|
+
_this.warnCycle(depModule.id, module.id, parents);
|
|
19428
|
+
}
|
|
19429
|
+
return;
|
|
19430
|
+
}
|
|
19431
|
+
parents[depModule.id] = module.id;
|
|
19432
|
+
visit(depModule, parents);
|
|
19393
19433
|
}
|
|
19394
19434
|
});
|
|
19395
19435
|
if (_this.dynamicImport) {
|
|
@@ -19406,6 +19446,7 @@ var Graph = /** @class */ (function () {
|
|
|
19406
19446
|
allSeen[module.id] = true;
|
|
19407
19447
|
module.execIndex = ordered.length;
|
|
19408
19448
|
ordered.push(module);
|
|
19449
|
+
var _a;
|
|
19409
19450
|
};
|
|
19410
19451
|
for (var i = 0; i < entryModules.length; i++) {
|
|
19411
19452
|
curEntry = entryModules[i];
|
|
@@ -19420,10 +19461,24 @@ var Graph = /** @class */ (function () {
|
|
|
19420
19461
|
curEntryHash = randomUint8Array(10);
|
|
19421
19462
|
visit(curEntry);
|
|
19422
19463
|
}
|
|
19423
|
-
return { orderedModules: ordered, dynamicImports: dynamicImports
|
|
19464
|
+
return { orderedModules: ordered, dynamicImports: dynamicImports };
|
|
19424
19465
|
};
|
|
19425
|
-
Graph.prototype.warnCycle = function (
|
|
19426
|
-
|
|
19466
|
+
Graph.prototype.warnCycle = function (id, parentId, parents) {
|
|
19467
|
+
var path = [relativeId(id)];
|
|
19468
|
+
var curId = parentId;
|
|
19469
|
+
while (curId !== id) {
|
|
19470
|
+
path.push(relativeId(curId));
|
|
19471
|
+
curId = parents[curId];
|
|
19472
|
+
if (!curId)
|
|
19473
|
+
break;
|
|
19474
|
+
}
|
|
19475
|
+
path.push(path[0]);
|
|
19476
|
+
path.reverse();
|
|
19477
|
+
this.warn({
|
|
19478
|
+
code: 'CIRCULAR_DEPENDENCY',
|
|
19479
|
+
importer: path[0],
|
|
19480
|
+
message: "Circular dependency: " + path.join(' -> ')
|
|
19481
|
+
});
|
|
19427
19482
|
};
|
|
19428
19483
|
Graph.prototype.fetchModule = function (id, importer) {
|
|
19429
19484
|
var _this = this;
|
|
@@ -19868,7 +19923,7 @@ function getAndCheckOutputOptions(inputOptions, rawOutputOptions) {
|
|
|
19868
19923
|
return outputOptions;
|
|
19869
19924
|
}
|
|
19870
19925
|
|
|
19871
|
-
var version$1 = "0.55.
|
|
19926
|
+
var version$1 = "0.55.5";
|
|
19872
19927
|
|
|
19873
19928
|
exports.rollup = rollup;
|
|
19874
19929
|
exports.VERSION = version$1;
|