Skip to content

Commit 526c27d

Browse files
committed
API-2239 update babel/gulp
1 parent 5f14a7a commit 526c27d

File tree

3 files changed

+2156
-1769
lines changed

3 files changed

+2156
-1769
lines changed

gulpfile.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ gulp.task("lint", () => {
1717
.pipe(eslint.format());
1818
});
1919

20-
gulp.task("babel", () => {
20+
gulp.task("babel", async () => {
2121
gulp
2222
.src("src/*.js")
2323
.pipe(
2424
babel({
25-
presets: ["env"],
26-
plugins: ["transform-object-rest-spread",
27-
["transform-runtime", {
28-
"polyfill": false,
25+
presets: ["@babel/preset-env"],
26+
plugins: ["@babel/plugin-proposal-object-rest-spread",
27+
// polyfill skipped by default
28+
["@babel/plugin-transform-runtime", {
2929
"regenerator": true
3030
}
3131
]
@@ -35,9 +35,9 @@ gulp.task("babel", () => {
3535
.pipe(gulp.dest("dist"));
3636
});
3737

38-
gulp.task("build", () => {
38+
gulp.task("build", async () => {
3939
webpack({
40-
entry: ["babel-polyfill", path.join(__dirname, "./src/bynder-js-sdk")],
40+
entry: ["@babel/polyfill", path.join(__dirname, "./src/bynder-js-sdk")],
4141
output: {
4242
path: path.join(__dirname, "/dist/"),
4343
filename: "bundle.js",
@@ -52,17 +52,17 @@ gulp.task("build", () => {
5252
test: /\.js$/,
5353
exclude: /node_modules/,
5454
loader: "babel-loader",
55-
query: {
56-
presets: ["env"],
57-
plugins: ["transform-object-rest-spread"],
55+
options: {
56+
presets: ["@babel/preset-env"],
57+
plugins: ["@babel/plugin-proposal-object-rest-spread"],
5858
}
5959
},
6060
{
6161
test: /\.js$/,
6262
include: /node_modules\/proper-url-join/,
6363
loader: "babel-loader",
64-
query: {
65-
presets: [["env", { "modules": 'commonjs' }]],
64+
options: {
65+
presets: [["@babel/preset-env", { "modules": 'commonjs' }]],
6666
plugins: ["add-module-exports"]
6767
}
6868
}

package.json

+17-11
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,34 @@
1414
"dist/bynder-js-sdk.js"
1515
],
1616
"devDependencies": {
17-
"babel": "^6.23.0",
18-
"babel-core": "^6.26.3",
19-
"babel-loader": "^7.1.5",
17+
"@babel/core": "^7.26.9",
18+
"@babel/plugin-transform-object-rest-spread": "^7.25.9",
19+
"@babel/polyfill": "^7.0.0",
20+
"@babel/preset-env": "^7.0.0",
21+
"babel-core": "^7.0.0-bridge.0",
22+
"babel-jest": "^24.0.0",
23+
"babel-loader": "^8.0.0",
2024
"babel-plugin-add-module-exports": "^1.0.4",
21-
"babel-polyfill": "^6.26.0",
22-
"babel-preset-env": "^1.7.0",
2325
"eslint": "^5.0.0",
2426
"eslint-config-airbnb": "^18.0.1",
2527
"eslint-plugin-import": "^2.18.2",
2628
"eslint-plugin-jsx-a11y": "^6.2.3",
2729
"eslint-plugin-react": "^7.15.1",
28-
"gulp": "^3.9.1",
30+
"gulp": "^4.0.0",
2931
"gulp-babel": "^8.0.0",
3032
"gulp-connect": "^5.7.0",
3133
"gulp-eslint": "^6.0.0",
3234
"gulp-jsdoc3": "^3.0.0",
3335
"jest": "^28.1.3",
3436
"json-loader": "^0.5.7",
3537
"path": "^0.12.7",
36-
"webpack": "^4.41.0"
38+
"webpack": "^4.44.2"
3739
},
3840
"dependencies": {
41+
"@babel/core": "^7.26.9",
42+
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
43+
"@babel/plugin-transform-runtime": "^7.0.0",
3944
"axios": "^0.28.0",
40-
"babel-plugin-transform-object-rest-spread": "^6.26.0",
41-
"babel-plugin-transform-runtime": "^6.23.0",
4245
"elliptic": "6.6.1",
4346
"handlebars": "4.7.7",
4447
"ini": "1.3.8",
@@ -53,13 +56,16 @@
5356
"yargs-parser": "13.1.2"
5457
},
5558
"resolutions": {
59+
"braces": "^3.0.3",
5660
"graceful-fs": "^4.2.4",
5761
"lodash": "^4.17.21",
5862
"@hapi/hoek": "8.5.1",
59-
"json5": "1.0.2",
63+
"json5": "2.2.3",
64+
"micromatch": "4.0.8",
6065
"postcss": "8.4.31",
6166
"sanitize-html": "2.12.1",
62-
"send": "0.19.0"
67+
"send": "0.19.0",
68+
"serialize-javascript": "6.0.2"
6369
},
6470
"repository": "[email protected]:Bynder/bynder-js-sdk.git"
6571
}

0 commit comments

Comments
 (0)