@rollup/plugin-babel
Advanced tools
Comparing version 5.3.1 to 6.0.0
{ | ||
"name": "@rollup/plugin-babel", | ||
"version": "5.3.1", | ||
"version": "6.0.0", | ||
"publishConfig": { | ||
@@ -16,6 +16,11 @@ "access": "public" | ||
"bugs": "https://github.com/rollup/plugins/issues", | ||
"main": "dist/index.js", | ||
"module": "dist/index.es.js", | ||
"main": "./dist/cjs/index.js", | ||
"module": "./dist/es/index.js", | ||
"exports": { | ||
"types": "./types/index.d.ts", | ||
"import": "./dist/es/index.js", | ||
"default": "./dist/cjs/index.js" | ||
}, | ||
"engines": { | ||
"node": ">= 10.0.0" | ||
"node": ">=14.0.0" | ||
}, | ||
@@ -31,3 +36,3 @@ "scripts": { | ||
"pretest": "pnpm build", | ||
"release": "pnpm plugin:release --workspace-root -- --pkg $npm_package_name", | ||
"release": "pnpm --workspace-root plugin:release --pkg $npm_package_name", | ||
"test": "ava", | ||
@@ -38,2 +43,3 @@ "test:ts": "tsc types/index.d.ts test/types.ts --noEmit" | ||
"dist", | ||
"!dist/**/*.map", | ||
"types", | ||
@@ -54,5 +60,8 @@ "README.md", | ||
"@types/babel__core": "^7.1.9", | ||
"rollup": "^1.20.0||^2.0.0" | ||
"rollup": "^1.20.0||^2.0.0||^3.0.0" | ||
}, | ||
"peerDependenciesMeta": { | ||
"rollup": { | ||
"optional": true | ||
}, | ||
"@types/babel__core": { | ||
@@ -63,23 +72,20 @@ "optional": true | ||
"dependencies": { | ||
"@babel/helper-module-imports": "^7.10.4", | ||
"@rollup/pluginutils": "^3.1.0" | ||
"@babel/helper-module-imports": "^7.18.6", | ||
"@rollup/pluginutils": "^4.2.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.10.5", | ||
"@babel/plugin-external-helpers": "^7.10.4", | ||
"@babel/plugin-proposal-decorators": "^7.10.5", | ||
"@babel/core": "^7.19.1", | ||
"@babel/plugin-external-helpers": "^7.18.6", | ||
"@babel/plugin-proposal-decorators": "^7.19.1", | ||
"@babel/plugin-syntax-dynamic-import": "^7.8.3", | ||
"@babel/plugin-transform-runtime": "^7.10.5", | ||
"@babel/preset-env": "^7.10.4", | ||
"@babel/plugin-transform-runtime": "^7.19.1", | ||
"@babel/preset-env": "^7.19.1", | ||
"@rollup/plugin-json": "^4.1.0", | ||
"@rollup/plugin-node-resolve": "^10.0.0", | ||
"@rollup/plugin-node-resolve": "^14.1.0", | ||
"@types/babel__core": "^7.1.9", | ||
"rollup": "^2.67.3", | ||
"source-map": "^0.7.3" | ||
"rollup": "^3.0.0-7", | ||
"source-map": "^0.7.4" | ||
}, | ||
"types": "types/index.d.ts", | ||
"types": "./types/index.d.ts", | ||
"ava": { | ||
"babel": { | ||
"compileEnhancements": false | ||
}, | ||
"files": [ | ||
@@ -86,0 +92,0 @@ "!**/fixtures/**", |
@@ -29,3 +29,3 @@ [npm]: https://img.shields.io/npm/v/@rollup/plugin-babel | ||
This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v10.0.0+) and Rollup v1.20.0+. | ||
This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v14.0.0+) and Rollup v1.20.0+. | ||
@@ -49,3 +49,3 @@ ## Install | ||
dir: 'output', | ||
format: 'esm' | ||
format: 'es' | ||
}, | ||
@@ -89,3 +89,3 @@ plugins: [babel({ babelHelpers: 'bundled' })] | ||
A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should _ignore_. When relying on Babel configuration files you can only exclude additional files with this option, you cannot override what you have configured for Babel itself. | ||
A [picomatch pattern](https://github.com/micromatch/picomatch), or array of patterns, which specifies the files in the build the plugin should _ignore_. When relying on Babel configuration files you can only exclude additional files with this option, you cannot override what you have configured for Babel itself. | ||
@@ -96,3 +96,3 @@ ### `include` | ||
A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. When relying on Babel configuration files you cannot include files already excluded there. | ||
A [picomatch pattern](https://github.com/micromatch/picomatch), or array of patterns, which specifies the files in the build the plugin should operate on. When relying on Babel configuration files you cannot include files already excluded there. | ||
@@ -181,3 +181,3 @@ ### `filter` | ||
{ file: 'bundle.cjs.js', format: 'cjs' }, | ||
{ file: 'bundle.esm.js', format: 'esm' } | ||
{ file: 'bundle.es.js', format: 'es' } | ||
] | ||
@@ -196,6 +196,6 @@ }; | ||
output: [ | ||
{ file: 'bundle.js', format: 'esm' }, | ||
{ file: 'bundle.js', format: 'es' }, | ||
{ | ||
file: 'bundle.es5.js', | ||
format: 'esm', | ||
format: 'es', | ||
plugins: [getBabelOutputPlugin({ presets: ['@babel/preset-env'] })] | ||
@@ -221,3 +221,3 @@ } | ||
file: 'bundle.js', | ||
format: 'esm', | ||
format: 'es', | ||
plugins: [getBabelOutputPlugin({ presets: ['@babel/preset-env'] })] | ||
@@ -241,3 +241,3 @@ } | ||
As `getBabelOutputPlugin(...)` will run _after_ Rollup has done all its transformations, it needs to make sure it preserves the semantics of Rollup's output format. This is especially important for Babel plugins that add, modify or remove imports or exports, but also for other transformations that add new variables as they can accidentally become global variables depending on the format. Therefore it is recommended that for formats other than `esm` or `cjs`, you set Rollup to use the `esm` output format and let Babel handle the transformation to another format, e.g. via | ||
As `getBabelOutputPlugin(...)` will run _after_ Rollup has done all its transformations, it needs to make sure it preserves the semantics of Rollup's output format. This is especially important for Babel plugins that add, modify or remove imports or exports, but also for other transformations that add new variables as they can accidentally become global variables depending on the format. Therefore it is recommended that for formats other than `es` or `cjs`, you set Rollup to use the `es` output format and let Babel handle the transformation to another format, e.g. via | ||
@@ -267,3 +267,3 @@ ``` | ||
Note that this will only work for `esm` and `cjs` formats, and you need to make sure to set the `useESModules` option of `@babel/plugin-transform-runtime` to `true` if you create ESM output: | ||
Note that this will only work for `es` and `cjs` formats, and you need to make sure to set the `useESModules` option of `@babel/plugin-transform-runtime` to `true` if you create ES output: | ||
@@ -273,3 +273,3 @@ ```js | ||
.then(bundle => bundle.generate({ | ||
format: 'esm', | ||
format: 'es', | ||
plugins: [getBabelOutputPlugin({ | ||
@@ -276,0 +276,0 @@ presets: ['@babel/preset-env'], |
@@ -8,3 +8,3 @@ import { Plugin, PluginContext, TransformPluginContext } from 'rollup'; | ||
/** | ||
* A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should operate on. When relying on Babel configuration files you cannot include files already excluded there. | ||
* A picomatch pattern, or array of patterns, which specifies the files in the build the plugin should operate on. When relying on Babel configuration files you cannot include files already excluded there. | ||
* @default undefined; | ||
@@ -14,3 +14,3 @@ */ | ||
/** | ||
* A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should ignore. When relaying on Babel configuration files you can only exclude additional files with this option, you cannot override what you have configured for Babel itself. | ||
* A picomatch pattern, or array of patterns, which specifies the files in the build the plugin should ignore. When relaying on Babel configuration files you can only exclude additional files with this option, you cannot override what you have configured for Babel itself. | ||
* @default undefined; | ||
@@ -17,0 +17,0 @@ */ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51980
843
1
+ Added@rollup/pluginutils@4.2.1(transitive)
+ Addedestree-walker@2.0.2(transitive)
+ Addedrollup@3.29.5(transitive)
- Removed@rollup/pluginutils@3.1.0(transitive)
- Removed@types/estree@0.0.39(transitive)
- Removedestree-walker@1.0.1(transitive)
- Removedrollup@2.79.2(transitive)
Updated@rollup/pluginutils@^4.2.1