Skip to content

Commit

Permalink
Bump babel deps (#15187)
Browse files Browse the repository at this point in the history
* bump "@babel/*" deps

* bump core-js

* bump @babel/core

* update eslint-plugin-jest and glob

* update Makefile.js

* fix linting errors

* remove obsolete snapshots

* use inline snapshot
  • Loading branch information
JLHwung committed Nov 12, 2022
1 parent 5fde28b commit 5f19f62
Show file tree
Hide file tree
Showing 38 changed files with 442 additions and 389 deletions.
2 changes: 1 addition & 1 deletion Makefile.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@
"packageManager": "yarn@3.2.4",
"devDependencies": {
"@babel/cli": "^7.19.3",
"@babel/core": "^7.19.6",
"@babel/core": "^7.20.2",
"@babel/eslint-config-internal": "workspace:^",
"@babel/eslint-parser": "workspace:^",
"@babel/eslint-plugin-development": "workspace:^",
"@babel/eslint-plugin-development-internal": "workspace:^",
"@babel/plugin-proposal-dynamic-import": "^7.18.6",
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@babel/plugin-proposal-object-rest-spread": "^7.18.9",
"@babel/plugin-proposal-object-rest-spread": "^7.20.2",
"@babel/plugin-transform-modules-commonjs": "^7.19.6",
"@babel/plugin-transform-runtime": "^7.19.6",
"@babel/preset-env": "^7.19.4",
"@babel/preset-env": "^7.20.2",
"@babel/preset-typescript": "^7.18.6",
"@babel/runtime": "^7.20.0",
"@rollup/plugin-babel": "^5.3.1",
Expand All @@ -45,15 +45,15 @@
"c8": "^7.12.0",
"chalk": "^5.0.0",
"charcodes": "^0.2.0",
"core-js": "^3.25.1",
"core-js": "^3.26.0",
"eslint": "^8.22.0",
"eslint-formatter-codeframe": "^7.32.1",
"eslint-import-resolver-node": "^0.3.6",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^26.6.0",
"eslint-plugin-jest": "^27.1.5",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.2.1",
"glob": "^7.2.0",
"glob": "^8.0.3",
"gulp": "^4.0.2",
"gulp-filter": "^7.0.0",
"gulp-plumber": "^1.2.1",
Expand Down
2 changes: 2 additions & 0 deletions packages/babel-core/test/errors-stacks.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ function expectError(run) {
);
}

// expectError is a customized expect wrapper
// eslint-disable-next-line jest/valid-expect
return expect(stack);
}
throw new Error("It should have thrown an error.");
Expand Down
6 changes: 3 additions & 3 deletions packages/babel-helper-builder-react-jsx/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe("@babel/helper-builder-react-jsx", () => {
plugins: [plugin],
parserOpts: { plugins: ["jsx"] },
});
expect(fn).toBeCalledTimes(1);
expect(fn).toHaveBeenCalledTimes(1);
});

it("shuold pass pre with plugin pass", () => {
Expand All @@ -46,7 +46,7 @@ describe("@babel/helper-builder-react-jsx", () => {
plugins: [plugin],
parserOpts: { plugins: ["jsx"] },
});
expect(fn).toBeCalledTimes(1);
expect(fn).toHaveBeenCalledTimes(1);
});

