rollup 0.57.0 → 0.58.2

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 (43) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/README.md +3 -11
  3. package/bin/rollup +591 -413
  4. package/dist/rollup.browser.js +19731 -18315
  5. package/dist/rollup.d.ts +341 -0
  6. package/dist/rollup.es.js +6582 -4875
  7. package/dist/rollup.js +6581 -4874
  8. package/dist/typings/Chunk.d.ts +37 -25
  9. package/dist/typings/ExternalModule.d.ts +3 -0
  10. package/dist/typings/Graph.d.ts +7 -6
  11. package/dist/typings/Module.d.ts +5 -1
  12. package/dist/typings/ast/nodes/ConditionalExpression.d.ts +4 -6
  13. package/dist/typings/ast/nodes/ExportDefaultDeclaration.d.ts +0 -1
  14. package/dist/typings/ast/nodes/Identifier.d.ts +2 -2
  15. package/dist/typings/ast/nodes/Import.d.ts +5 -3
  16. package/dist/typings/ast/nodes/LogicalExpression.d.ts +8 -4
  17. package/dist/typings/ast/nodes/MemberExpression.d.ts +2 -2
  18. package/dist/typings/ast/nodes/ObjectExpression.d.ts +3 -0
  19. package/dist/typings/ast/nodes/SequenceExpression.d.ts +10 -2
  20. package/dist/typings/ast/variables/GlobalVariable.d.ts +0 -1
  21. package/dist/typings/chunk-optimization.d.ts +3 -0
  22. package/dist/typings/finalisers/amd.d.ts +2 -9
  23. package/dist/typings/finalisers/cjs.d.ts +2 -8
  24. package/dist/typings/finalisers/es.d.ts +2 -8
  25. package/dist/typings/finalisers/iife.d.ts +2 -8
  26. package/dist/typings/finalisers/index.d.ts +9 -4
  27. package/dist/typings/finalisers/shared/warnOnBuiltins.d.ts +3 -2
  28. package/dist/typings/finalisers/system.d.ts +2 -7
  29. package/dist/typings/finalisers/umd.d.ts +2 -8
  30. package/dist/typings/rollup/index.d.ts +36 -28
  31. package/dist/typings/utils/addons.d.ts +10 -0
  32. package/dist/typings/utils/blank.d.ts +1 -0
  33. package/dist/typings/utils/collapseSourcemaps.d.ts +2 -2
  34. package/dist/typings/utils/defaults.d.ts +1 -1
  35. package/dist/typings/utils/mergeOptions.d.ts +4 -1
  36. package/dist/typings/utils/relativeId.d.ts +2 -0
  37. package/dist/typings/utils/renderHelpers.d.ts +2 -0
  38. package/dist/typings/watch/index.d.ts +5 -2
  39. package/package.json +33 -32
  40. package/dist/typings/finalisers/shared/getGlobalNameMaker.d.ts +0 -4
  41. package/dist/typings/utils/flushTime.d.ts +0 -5
  42. package/dist/typings/utils/object.d.ts +0 -7
  43. package/typings/package.json.d.ts +0 -3
package/CHANGELOG.md CHANGED
@@ -1,6 +1,43 @@
1
1
  # rollup changelog
2
2
 
