@rollup/plugin-commonjs 22.0.0-7 → 22.0.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,67 @@
1
1
  # @rollup/plugin-commonjs ChangeLog
2
2
 
3
+ ## v22.0.0
4
+
5
+ _2022-04-24_
6
+
7
+ ### Breaking Changes
8
+
9
+ - fix: add heuristic to deoptimize requires after calling imported function (requires rollup@2.68.0) (#1038)
10
+ - feat: reimplement dynamic import handling (requires Node 12, no longer supports require.cache) (#1038)
11
+
12
+ ### Bugfixes
13
+
14
+ - fix: support CJS modules re-exporting transpiled ESM modules (#1165)
15
+ - fix: Warn when plugins do not pass options to resolveId (#1038)
16
+ - fix: Do not change semantics when removing requires in if statements (#1038)
17
+ - fix: handle external dependencies when using the cache (#1038)
18
+ - fix: proxy all entries to not break legacy polyfill plugins (#1038)
19
+ - fix: use correct version and add package exports (#1038)
20
+ - fix: validate node-resolve peer version (#1038)
21
+ - fix: inject module name into dynamic require function (#1038)
22
+ - fix: do not transform "typeof exports" for mixed modules (#1038)
23
+ - fix: attach correct plugin meta-data to commonjs modules (#1038)
24
+
25
+ ### Features
26
+
27
+ - feat: expose plugin version (#1038)
28
+ - feat: throw for dynamic requires from outside the configured root (#1038)
29
+ - feat: add dynamicRequireRoot option (#1038)
30
+ - feat: auto-detect conditional requires (#1038)
31
+ - feat: limit ignoreTryCatch to external requires (#1038)
32
+ - feat: make namespace callable when requiring ESM with function default (#1038)
33
+ - feat: Infer type for unidentified modules (#1038)
34
+ - feat: automatically wrap cyclic modules (#1038)
35
+ - feat: add strictRequires option to wrap modules (#1038)
36
+
37
+ ### Updates
38
+
39
+ - refactor: deconflict helpers only once globals are known (#1038)
40
+
41
+ ## v21.1.0
42
+
43
+ _2022-04-15_
44
+
45
+ ### Features
46
+
47
+ - feat: make defaultIsModuleExports as funtion to config defaultIsModuleExports for each source (#1052)
48
+
49
+ ## v21.0.3
50
+
51
+ _2022-03-27_
52
+
53
+ ### Updates
54
+
55
+ - docs: sync required rollup version (#1118)
56
+
57
+ ## v21.0.2
58
+
59
+ _2022-02-23_
60
+
61
+ ### Updates
62
+
63
+ - chore: transpile dynamic helper to ES5 (#1082)
64
+
3
65
  ## v21.0.1
4
66
 
5
67
  _2021-10-19_
package/README.md CHANGED
@@ -13,7 +13,7 @@
13
13
 
14
14
  ## Requirements
15
15
 
16
- This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
16
+ This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v12.0.0+) and Rollup v2.68.0+. If you are using [`@rollup/plugin-node-resolve`](https://github.com/rollup/plugins/tree/master/packages/node-resolve), it should be v13.0.6+.
17
17
 
18
18
  ## Install
19
19
 
@@ -68,6 +68,8 @@ You can also provide a [minimatch pattern](https://github.com/isaacs/minimatch),
68
68
  Type: `string | string[]`<br>
69
69
  Default: `[]`
70
70
 
71
+ _Note: In previous versions, this option would spin up a rather comprehensive mock environment that was capable of handling modules that manipulate `require.cache`. This is no longer supported. If you rely on this e.g. when using request-promise-native, use version 21 of this plugin._
72
+
71
73
  Some modules contain dynamic `require` calls, or require modules that contain circular dependencies, which are not handled well by static imports.
72
74
  Including those modules as `dynamicRequireTargets` will simulate a CommonJS (NodeJS-like) environment for them with support for dynamic dependencies. It also enables `strictRequires` for those modules, see above.
73
75