it("shuold pass filter with plugin pass", () => {
Expand All @@ -67,6 +67,6 @@ describe("@babel/helper-builder-react-jsx", () => {
plugins: [plugin],
parserOpts: { plugins: ["jsx"] },
});
expect(fn).toBeCalledTimes(1);
expect(fn).toHaveBeenCalledTimes(1);
});
});
2 changes: 1 addition & 1 deletion packages/babel-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"dependencies": {
"@babel/register": "workspace:^",
"commander": "^4.0.1",
"core-js": "^3.25.1",
"core-js": "^3.26.0",
"node-environment-flags": "^1.0.5",
"regenerator-runtime": "^0.13.10",
"v8flags": "^3.1.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ expect((new class { [foo] = 0 }).foo).toBe(0);

const arrayLike = { [Symbol.toPrimitive] : () => [] };

expect(() => class { static [arrayLike] = 0 }).toThrowError("@@toPrimitive must return a primitive value.");
expect(() => class { static [arrayLike](){ return 0; } }).toThrowError("@@toPrimitive must return a primitive value.");
expect(() => class { static get [arrayLike](){ return 0; } }).toThrowError("@@toPrimitive must return a primitive value.");
expect(() => class { static set [arrayLike](v){ return v; } }).toThrowError("@@toPrimitive must return a primitive value.");
expect(() => class { static [arrayLike] = 0 }).toThrow("@@toPrimitive must return a primitive value.");
expect(() => class { static [arrayLike](){ return 0; } }).toThrow("@@toPrimitive must return a primitive value.");
expect(() => class { static get [arrayLike](){ return 0; } }).toThrow("@@toPrimitive must return a primitive value.");
expect(() => class { static set [arrayLike](v){ return v; } }).toThrow("@@toPrimitive must return a primitive value.");

expect(() => new class { [arrayLike] = 0 }).toThrowError("@@toPrimitive must return a primitive value.");
expect(() => new class { [arrayLike] = 0 }).toThrow("@@toPrimitive must return a primitive value.");
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ expect((new class { [foo] = 0 }).foo).toBe(0);

const arrayLike = { [Symbol.toPrimitive] : () => [] };

expect(() => class { static [arrayLike] = 0 }).toThrowError("@@toPrimitive must return a primitive value.");
expect(() => class { static [arrayLike](){ return 0; } }).toThrowError("@@toPrimitive must return a primitive value.");
expect(() => class { static get [arrayLike](){ return 0; } }).toThrowError("@@toPrimitive must return a primitive value.");
expect(() => class { static set [arrayLike](v){ return v; } }).toThrowError("@@toPrimitive must return a primitive value.");
expect(() => class { static [arrayLike] = 0 }).toThrow("@@toPrimitive must return a primitive value.");
expect(() => class { static [arrayLike](){ return 0; } }).toThrow("@@toPrimitive must return a primitive value.");
expect(() => class { static get [arrayLike](){ return 0; } }).toThrow("@@toPrimitive must return a primitive value.");
expect(() => class { static set [arrayLike](v){ return v; } }).toThrow("@@toPrimitive must return a primitive value.");

expect(() => new class { [arrayLike] = 0 }).toThrowError("@@toPrimitive must return a primitive value.");
expect(() => new class { [arrayLike] = 0 }).toThrow("@@toPrimitive must return a primitive value.");
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ expect(() => {

babelHelpers.classCallCheck(this, _class7);
}), babelHelpers.defineProperty(_class7, arrayLike, 0), _class7;
}).toThrowError("@@toPrimitive must return a primitive value.");
}).toThrow("@@toPrimitive must return a primitive value.");
expect(() => /*#__PURE__*/function () {
"use strict";

Expand All @@ -82,7 +82,7 @@ expect(() => /*#__PURE__*/function () {
}
}]);
return _class8;
}()).toThrowError("@@toPrimitive must return a primitive value.");
}()).toThrow("@@toPrimitive must return a primitive value.");
expect(() => /*#__PURE__*/function () {
"use strict";

Expand All @@ -96,7 +96,7 @@ expect(() => /*#__PURE__*/function () {
}
}]);
return _class9;
}()).toThrowError("@@toPrimitive must return a primitive value.");
}()).toThrow("@@toPrimitive must return a primitive value.");
expect(() => /*#__PURE__*/function () {
"use strict";

Expand All @@ -110,7 +110,7 @@ expect(() => /*#__PURE__*/function () {
}
}]);
return _class10;
}()).toThrowError("@@toPrimitive must return a primitive value.");
}()).toThrow("@@toPrimitive must return a primitive value.");
expect(() => new ( /*#__PURE__*/function () {
"use strict";

Expand All @@ -119,4 +119,4 @@ expect(() => new ( /*#__PURE__*/function () {
babelHelpers.defineProperty(this, arrayLike, 0);
}
return babelHelpers.createClass(_class12);
}())()).toThrowError("@@toPrimitive must return a primitive value.");
}())()).toThrow("@@toPrimitive must return a primitive value.");
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"devDependencies": {
"@babel/core": "workspace:^",
"@babel/helper-plugin-test-runner": "workspace:^",
"core-js": "^3.25.1"
"core-js": "^3.26.0"
},
"engines": {
"node": ">=6.9.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
expect(() => class { static #p = #p in 0 }).toThrowError(`right-hand side of 'in' should be an object, got number`);
expect(() => class { static #p = #p in "" }).toThrowError(`right-hand side of 'in' should be an object, got string`);
expect(() => class { static #p = #p in true }).toThrowError(`right-hand side of 'in' should be an object, got boolean`);
expect(() => class { static #p = #p in void 0 }).toThrowError(`right-hand side of 'in' should be an object, got undefined`);
expect(() => class { static #p = #p in null }).toThrowError(`right-hand side of 'in' should be an object, got null`);
expect(() => class { static #p = #p in Symbol.iterator }).toThrowError(`right-hand side of 'in' should be an object, got symbol`);
expect(() => class { static #p = #p in 0n }).toThrowError(`right-hand side of 'in' should be an object, got bigint`);
expect(() => class { static #p = #p in 0 }).toThrow(`right-hand side of 'in' should be an object, got number`);
expect(() => class { static #p = #p in "" }).toThrow(`right-hand side of 'in' should be an object, got string`);
expect(() => class { static #p = #p in true }).toThrow(`right-hand side of 'in' should be an object, got boolean`);
expect(() => class { static #p = #p in void 0 }).toThrow(`right-hand side of 'in' should be an object, got undefined`);
expect(() => class { static #p = #p in null }).toThrow(`right-hand side of 'in' should be an object, got null`);
expect(() => class { static #p = #p in Symbol.iterator }).toThrow(`right-hand side of 'in' should be an object, got symbol`);
expect(() => class { static #p = #p in 0n }).toThrow(`right-hand side of 'in' should be an object, got bigint`);

expect(() => class { static #p() {}; static q = #p in 0 }).toThrowError(`right-hand side of 'in' should be an object, got number`);
expect(() => class { static #p() {}; static q = #p in "" }).toThrowError(`right-hand side of 'in' should be an object, got string`);
expect(() => class { static #p() {}; static q = #p in true }).toThrowError(`right-hand side of 'in' should be an object, got boolean`);
expect(() => class { static #p() {}; static q = #p in void 0 }).toThrowError(`right-hand side of 'in' should be an object, got undefined`);
expect(() => class { static #p() {}; static q = #p in null }).toThrowError(`right-hand side of 'in' should be an object, got null`);
expect(() => class { static #p() {}; static q = #p in Symbol.iterator }).toThrowError(`right-hand side of 'in' should be an object, got symbol`);
expect(() => class { static #p() {}; static q = #p in 0n }).toThrowError(`right-hand side of 'in' should be an object, got bigint`);
expect(() => class { static #p() {}; static q = #p in 0 }).toThrow(`right-hand side of 'in' should be an object, got number`);
expect(() => class { static #p() {}; static q = #p in "" }).toThrow(`right-hand side of 'in' should be an object, got string`);
expect(() => class { static #p() {}; static q = #p in true }).toThrow(`right-hand side of 'in' should be an object, got boolean`);
expect(() => class { static #p() {}; static q = #p in void 0 }).toThrow(`right-hand side of 'in' should be an object, got undefined`);
expect(() => class { static #p() {}; static q = #p in null }).toThrow(`right-hand side of 'in' should be an object, got null`);
expect(() => class { static #p() {}; static q = #p in Symbol.iterator }).toThrow(`right-hand side of 'in' should be an object, got symbol`);
expect(() => class { static #p() {}; static q = #p in 0n }).toThrow(`right-hand side of 'in' should be an object, got bigint`);

expect(() => new class { #p = #p in 0 }).toThrowError(`right-hand side of 'in' should be an object, got number`);
expect(() => new class { #p = #p in "" }).toThrowError(`right-hand side of 'in' should be an object, got string`);
expect(() => new class { #p = #p in true }).toThrowError(`right-hand side of 'in' should be an object, got boolean`);
expect(() => new class { #p = #p in void 0 }).toThrowError(`right-hand side of 'in' should be an object, got undefined`);
expect(() => new class { #p = #p in null }).toThrowError(`right-hand side of 'in' should be an object, got null`);
expect(() => new class { #p = #p in Symbol.iterator }).toThrowError(`right-hand side of 'in' should be an object, got symbol`);
expect(() => new class { #p = #p in 0n }).toThrowError(`right-hand side of 'in' should be an object, got bigint`);
expect(() => new class { #p = #p in 0 }).toThrow(`right-hand side of 'in' should be an object, got number`);
expect(() => new class { #p = #p in "" }).toThrow(`right-hand side of 'in' should be an object, got string`);
expect(() => new class { #p = #p in true }).toThrow(`right-hand side of 'in' should be an object, got boolean`);
expect(() => new class { #p = #p in void 0 }).toThrow(`right-hand side of 'in' should be an object, got undefined`);
expect(() => new class { #p = #p in null }).toThrow(`right-hand side of 'in' should be an object, got null`);
expect(() => new class { #p = #p in Symbol.iterator }).toThrow(`right-hand side of 'in' should be an object, got symbol`);
expect(() => new class { #p = #p in 0n }).toThrow(`right-hand side of 'in' should be an object, got bigint`);

expect(() => new class { #p() {}; q = #p in 0 }).toThrowError(`right-hand side of 'in' should be an object, got number`);
expect(() => new class { #p() {}; q = #p in "" }).toThrowError(`right-hand side of 'in' should be an object, got string`);
expect(() => new class { #p() {}; q = #p in true }).toThrowError(`right-hand side of 'in' should be an object, got boolean`);
expect(() => new class { #p() {}; q = #p in void 0 }).toThrowError(`right-hand side of 'in' should be an object, got undefined`);
expect(() => new class { #p() {}; q = #p in null }).toThrowError(`right-hand side of 'in' should be an object, got null`);
expect(() => new class { #p() {}; q = #p in Symbol.iterator }).toThrowError(`right-hand side of 'in' should be an object, got symbol`);
expect(() => new class { #p() {}; q = #p in 0n }).toThrowError(`right-hand side of 'in' should be an object, got bigint`);
expect(() => new class { #p() {}; q = #p in 0 }).toThrow(`right-hand side of 'in' should be an object, got number`);
expect(() => new class { #p() {}; q = #p in "" }).toThrow(`right-hand side of 'in' should be an object, got string`);
expect(() => new class { #p() {}; q = #p in true }).toThrow(`right-hand side of 'in' should be an object, got boolean`);
expect(() => new class { #p() {}; q = #p in void 0 }).toThrow(`right-hand side of 'in' should be an object, got undefined`);
expect(() => new class { #p() {}; q = #p in null }).toThrow(`right-hand side of 'in' should be an object, got null`);
expect(() => new class { #p() {}; q = #p in Symbol.iterator }).toThrow(`right-hand side of 'in' should be an object, got symbol`);
expect(() => new class { #p() {}; q = #p in 0n }).toThrow(`right-hand side of 'in' should be an object, got bigint`);
Loading

0 comments on commit 5f19f62

Please sign in to comment.