diff --git a/CHANGES.md b/CHANGES.md index e1912f24..65fef4be 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -101,6 +101,8 @@ - npm: Add `license-badges`, `build-docs`, and `copy` scripts to `prepublishOnly` script - npm: Rename `test-prep` to `prep` and other misc. script naming changes - npm: Update `package-lock.json` +- npm: Update from deprecated `rollup-plugin-babel` to `@rollup/plugin-babel` + (and make `babelHelpers` explicit) - npm: Update devDeps, peerDeps ## 5.1.0 diff --git a/package-lock.json b/package-lock.json index feb2646e..e568856f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2173,6 +2173,35 @@ "integrity": "sha512-7XHoRB61hxsz8lBQrjC1tq/3OEIgpvGWg6DKAdwi7WRzruwkmsdwmOoUXbU4Dtd4RSOMDwed0SkP3y8UlMt1Bg==", "dev": true }, + "@rollup/plugin-babel": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.0.0.tgz", + "integrity": "sha512-YpVnwdUeVj/fDFN75Y3CAzJTMYNcqbH05SJs551wqj+BSwLT9pS3dqJrVDPYl3eH4OrI8ueiEseX5VgUn+0HLA==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.7.4", + "@rollup/pluginutils": "^3.0.8" + } + }, + "@rollup/pluginutils": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.0.10.tgz", + "integrity": "sha512-d44M7t+PjmMrASHbhgpSbVgtL6EFyX7J4mYxwQ/c5eoaE6N2VgCgEcWVzNnwycIloti+/MpwFr8qfw+nRw00sw==", + "dev": true, + "requires": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + }, + "dependencies": { + "estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true + } + } + }, "@samverschueren/stream-to-observable": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz", @@ -2270,6 +2299,12 @@ "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==", "dev": true }, + "@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true + }, "@types/events": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", @@ -12559,16 +12594,6 @@ } } }, - "rollup-plugin-babel": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-babel/-/rollup-plugin-babel-4.4.0.tgz", - "integrity": "sha512-Lek/TYp1+7g7I+uMfJnnSJ7YWoD58ajo6Oarhlex7lvUce+RCKRuGRSgztDO3/MF/PuGKmUL5iTHKf208UNszw==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "rollup-pluginutils": "^2.8.1" - } - }, "rollup-plugin-re": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/rollup-plugin-re/-/rollup-plugin-re-1.0.7.tgz", diff --git a/package.json b/package.json index 4f281a1b..fcaa72f7 100644 --- a/package.json +++ b/package.json @@ -150,6 +150,7 @@ "@cypress/fiddle": "^1.18.2", "@fintechstudios/eslint-plugin-chai-as-promised": "^3.0.2", "@mysticatea/eslint-plugin": "^13.0.0", + "@rollup/plugin-babel": "^5.0.0", "babel-plugin-transform-object-rest-spread": "^7.0.0-beta.3", "coffeescript": "^2.5.1", "copyfiles": "^2.2.0", @@ -207,7 +208,6 @@ "remark-lint-ordered-list-marker-value": "^2.0.0", "rimraf": "^3.0.2", "rollup": "2.8.2", - "rollup-plugin-babel": "^4.4.0", "rollup-plugin-re": "^1.0.7", "rollup-plugin-terser": "^5.3.0", "stackblur-canvas": "^2.2.0", diff --git a/rollup.config.js b/rollup.config.js index b9fb5319..fd1b1abd 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -6,7 +6,7 @@ import {join, basename} from 'path'; import {lstatSync, readdirSync, copyFileSync, mkdirSync} from 'fs'; -import babel from 'rollup-plugin-babel'; +import babel from '@rollup/plugin-babel'; import {terser} from 'rollup-plugin-terser'; import replace from 'rollup-plugin-re'; @@ -50,6 +50,7 @@ function getRollupObject ({minifying, format = 'umd'} = {}) { }, plugins: [ babel({ + babelHelpers: 'bundled', plugins: [ 'transform-object-rest-spread', '@babel/plugin-transform-named-capturing-groups-regex' @@ -86,6 +87,7 @@ export default [ }, plugins: [ babel({ + babelHelpers: 'bundled', plugins: ['transform-object-rest-spread'] }), min ? terser() : null @@ -101,7 +103,9 @@ export default [ name: `svgEditorExtensionLocale_${basename(dir)}_${lang}`, file: `dist/extensions/ext-locale/${basename(dir)}/${file}` }, - plugins: [babel()] + plugins: [babel({ + babelHelpers: 'bundled' + })] }; }), { @@ -110,7 +114,9 @@ export default [ format: 'iife', file: 'dist/redirect-on-lacking-support.js' }, - plugins: [babel()] + plugins: [babel({ + babelHelpers: 'bundled' + })] }, { input: 'editor/jspdf/jspdf.plugin.svgToPdf.js', @@ -118,7 +124,9 @@ export default [ format: 'iife', file: 'dist/jspdf.plugin.svgToPdf.js' }, - plugins: [babel()] + plugins: [babel({ + babelHelpers: 'bundled' + })] }, { input: 'editor/extensions/imagelib/index.js', @@ -128,6 +136,7 @@ export default [ }, plugins: [ babel({ + babelHelpers: 'bundled', plugins: ['transform-object-rest-spread'] }) ] @@ -140,6 +149,7 @@ export default [ }, plugins: [ babel({ + babelHelpers: 'bundled', plugins: ['transform-object-rest-spread'] }) ] @@ -150,7 +160,9 @@ export default [ format: 'iife', file: 'dist/dom-polyfill.js' }, - plugins: [babel()] + plugins: [babel({ + babelHelpers: 'bundled' + })] }, { input: 'editor/canvg/canvg.js', @@ -159,7 +171,9 @@ export default [ name: 'canvg', file: 'dist/canvg.js' }, - plugins: [babel()] + plugins: [babel({ + babelHelpers: 'bundled' + })] }, ...localeFiles.map((localeFile) => { // lang.*.js @@ -177,7 +191,9 @@ export default [ }, plugins: [ // Probably don't need here, but... - babel() + babel({ + babelHelpers: 'bundled' + }) ] }; }), @@ -229,6 +245,7 @@ export default [ ] }), babel({ + babelHelpers: 'bundled', plugins: ['transform-object-rest-spread'] }) ]