1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
|
From: Julian Gilbey <jdg@debian.org>
Date: Wed, 29 Oct 2025 13:12:27 +0100
Subject: Use more modern versions of babel and rollup for building package
Forwarded: https://github.com/caolan/async/issues/1992
---
.babelrc | 4 ++--
support/build/aggregate-bundle.js | 2 +-
support/build/aggregate-module.js | 2 +-
support/build/compile-module.js | 8 +++-----
4 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/.babelrc b/.babelrc
index 911ec28..777385f 100644
--- a/.babelrc
+++ b/.babelrc
@@ -1,7 +1,7 @@
{
"plugins": [
- "transform-es2015-modules-commonjs",
- "syntax-async-generators"
+ "@babel/plugin-transform-modules-commonjs",
+ "@babel/plugin-syntax-async-generators"
],
"env": {
"test": {
diff --git a/support/build/aggregate-bundle.js b/support/build/aggregate-bundle.js
index 452a1f1..4b80f27 100644
--- a/support/build/aggregate-bundle.js
+++ b/support/build/aggregate-bundle.js
@@ -1,5 +1,5 @@
const {rollup} = require('rollup');
-const nodeResolve = require('rollup-plugin-node-resolve');
+const nodeResolve = require('@rollup/plugin-node-resolve');
rollup({
input: 'build-es/index.js',
diff --git a/support/build/aggregate-module.js b/support/build/aggregate-module.js
index fde7e78..7765ac1 100644
--- a/support/build/aggregate-module.js
+++ b/support/build/aggregate-module.js
@@ -1,5 +1,5 @@
const {rollup} = require('rollup');
-const nodeResolve = require('rollup-plugin-node-resolve');
+const nodeResolve = require('@rollup/plugin-node-resolve');
rollup({
input: 'build-es/index.js',
diff --git a/support/build/compile-module.js b/support/build/compile-module.js
index 38a4d38..9cd42a7 100755
--- a/support/build/compile-module.js
+++ b/support/build/compile-module.js
@@ -2,9 +2,7 @@
const yargs = require('yargs');
const fs = require('fs');
-const {transformFile} = require('babel-core');
-const pluginCJS = require('babel-plugin-transform-es2015-modules-commonjs');
-const pluginModuleExports = require('babel-plugin-add-module-exports');
+const {transformFile} = require('@babel/core');
compileModule(yargs.argv, (err) => {
if (err) throw err;
@@ -13,8 +11,8 @@ compileModule(yargs.argv, (err) => {
function compileModule(options, callback) {
const {file, output} = options;
const plugins = [
- pluginModuleExports,
- pluginCJS
+ "babel-plugin-add-module-exports",
+ "@babel/plugin-transform-modules-commonjs"
];
transformFile(file, {
|