rollup 1.16.4 → 1.17.0

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 CHANGED
@@ -1,5 +1,46 @@
1
1
  # rollup changelog
2
2
 
3
+ ## 1.17.0
4
+ *2019-07-15*
5
+
6
+ ### Features
7
+ * Allow plugins to access current combined sourcemap in transform hook for coverage instrumentation (#2986)
8
+
9
+ ### Pull Requests
10
+ * [#2987](https://github.com/rollup/rollup/pull/2987): Fix code fences for link (@johanholmerin)
11
+ * [#2989](https://github.com/rollup/rollup/pull/2989): Bump lodash from 4.17.11 to 4.17.14 (@dependabot)
12
+ * [#2993](https://github.com/rollup/rollup/pull/2993): Add getCombinedSourceMap in transform plugin context (@billowz)
13
+
14
+ ## 1.16.7
15
+ *2019-07-09*
16
+
17
+ ### Bug Fixes
18
+ * Fix an issue where exported import.meta properties would lead to invalid code (#2986)
19
+
20
+ ### Pull Requests
21
+ * [#2985](https://github.com/rollup/rollup/pull/2985): Improve sourcemap types (@jridgewell)
22
+ * [#2986](https://github.com/rollup/rollup/pull/2986): Only overwrite content when resolving import.meta properties (@lukastaegert)
23
+
24
+ ## 1.16.6
25
+ *2019-07-04*
26
+
27
+ ### Bug Fixes
28
+ * Do not pass undefined to resolveDynamicImport for unresolvable template literals (#2984)
29
+
30
+ ### Pull Requests
31
+ * [#2984](https://github.com/rollup/rollup/pull/2984): Always forward AST nodes for unresolvable dynamic imports (@lukastaegert)
32
+
33
+ ## 1.16.5
34
+ *2019-07-04*
35
+
36
+ ### Bug Fixes
37
+ * onwarn should still be called when --silent is used (#2982)
38
+ * Properly clean up watchers for files that are deleted between builds (#2982)
39
+
40
+ ### Pull Requests
41
+ * [#2981](https://github.com/rollup/rollup/pull/2981): Do not skip onwarn handler when --silent is used (@lukastaegert)
42
+ * [#2982](https://github.com/rollup/rollup/pull/2982): Make tests run on Node 12, fix watcher cleanup issue (@lukastaegert)
43
+
3
44
  ## 1.16.4
4
45
  *2019-07-02*
5
46
 
@@ -8,7 +49,7 @@
8
49
  * Use the correct TypeScript type for Sourcemap.version (#2976)
9
50
 
10
51
  ### Pull Requests
11
- * [#2965](https://github.com/rollup/rollup/pull/2974): Use async readFile in getRollupDefaultPlugin (@kaksmet)
52
+ * [#2965](https://github.com/rollup/rollup/pull/2965): Use async readFile in getRollupDefaultPlugin (@kaksmet)
12
53
  * [#2974](https://github.com/rollup/rollup/pull/2974): Align TS types, docs and implementation for this.warn and this.error (@lukastaegert)
13
54
  * [#2976](https://github.com/rollup/rollup/pull/2976): Fix sourcemap type and update dependencies (@lukastaegert)
14
55
 
package/bin/rollup CHANGED
@@ -223,7 +223,7 @@ function isNumber(x) {
223
223
  return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
224
224
  }
225
225
 
226
- var version = "1.16.4";
226
+ var version = "1.17.0";
227
227
 
228
228
  const createGetOption = (config, command) => (name, defaultValue) => command[name] !== undefined
229
229
  ? command[name]
@@ -255,11 +255,9 @@ const defaultOnWarn = warning => {
255
255
  console.warn(warning.message);
256
256
  }
257
257
  };
258
- const getOnWarn = (config, command, defaultOnWarnHandler = defaultOnWarn) => command.silent
259
- ? () => { }
260
- : config.onwarn
261
- ? warning => config.onwarn(warning, defaultOnWarnHandler)
262
- : defaultOnWarnHandler;
258
+ const getOnWarn = (config, defaultOnWarnHandler = defaultOnWarn) => config.onwarn
259
+ ? warning => config.onwarn(warning, defaultOnWarnHandler)
260
+ : defaultOnWarnHandler;
263
261
  const getExternal = (config, command) => {
264
262
  const configExternal = config.external;
265
263
  return typeof configExternal === 'function'
@@ -344,7 +342,7 @@ function getInputOptions(config, command = { external: [], globals: undefined },
344
342
  input: getOption('input', []),
345
343
  manualChunks: getOption('manualChunks'),
346
344
  moduleContext: config.moduleContext,
347
- onwarn: getOnWarn(config, command, defaultOnWarnHandler),
345
+ onwarn: getOnWarn(config, defaultOnWarnHandler),
348
346
  perf: getOption('perf', false),
349
347
  plugins: config.plugins,
350
348
  preserveModules: getOption('preserveModules'),
@@ -727,7 +725,7 @@ const deferredHandlers = {
727
725
  const nestedByMessage = nest(items, 'message');
728
726
  let lastUrl;
729
727
  nestedByMessage.forEach(({ key: message, items }) => {
730
- title(`${plugin} plugin: ${message}`);
728
+ title(`Plugin ${plugin}: ${message}`);
731
729
  items.forEach(warning => {
732
730
  if (warning.url !== lastUrl)
733
731
  info((lastUrl = warning.url));
@@ -994,11 +992,12 @@ function build(inputOptions, outputOptions, warnings, silent = false) {
994
992
  return Promise.all(outputOptions.map(output => bundle.write(output))).then(() => bundle);
995
993
  })
996
994
  .then((bundle) => {
997
- warnings.flush();
998
- if (!silent)
995
+ if (!silent) {
996
+ warnings.flush();
999
997
  stderr(turbocolor.green(`created ${turbocolor.bold(files.join(', '))} in ${turbocolor.bold(prettyMs(Date.now() - start))}`));
1000
- if (bundle && bundle.getTimings) {
1001
- printTimings(bundle.getTimings());
998
+ if (bundle && bundle.getTimings) {
999
+ printTimings(bundle.getTimings());
1000
+ }
1002
1001
  }
1003
1002
  })
1004
1003
  .catch((err) => {