From ab37925b0533a5751b427e1f9498426bd845f7c1 Mon Sep 17 00:00:00 2001
From: Ricardo Costa <48949546+ripecosta@users.noreply.github.com>
Date: Mon, 12 Aug 2024 23:15:01 +0100
Subject: [PATCH 1/2] chore: update babel-plugin-tester to v10
---
package-lock.json | 93 +-
package.json | 2 +-
test/__snapshots__/icu.macro.spec.js.snap | 1376 ++++++++++++++++++---
3 files changed, 1289 insertions(+), 182 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index dffbb6a9e..8d324261e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -38,7 +38,7 @@
"all-contributors-cli": "^6.26.1",
"babel-core": "^7.0.0-bridge.0",
"babel-plugin-macros": "^3.1.0",
- "babel-plugin-tester": "^7.0.4",
+ "babel-plugin-tester": "^10.1.0",
"coveralls": "^3.1.1",
"cpy-cli": "^5.0.0",
"cross-env": "^7.0.3",
@@ -3509,8 +3509,6 @@
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",
"integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==",
"dev": true,
- "optional": true,
- "peer": true,
"dependencies": {
"@babel/parser": "^7.20.7",
"@babel/types": "^7.20.7",
@@ -3524,8 +3522,6 @@
"resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz",
"integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==",
"dev": true,
- "optional": true,
- "peer": true,
"dependencies": {
"@babel/types": "^7.0.0"
}
@@ -3535,8 +3531,6 @@
"resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz",
"integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==",
"dev": true,
- "optional": true,
- "peer": true,
"dependencies": {
"@babel/parser": "^7.1.0",
"@babel/types": "^7.0.0"
@@ -3547,12 +3541,20 @@
"resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.4.tgz",
"integrity": "sha512-mSM/iKUk5fDDrEV/e83qY+Cr3I1+Q3qqTuEn++HAWYjEa1+NxZr6CNrcJGf2ZTnq4HoFGC3zaTPZTobCzCFukA==",
"dev": true,
- "optional": true,
- "peer": true,
"dependencies": {
"@babel/types": "^7.20.7"
}
},
+ "node_modules/@types/babel-plugin-tester": {
+ "version": "9.0.10",
+ "resolved": "https://registry.npmjs.org/@types/babel-plugin-tester/-/babel-plugin-tester-9.0.10.tgz",
+ "integrity": "sha512-X+n3nZb8qIZ3a07qt7B5ONfptAZJ6nWLgU5I4U+gm0dRgtcjL+73P2tUkQAJ/iIbRF72BlW/2of5J0qbjlmsBw==",
+ "dev": true,
+ "dependencies": {
+ "@types/babel__core": "*",
+ "@types/prettier": "^2.0.0"
+ }
+ },
"node_modules/@types/estree": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
@@ -3652,6 +3654,12 @@
"integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==",
"dev": true
},
+ "node_modules/@types/prettier": {
+ "version": "2.7.3",
+ "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz",
+ "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==",
+ "dev": true
+ },
"node_modules/@types/prop-types": {
"version": "15.7.11",
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz",
@@ -4682,20 +4690,37 @@
}
},
"node_modules/babel-plugin-tester": {
- "version": "7.0.4",
- "resolved": "https://registry.npmjs.org/babel-plugin-tester/-/babel-plugin-tester-7.0.4.tgz",
- "integrity": "sha512-ZKhOa0aaaPNQVOZjxJ4svy8lIKjHswzCNxv3WROmirlFz+5IM22hzNg+p4MGC/C3Tv3sX5JfYSKJIcUE9aPdsA==",
+ "version": "10.1.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-tester/-/babel-plugin-tester-10.1.0.tgz",
+ "integrity": "sha512-4P2tNaM/Mtg6ytA9YAqmgONnMYqWvdbGDuwRTpIIC9yFZGQrEHoyvDPCx+X1QALAufVb5DKieOPGj5dffiEiNg==",
"dev": true,
"dependencies": {
+ "@types/babel-plugin-tester": "^9.0.0",
"lodash.mergewith": "^4.6.2",
+ "prettier": "^2.0.1",
"strip-indent": "^3.0.0"
},
"engines": {
- "node": ">=8",
+ "node": ">=10.13",
"npm": ">=6"
},
"peerDependencies": {
- "@babel/core": "^7.7.2"
+ "@babel/core": "^7.11.6"
+ }
+ },
+ "node_modules/babel-plugin-tester/node_modules/prettier": {
+ "version": "2.8.8",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
+ "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
+ "dev": true,
+ "bin": {
+ "prettier": "bin-prettier.js"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ },
+ "funding": {
+ "url": "https://github.com/prettier/prettier?sponsor=1"
}
},
"node_modules/balanced-match": {
@@ -14499,8 +14524,6 @@
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",
"integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==",
"dev": true,
- "optional": true,
- "peer": true,
"requires": {
"@babel/parser": "^7.20.7",
"@babel/types": "^7.20.7",
@@ -14514,8 +14537,6 @@
"resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz",
"integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==",
"dev": true,
- "optional": true,
- "peer": true,
"requires": {
"@babel/types": "^7.0.0"
}
@@ -14525,8 +14546,6 @@
"resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz",
"integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==",
"dev": true,
- "optional": true,
- "peer": true,
"requires": {
"@babel/parser": "^7.1.0",
"@babel/types": "^7.0.0"
@@ -14537,12 +14556,20 @@
"resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.4.tgz",
"integrity": "sha512-mSM/iKUk5fDDrEV/e83qY+Cr3I1+Q3qqTuEn++HAWYjEa1+NxZr6CNrcJGf2ZTnq4HoFGC3zaTPZTobCzCFukA==",
"dev": true,
- "optional": true,
- "peer": true,
"requires": {
"@babel/types": "^7.20.7"
}
},
+ "@types/babel-plugin-tester": {
+ "version": "9.0.10",
+ "resolved": "https://registry.npmjs.org/@types/babel-plugin-tester/-/babel-plugin-tester-9.0.10.tgz",
+ "integrity": "sha512-X+n3nZb8qIZ3a07qt7B5ONfptAZJ6nWLgU5I4U+gm0dRgtcjL+73P2tUkQAJ/iIbRF72BlW/2of5J0qbjlmsBw==",
+ "dev": true,
+ "requires": {
+ "@types/babel__core": "*",
+ "@types/prettier": "^2.0.0"
+ }
+ },
"@types/estree": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
@@ -14635,6 +14662,12 @@
"integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==",
"dev": true
},
+ "@types/prettier": {
+ "version": "2.7.3",
+ "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz",
+ "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==",
+ "dev": true
+ },
"@types/prop-types": {
"version": "15.7.11",
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz",
@@ -15407,13 +15440,23 @@
}
},
"babel-plugin-tester": {
- "version": "7.0.4",
- "resolved": "https://registry.npmjs.org/babel-plugin-tester/-/babel-plugin-tester-7.0.4.tgz",
- "integrity": "sha512-ZKhOa0aaaPNQVOZjxJ4svy8lIKjHswzCNxv3WROmirlFz+5IM22hzNg+p4MGC/C3Tv3sX5JfYSKJIcUE9aPdsA==",
+ "version": "10.1.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-tester/-/babel-plugin-tester-10.1.0.tgz",
+ "integrity": "sha512-4P2tNaM/Mtg6ytA9YAqmgONnMYqWvdbGDuwRTpIIC9yFZGQrEHoyvDPCx+X1QALAufVb5DKieOPGj5dffiEiNg==",
"dev": true,
"requires": {
+ "@types/babel-plugin-tester": "^9.0.0",
"lodash.mergewith": "^4.6.2",
+ "prettier": "^2.0.1",
"strip-indent": "^3.0.0"
+ },
+ "dependencies": {
+ "prettier": {
+ "version": "2.8.8",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
+ "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
+ "dev": true
+ }
}
},
"balanced-match": {
diff --git a/package.json b/package.json
index fbd00f390..12f19f377 100644
--- a/package.json
+++ b/package.json
@@ -93,7 +93,7 @@
"all-contributors-cli": "^6.26.1",
"babel-core": "^7.0.0-bridge.0",
"babel-plugin-macros": "^3.1.0",
- "babel-plugin-tester": "^7.0.4",
+ "babel-plugin-tester": "^10.1.0",
"coveralls": "^3.1.1",
"cpy-cli": "^5.0.0",
"cross-env": "^7.0.3",
diff --git a/test/__snapshots__/icu.macro.spec.js.snap b/test/__snapshots__/icu.macro.spec.js.snap
index 424e6dfa9..8b37f89c2 100644
--- a/test/__snapshots__/icu.macro.spec.js.snap
+++ b/test/__snapshots__/icu.macro.spec.js.snap
@@ -8,10 +8,17 @@ const x = Welcome, { name }!
↓ ↓ ↓ ↓ ↓ ↓
-import { Trans } from "react-i18next";
-const x = ;
+import { Trans } from 'react-i18next';
+const x = (
+
+);
+
"
`;
@@ -23,10 +30,17 @@ const x = Welcome, { name }!
↓ ↓ ↓ ↓ ↓ ↓
-import { Trans } from "react-i18next";
-const x = {name}]} values={{
- name
-}} />;
+import { Trans } from 'react-i18next';
+const x = (
+ {name}]}
+ values={{
+ name,
+ }}
+ />
+);
+
"
`;
@@ -40,9 +54,16 @@ const x = Trainers: { trainersCount, number }
↓ ↓ ↓ ↓ ↓ ↓
import { useTranslation, Trans } from 'react-i18next';
-const x = ;
+const x = (
+
+);
+
"
`;
@@ -54,10 +75,17 @@ const x = Trainers: { trainersCount, number }!
↓ ↓ ↓ ↓ ↓ ↓
-import { Trans } from "react-i18next";
-const x = {(trainersCount)}]} values={{
- trainersCount
-}} />;
+import { Trans } from 'react-i18next';
+const x = (
+ {trainersCount}]}
+ values={{
+ trainersCount,
+ }}
+ />
+);
+
"
`;
@@ -69,10 +97,17 @@ const x = Caught on { catchDate, date, short }
↓ ↓ ↓ ↓ ↓ ↓
-import { Trans } from "react-i18next";
-const x = ;
+import { Trans } from 'react-i18next';
+const x = (
+
+);
+
"
`;
@@ -84,10 +119,17 @@ const x = Caught on { catchDate, date, short }!
↓ ↓ ↓ ↓ ↓ ↓
-import { Trans } from "react-i18next";
-const x = {(catchDate)}]} values={{
- catchDate
-}} />;
+import { Trans } from 'react-i18next';
+const x = (
+ {catchDate}]}
+ values={{
+ catchDate,
+ }}
+ />
+);
+
"
`;
@@ -99,10 +141,17 @@ const x =
↓ ↓ ↓ ↓ ↓ ↓
-import { Trans } from "react-i18next";
-const x = ;
+import { Trans } from 'react-i18next';
+const x = (
+
+);
+
"
`;
@@ -114,10 +163,18 @@ const x = {(trainersCount)}]} values={{
- trainersCount
-}} />;
+import { Trans } from 'react-i18next';
+const x = (
+ {trainersCount}]}
+ values={{
+ trainersCount,
+ }}
+ />
+);
+
"
`;
@@ -129,10 +186,18 @@ const x = ;
+import { Trans } from 'react-i18next';
+const x = (
+
+);
+
"
`;
@@ -144,10 +209,17 @@ const x = {(catchDate)}]} values={{
- catchDate
-}} />;
+import { Trans } from 'react-i18next';
+const x = (
+ {catchDate}]}
+ values={{
+ catchDate,
+ }}
+ />
+);
+
"
`;
@@ -160,14 +232,18 @@ const x = {children};
-const x = {(catchDate)}]} />;
+import { Trans } from 'react-i18next';
+const Link = ({ to, children }) => {children};
+const x = (
+ {catchDate}]}
+ />
+);
+
"
`;
@@ -179,10 +255,18 @@ const x = ;
+import { Trans } from 'react-i18next';
+const x = (
+
+);
+
"
`;
@@ -200,10 +284,18 @@ const x = ;
+import { Trans } from 'react-i18next';
+const x = (
+
+);
+
"
`;
@@ -220,10 +312,17 @@ const x =