@rollup/plugin-commonjs 18.0.0-1 → 19.0.1
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 +40 -0
- package/LICENSE +21 -0
- package/README.md +62 -0
- package/dist/index.es.js +93 -49
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +93 -49
- package/dist/index.js.map +1 -1
- package/package.json +7 -8
- package/types/index.d.ts +14 -1
package/package.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rollup/plugin-commonjs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "19.0.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"description": "Convert CommonJS modules to ES2015",
|
|
8
8
|
"license": "MIT",
|
|
9
|
-
"repository":
|
|
9
|
+
"repository": {
|
|
10
|
+
"url": "rollup/plugins",
|
|
11
|
+
"directory": "packages/commonjs"
|
|
12
|
+
},
|
|
10
13
|
"author": "Rich Harris <richard.a.harris@gmail.com>",
|
|
11
14
|
"homepage": "https://github.com/rollup/plugins/tree/master/packages/commonjs/#readme",
|
|
12
15
|
"bugs": "https://github.com/rollup/plugins/issues",
|
|
@@ -21,13 +24,9 @@
|
|
|
21
24
|
"ci:lint": "pnpm run build && pnpm run lint",
|
|
22
25
|
"ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
|
|
23
26
|
"ci:test": "pnpm run test -- --verbose && pnpm run test:ts",
|
|
24
|
-
"lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
|
|
25
|
-
"lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md",
|
|
26
|
-
"lint:js": "eslint --fix --cache src test types --ext .js,.ts",
|
|
27
|
-
"lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
|
|
28
27
|
"prebuild": "del-cli dist",
|
|
29
28
|
"prepare": "pnpm run build",
|
|
30
|
-
"prepublishOnly": "pnpm run lint && pnpm run test:ts",
|
|
29
|
+
"prepublishOnly": "pnpm -w run lint && pnpm run test:ts",
|
|
31
30
|
"pretest": "pnpm run build",
|
|
32
31
|
"test": "ava",
|
|
33
32
|
"test:ts": "tsc types/index.d.ts test/types.ts --noEmit"
|
|
@@ -63,7 +62,7 @@
|
|
|
63
62
|
"@rollup/plugin-node-resolve": "^8.4.0",
|
|
64
63
|
"locate-character": "^2.0.5",
|
|
65
64
|
"require-relative": "^0.8.7",
|
|
66
|
-
"rollup": "^2.
|
|
65
|
+
"rollup": "^2.39.0",
|
|
67
66
|
"shx": "^0.3.2",
|
|
68
67
|
"source-map": "^0.7.3",
|
|
69
68
|
"source-map-support": "^0.5.19",
|
package/types/index.d.ts
CHANGED
|
@@ -35,10 +35,23 @@ interface RollupCommonJSOptions {
|
|
|
35
35
|
*/
|
|
36
36
|
ignoreGlobal?: boolean;
|
|
37
37
|
/**
|
|
38
|
-
* If false, skips source map generation for CommonJS modules. This will
|
|
38
|
+
* If false, skips source map generation for CommonJS modules. This will
|
|
39
|
+
* improve performance.
|
|
39
40
|
* @default true
|
|
40
41
|
*/
|
|
41
42
|
sourceMap?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Some `require` calls cannot be resolved statically to be translated to
|
|
45
|
+
* imports.
|
|
46
|
+
* When this option is set to `false`, the generated code will either
|
|
47
|
+
* directly throw an error when such a call is encountered or, when
|
|
48
|
+
* `dynamicRequireTargets` is used, when such a call cannot be resolved with a
|
|
49
|
+
* configured dynamic require target.
|
|
50
|
+
* Setting this option to `true` will instead leave the `require` call in the
|
|
51
|
+
* code or use it as a fallback for `dynamicRequireTargets`.
|
|
52
|
+
* @default false
|
|
53
|
+
*/
|
|
54
|
+
ignoreDynamicRequires?: boolean;
|
|
42
55
|
/**
|
|
43
56
|
* Instructs the plugin whether to enable mixed module transformations. This
|
|
44
57
|
* is useful in scenarios with modules that contain a mix of ES `import`
|