@rollup/plugin-commonjs 23.0.3 → 23.0.4

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/dist/cjs/index.js CHANGED
@@ -11,7 +11,7 @@ var estreeWalker = require('estree-walker');
11
11
  var MagicString = require('magic-string');
12
12
  var isReference = require('is-reference');
13
13
 
14
- var version = "23.0.3";
14
+ var version = "23.0.4";
15
15
  var peerDependencies = {
16
16
  rollup: "^2.68.0||^3.0.0"
17
17
  };
package/dist/es/index.js CHANGED
@@ -7,7 +7,7 @@ import { walk } from 'estree-walker';
7
7
  import MagicString from 'magic-string';
8
8
  import isReference from 'is-reference';
9
9
 
10
- var version = "23.0.3";
10
+ var version = "23.0.4";
11
11
  var peerDependencies = {
12
12
  rollup: "^2.68.0||^3.0.0"
13
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rollup/plugin-commonjs",
3
- "version": "23.0.3",
3
+ "version": "23.0.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/types/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { FilterPattern } from '@rollup/pluginutils';
2
- import { Plugin } from 'rollup';
1
+ import type { FilterPattern } from '@rollup/pluginutils';
2
+ import type { Plugin } from 'rollup';
3
3
 
4
4
  type RequireReturnsDefaultOption = boolean | 'auto' | 'preferred' | 'namespace';
5
5
  type DefaultIsModuleExportsOption = boolean | 'auto';
@@ -109,17 +109,17 @@ interface RollupCommonJSOptions {
109
109
  * they should be left unconverted as it requires an optional dependency
110
110
  * that may or may not be installed beside the rolled up package.
111
111
  * Due to the conversion of `require` to a static `import` - the call is
112
- * hoisted to the top of the file, outside of the `try-catch` clause.
112
+ * hoisted to the top of the file, outside the `try-catch` clause.
113
113
  *
114
- * - `true`: All `require` calls inside a `try` will be left unconverted.
114
+ * - `true`: Default. All `require` calls inside a `try` will be left unconverted.
115
115
  * - `false`: All `require` calls inside a `try` will be converted as if the
116
116
  * `try-catch` clause is not there.
117
117
  * - `remove`: Remove all `require` calls from inside any `try` block.
118
118
  * - `string[]`: Pass an array containing the IDs to left unconverted.
119
- * - `((id: string) => boolean|'remove')`: Pass a function that control
119
+ * - `((id: string) => boolean|'remove')`: Pass a function that controls
120
120
  * individual IDs.
121
121
  *
122
- * @default false
122
+ * @default true
123
123
  */
124
124
  ignoreTryCatch?:
125
125
  | boolean
@@ -133,14 +133,14 @@ interface RollupCommonJSOptions {
133
133
  * NodeJS where ES modules can only import a default export from a CommonJS
134
134
  * dependency.
135
135
  *
136
- * If you set `esmExternals` to `true`, this plugins assumes that all
136
+ * If you set `esmExternals` to `true`, this plugin assumes that all
137
137
  * external dependencies are ES modules and respect the
138
138
  * `requireReturnsDefault` option. If that option is not set, they will be
139
139
  * rendered as namespace imports.
140
140
  *
141
141
  * You can also supply an array of ids to be treated as ES modules, or a
142
- * function that will be passed each external id to determine if it is an ES
143
- * module.
142
+ * function that will be passed each external id to determine whether it is
143
+ * an ES module.
144
144
  * @default false
145
145
  */
146
146
  esmExternals?: boolean | ReadonlyArray<string> | ((id: string) => boolean);
@@ -158,7 +158,7 @@ interface RollupCommonJSOptions {
158
158
  * import * as foo from 'foo';
159
159
  * ```
160
160
  *
161
- * However there are some situations where this may not be desired.
161
+ * However, there are some situations where this may not be desired.
162
162
  * For these situations, you can change Rollup's behaviour either globally or
163
163
  * per module. To change it globally, set the `requireReturnsDefault` option
164
164
  * to one of the following values:
@@ -208,7 +208,7 @@ interface RollupCommonJSOptions {
208
208
  * Some modules contain dynamic `require` calls, or require modules that
209
209
  * contain circular dependencies, which are not handled well by static
210
210
  * imports. Including those modules as `dynamicRequireTargets` will simulate a
211
- * CommonJS (NodeJS-like) environment for them with support for dynamic
211
+ * CommonJS (NodeJS-like) environment for them with support for dynamic
212
212
  * dependencies. It also enables `strictRequires` for those modules.
213
213
  *
214
214
  * Note: In extreme cases, this feature may result in some paths being
@@ -222,7 +222,7 @@ interface RollupCommonJSOptions {
222
222
  * To avoid long paths when using the `dynamicRequireTargets` option, you can use this option to specify a directory
223
223
  * that is a common parent for all files that use dynamic require statements. Using a directory higher up such as `/`
224
224
  * may lead to unnecessarily long paths in the generated code and may expose directory names on your machine like your
225
- * home directory name. By default it uses the current working directory.
225
+ * home directory name. By default, it uses the current working directory.
226
226
  */
227
227
  dynamicRequireRoot?: string;
228
228
  }