Skip to content

Commit d155e48

Browse files
authored
feat: update dependencies / add peer dependency to @babel/core (#135)
Fixes #133
1 parent cb7d990 commit d155e48

File tree

8 files changed

+8293
-9015
lines changed

8 files changed

+8293
-9015
lines changed

.husky/pre-commit

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
41
npm run hooks:pre-commit

.husky/pre-push

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
41
npm run hooks:pre-push

package-lock.json

Lines changed: 8242 additions & 8955 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
"name": "babel-ui5",
33
"private": true,
44
"devDependencies": {
5-
"@babel/eslint-parser": "^7.23.3",
6-
"@commitlint/cli": "^18.4.3",
7-
"@commitlint/config-conventional": "^18.4.3",
5+
"@commitlint/cli": "^19.5.0",
6+
"@commitlint/config-conventional": "^19.5.0",
87
"cz-conventional-changelog": "^3.3.0",
98
"eslint": "^8.54.0",
109
"eslint-config-prettier": "^9.0.0",
1110
"eslint-plugin-prettier": "^5.0.1",
12-
"husky": "^8.0.3",
13-
"lerna": "^7"
11+
"husky": "^9.1.6",
12+
"lerna": "^8"
1413
},
1514
"scripts": {
1615
"prepare": "npm run prepare:husky && npm run prepare:workspace",

packages/plugin/__test__/__snapshots__/test.js.snap

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2185,22 +2185,21 @@ exports[`typescript-preset-env ts-class-anonymous.ts 1`] = `
21852185
"use strict";
21862186
21872187
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2188-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2189-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
2190-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2191-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
2192-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
2188+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
2189+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
2190+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
2191+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
2192+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
21932193
var MyClass = SAPClass.extend("MyClass", {
21942194
createAnonymousClass: function _createAnonymousClass() {
21952195
return new (function () {
21962196
function _class() {
21972197
_classCallCheck(this, _class);
21982198
}
2199-
_createClass(_class, [{
2199+
return _createClass(_class, [{
22002200
key: "getClipboardContentType",
22012201
value: function getClipboardContentType() {}
22022202
}]);
2203-
return _class;
22042203
}())();
22052204
}
22062205
});
@@ -2216,27 +2215,26 @@ sap.ui.define(["sap/Class", "core-js/modules/es6.symbol.js", "core-js/modules/es
22162215
"use strict";
22172216
22182217
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2219-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2220-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
2221-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2222-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
2223-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
2218+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
2219+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
2220+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
2221+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
2222+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
22242223
/**
22252224
* @name MyClass
22262225
*/
22272226
var MyClass = SAPClass.extend("MyClass", {
22282227
createAnonymousClass: function _createAnonymousClass() {
2229-
return new ( /*#__PURE__*/function () {
2228+
return new (/*#__PURE__*/function () {
22302229
function _class() {
22312230
_classCallCheck(this, _class);
22322231
}
2233-
_createClass(_class, [{
2232+
return _createClass(_class, [{
22342233
key: "getClipboardContentType",
22352234
value: function getClipboardContentType() {
22362235
/* ... */
22372236
}
22382237
}]);
2239-
return _class;
22402238
}())();
22412239
}
22422240
});
@@ -2252,27 +2250,26 @@ sap.ui.define(["sap/Class", "core-js/modules/es6.symbol.js", "core-js/modules/es
22522250
"use strict";
22532251
22542252
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2255-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2256-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
2257-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2258-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
2259-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
2253+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
2254+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
2255+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
2256+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
2257+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
22602258
/**
22612259
* @name MyClass
22622260
*/
22632261
var MyClass = SAPClass.extend("MyClass", {
22642262
createAnonymousClass: function _createAnonymousClass() {
2265-
return new ( /*#__PURE__*/function () {
2263+
return new (/*#__PURE__*/function () {
22662264
function _class() {
22672265
_classCallCheck(this, _class);
22682266
}
2269-
_createClass(_class, [{
2267+
return _createClass(_class, [{
22702268
key: "getClipboardContentType",
22712269
value: function getClipboardContentType() {
22722270
/* ... */
22732271
}
22742272
}]);
2275-
return _class;
22762273
}())();
22772274
}
22782275
});

packages/plugin/package.json

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -62,36 +62,38 @@
6262
"ignore-case": "^0.1.0",
6363
"object-assign-defined": "^1.0.2"
6464
},
65+
"peerDependencies": {
66+
"@babel/core": "*"
67+
},
6568
"devDependencies": {
66-
"@babel/cli": "^7.23.4",
67-
"@babel/core": "^7.23.3",
68-
"@babel/eslint-parser": "^7.23.3",
69-
"@babel/plugin-proposal-decorators": "^7.23.3",
69+
"@babel/cli": "^7.25.6",
70+
"@babel/core": "^7.25.2",
71+
"@babel/eslint-parser": "^7.25.1",
72+
"@babel/plugin-proposal-decorators": "^7.24.7",
7073
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
7174
"@babel/plugin-syntax-class-properties": "^7.12.13",
72-
"@babel/plugin-syntax-decorators": "^7.23.3",
75+
"@babel/plugin-syntax-decorators": "^7.24.7",
7376
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
7477
"@babel/plugin-syntax-object-rest-spread": "^7.8.3",
75-
"@babel/plugin-transform-property-mutators": "^7.23.3",
76-
"@babel/plugin-transform-typescript": "^7.23.4",
77-
"@babel/preset-env": "^7.23.3",
78-
"@babel/preset-flow": "^7.23.3",
79-
"@babel/preset-typescript": "^7.23.3",
80-
"babel-eslint": "^10.0.3",
78+
"@babel/plugin-transform-property-mutators": "^7.24.7",
79+
"@babel/plugin-transform-typescript": "^7.25.2",
80+
"@babel/preset-env": "^7.25.4",
81+
"@babel/preset-flow": "^7.24.7",
82+
"@babel/preset-typescript": "^7.24.7",
83+
"babel-eslint": "^10.1.0",
8184
"babel-jest": "^29.7.0",
82-
"core-js": "^3.33.3",
85+
"core-js": "^3.38.1",
8386
"eslint": "^8.54.0",
8487
"eslint-config-standard": "^17.1.0",
85-
"eslint-plugin-import": "^2.29.0",
88+
"eslint-plugin-import": "^2.30.0",
8689
"eslint-plugin-node": "^11.1.0",
87-
"eslint-plugin-prettier": "^5.0.1",
88-
"eslint-plugin-promise": "^6.1.1",
89-
"eslint-plugin-standard": "^4.1.0",
90-
"fs-extra": "^11.1.1",
91-
"husky": "^8.0.3",
90+
"eslint-plugin-prettier": "^5.2.1",
91+
"eslint-plugin-promise": "^7.1.0",
92+
"eslint-plugin-standard": "^5.0.0",
93+
"husky": "^9.1.6",
9294
"jest": "^29.7.0",
93-
"lint-staged": "^15.1.0",
94-
"prettier": "^3.1.0",
95-
"rimraf": "^5.0.5"
95+
"lint-staged": "^15.2.10",
96+
"prettier": "^3.3.3",
97+
"rimraf": "^6.0.1"
9698
}
97-
}
99+
}

packages/plugin/src/modules/visitor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ export const ModuleTransformVisitor = {
296296
}
297297
},
298298

299-
ExportDefaultDeclaration(path, { filename }) {
299+
ExportDefaultDeclaration(path /*, { filename } */) {
300300
const { node } = path;
301301
let { declaration } = node;
302302
const declarationName = ast.getIdName(declaration);

packages/preset/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
"babel-plugin-transform-modules-ui5": "^7.6.2"
1313
},
1414
"devDependencies": {
15-
"@babel/core": "^7.23.3",
16-
"prettier": "^3.1.0"
15+
"prettier": "^3.3.3"
1716
},
1817
"scripts": {
1918
"format": "prettier --write index.js"
@@ -34,4 +33,4 @@
3433
"ts",
3534
"preset"
3635
]
37-
}
36+
}

0 commit comments

Comments
 (0)