3
+ ## 0.58.2
4
+ *2018-04-23*
5
+ * Fix rendering of certain statically resolvable if statements ([#2146](https://github.com/rollup/rollup/pull/2146))
6
+
7
+ ## 0.58.1
8
+ *2018-04-18*
9
+ * Fix comment detection ([#2129](https://github.com/rollup/rollup/pull/2129))
10
+
11
+ ## 0.58.0
12
+ *2018-04-16*
13
+ * Support individual chunk names with optional content hashes ([#2068](https://github.com/rollup/rollup/pull/2068))
14
+ * Support manually created chunks ([#2084](https://github.com/rollup/rollup/pull/2084))
15
+ * Automatically import deep dependencies when code splitting for better performance ([#2073](https://github.com/rollup/rollup/pull/2073))
16
+ * Automatically minify internal export/import names for esm and system output ([#2087](https://github.com/rollup/rollup/pull/2087))
17
+ * Add option to automatically merge small chunks ([#2090](https://github.com/rollup/rollup/pull/2090))
18
+ * Significantly improve tree-shaking performance ([#2119](https://github.com/rollup/rollup/pull/2119))
19
+ * Enable tree-shaking for logical expressions ([#2098](https://github.com/rollup/rollup/pull/2098))
20
+ * Rework external types and reduce type related dependencies ([#2108](https://github.com/rollup/rollup/pull/2108))
21
+ * Support parallel dependency resolution ([#2116](https://github.com/rollup/rollup/pull/2116))
22
+ * Improve deprecation handling ([#2076](https://github.com/rollup/rollup/pull/2076))
23
+ * Enable `--perf` timings in watch mode ([#2065](https://github.com/rollup/rollup/pull/2065))
24
+ * Improve performance timers ([#2111](https://github.com/rollup/rollup/pull/2111))
25
+ * Improve error handling for plugins ([#2100](https://github.com/rollup/rollup/pull/2100))
26
+ * Improve error when using `--dir` in a single file build ([#2123](https://github.com/rollup/rollup/pull/2123))
27
+ * Do not warn for external imports that are unused due to tree-shaking ([#2124](https://github.com/rollup/rollup/pull/2124))
28
+ * Update mixed export warning message ([#2107](https://github.com/rollup/rollup/pull/2107))
29
+ * Remove duplicate badges from readme ([#2083](https://github.com/rollup/rollup/pull/2083))
30
+ * Update readme examples ([#2086](https://github.com/rollup/rollup/pull/2086))
31
+
32
+ ## 0.57.1
33
+ *2018-03-17*
34
+ * Improve sourcemap generation performance ([#2062](https://github.com/rollup/rollup/pull/2062))
35
+ * Add reserved config option namespace and improve CLI interface ([#2063](https://github.com/rollup/rollup/pull/2063))
36
+ * Fix issue with default exported function and class expressions ([#2059](https://github.com/rollup/rollup/pull/2059))
37
+ * Replace `forEach` with faster `for` loops in some places ([#2064](https://github.com/rollup/rollup/pull/2064))
38
+
3
39
  ## 0.57.0
40
+ *2018-03-15*
4
41
  * Add option to preserve the module structure instead of bundling ([#1922](https://github.com/rollup/rollup/pull/1922))
5
42
  * Enable watch mode when code-splitting ([#2035](https://github.com/rollup/rollup/pull/2035))
6
43
  * Optionally pass CLI commands to config file ([#1926](https://github.com/rollup/rollup/pull/1926))
@@ -16,6 +53,7 @@
16
53
  * [BREAKING] Refactor missing export plugin hook ([#1987](https://github.com/rollup/rollup/pull/1987))
17
54
 
18
55
  ## 0.56.5
56
+ *2018-03-07*
19
57
  * Preserve ids when deconflicting classes ([#2025](https://github.com/rollup/rollup/pull/2025))
20
58
  * Fix an issue with re-exported namespace imports ([#2034](https://github.com/rollup/rollup/pull/2034))
21
59
  * Prevent an infinite loop when binding member expressions ([#1963](https://github.com/rollup/rollup/pull/1963))
@@ -23,6 +61,7 @@
23
61
  * Fix links in documentation ([#2026](https://github.com/rollup/rollup/pull/2026))
24
62
 
25
63
  ## 0.56.4
64
+ *2018-03-05*
26
65
  * Make rollup builds reproducible ([#2024](https://github.com/rollup/rollup/pull/2024))
27
66
  * Improve error handling for source maps ([#2012](https://github.com/rollup/rollup/pull/2012))
28
67
  * Properly handle SystemJS default exports without semicolons ([#2019](https://github.com/rollup/rollup/pull/2019))
@@ -34,12 +73,14 @@
34
73
  * Improve internal build configuration ([#2016](https://github.com/rollup/rollup/pull/2016))
35
74
 
36
75
  ## 0.56.3
76
+ *2018-02-25*
37
77
  * Fix issues around default exports and module facades ([#2001](https://github.com/rollup/rollup/pull/2001))
38
78
  * Improve and fix internal chunk interface ([#1994](https://github.com/rollup/rollup/pull/1994))
39
79
  * Fix superfluous semicolons added after declarations ([#1999](https://github.com/rollup/rollup/pull/1999))
40
80
  * Improve code-splitting tests ([#1990](https://github.com/rollup/rollup/pull/1990))
41
81
 
42
82
  ## 0.56.2
83
+ *2018-02-19*
43
84
  * Fix handling of reassigned default exports ([#1975](https://github.com/rollup/rollup/pull/1975))
44
85
  * Fix handling of renamed exports in entry points ([#1977](https://github.com/rollup/rollup/pull/1977))
45
86
  * Update internal TypeScript version ([#1980](https://github.com/rollup/rollup/pull/1980))
@@ -48,9 +89,11 @@
48
89
  * Fix non-replaced dynamic imports in non-ESM output ([#1985](https://github.com/rollup/rollup/pull/1985))
49
90
 
50
91
  ## 0.56.1
92
+ *2018-02-16*
51
93
  * Fix regression when rendering switch statements ([#1971](https://github.com/rollup/rollup/pull/1971))
52
94
 
53
95
  ## 0.56.0
96
+ *2018-02-15*
54
97
  * Update to ECMAScript 2018 ([#1953](https://github.com/rollup/rollup/pull/1953))
55
98
  * Rework tree-shaking rendering algorithm ([#1949](https://github.com/rollup/rollup/pull/1949))
56
99
  * Tree-shake pure prototype calls on literals ([#1916](https://github.com/rollup/rollup/pull/1916))
@@ -60,9 +103,11 @@
60
103
  * Fix internal performance timers ([#1966](https://github.com/rollup/rollup/pull/1966))
61
104
 
62
105
  ## 0.55.5
106
+ *2018-02-10*
63
107
  * Remove OpenCollective dependency ([#1915](https://github.com/rollup/rollup/pull/1915))
64
108
 
65
109
  ## 0.55.4
110
+ *2018-02-09*
66
111
  * Improve name deconflicting of external variables ([#1930](https://github.com/rollup/rollup/pull/1930))
67
112
  * Improve re-export handling ([#1947](https://github.com/rollup/rollup/pull/1947))
68
113
  * Mark preserveSymlinks option as optional ([#1939](https://github.com/rollup/rollup/pull/1939))
@@ -70,9 +115,11 @@
70
115
  * Improve TypeScript definition test ([#1954](https://github.com/rollup/rollup/pull/1954))
71
116
 
72
117
  ## 0.55.3
118
+ *2018-02-01*
73
119
  * Remove OpenCollective dependency ([#1915](https://github.com/rollup/rollup/pull/1915))
74
120
 
75
121
  ## 0.55.2
122
+ *2018-02-01*
76
123
  * Add option to not follow symlinks ([#1819](https://github.com/rollup/rollup/pull/1819))
77
124
  * Fix crash in windows shell ([#1928](https://github.com/rollup/rollup/pull/1928))
78
125
  * Fix and test for external TypeScript errors ([#1903](https://github.com/rollup/rollup/pull/1903))
@@ -80,6 +127,7 @@
80
127
  * Optimize CI scripts ([#1921](https://github.com/rollup/rollup/pull/1921))
81
128
 
82
129
  ## 0.55.1
130
+ *2018-01-26*
83
131
  * Improve dynamic import workflow ([#1907](https://github.com/rollup/rollup/pull/1907))
84
132
  * Properly handle multiple dynamic imports of the same module ([#1911](https://github.com/rollup/rollup/pull/1911))
85
133
  * Fix import specifier deshadowing ([#1912](https://github.com/rollup/rollup/pull/1912))
@@ -87,6 +135,7 @@
87
135
  * Let onwarn handler accept strings ([#1905](https://github.com/rollup/rollup/pull/1905))
88
136
 
89
137
  ## 0.55.0
138
+ *2018-01-23*
90
139
  * Support code splitting ([#1841](https://github.com/rollup/rollup/pull/1841))
91
140
  * Support SystemJS as output format ([#1897](https://github.com/rollup/rollup/pull/1897))
92
141
  * Allow injecting acorn plugins ([#1857](https://github.com/rollup/rollup/pull/1857))
@@ -102,9 +151,11 @@
102
151
  * Clean up some tests ([#1888](https://github.com/rollup/rollup/pull/1888))
103
152
 
104
153
  ## 0.54.1
154
+ *2018-01-17*
105
155
  * Fix TypeScript errors in emitted type definitions ([#1871](https://github.com/rollup/rollup/pull/1871))
106
156
 
107
157
  ## 0.54.0
158
+ *2018-01-12*
108
159
  * Automatically inline locally resolvable dynamic imports ([#1816](https://github.com/rollup/rollup/pull/1816))
109
160
  * Preserve directives in function bodies ([#1856](https://github.com/rollup/rollup/pull/1856))
110
161
  * Refactor an error notification ([#1846](https://github.com/rollup/rollup/pull/1846))
package/README.md CHANGED
@@ -27,14 +27,6 @@
27
27
  <img src='https://badges.gitter.im/rollup/rollup.svg'
28
28
  alt='Join the chat at https://gitter.im/rollup/rollup'>
29
29
  </a>
30
- <a href='https://opencollective.com/rollup/backers'>
31
- <img src='https://opencollective.com/rollup/backers/badge.svg'
32
- alt='Backers on Open Collective'>
33
- </a>
34
- <a href='https://opencollective.com/rollup/sponsors'>
35
- <img src='https://opencollective.com/rollup/sponsors/badge.svg'
36
- alt='Sponsors on Open Collective'>
37
- </a>
38
30
  </p>
39
31
 
40
32
 
@@ -54,21 +46,21 @@ For browsers:
54
46
 
55
47
  ```bash
56
48
  # compile to a <script> containing a self-executing function
57
- $ rollup main.js --output.format iife --name "myBundle" --output.file bundle.js
49
+ $ rollup main.js --format iife --name "myBundle" --file bundle.js
58
50
  ```
59
51
 
60
52
  For Node.js:
61
53
 
62
54
  ```bash
63
55
  # compile to a CommonJS module
64
- $ rollup main.js --output.format cjs --output.file bundle.js
56
+ $ rollup main.js --format cjs --file bundle.js
65
57
  ```
66
58
 
67
59
  For both browsers and Node.js:
68
60
 
69
61
  ```bash
70
62
  # UMD format requires a bundle name
71
- $ rollup main.js --output.format umd --name "myBundle" --output.file bundle.js
63
+ $ rollup main.js --format umd --name "myBundle" --file bundle.js
72
64
  ```
73
65
 
74
66
  ## Why