From ad33ef266ae0445c422fddd434f8250af2bccf83 Mon Sep 17 00:00:00 2001
From: Ricardo Costa <48949546+ripecosta@users.noreply.github.com>
Date: Tue, 13 Aug 2024 11:30:29 +0100
Subject: [PATCH] chore: update babel-plugin-tester to v11
---
package-lock.json | 94 +--
package.json | 2 +-
test/__snapshots__/icu.macro.spec.js.snap | 933 ++--------------------
test/icu.macro.spec.js | 90 +--
4 files changed, 160 insertions(+), 959 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index e02d393e0..bb62cc43e 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": "^10.1.0",
+ "babel-plugin-tester": "^11.0.4",
"coveralls": "^3.1.1",
"cpy-cli": "^5.0.0",
"cross-env": "^7.0.3",
@@ -3498,6 +3498,8 @@
"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",
@@ -3511,6 +3513,8 @@
"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"
}
@@ -3520,6 +3524,8 @@
"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"
@@ -3530,20 +3536,12 @@
"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",
@@ -3643,12 +3641,6 @@
"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",
@@ -4655,22 +4647,33 @@
}
},
"node_modules/babel-plugin-tester": {
- "version": "10.1.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-tester/-/babel-plugin-tester-10.1.0.tgz",
- "integrity": "sha512-4P2tNaM/Mtg6ytA9YAqmgONnMYqWvdbGDuwRTpIIC9yFZGQrEHoyvDPCx+X1QALAufVb5DKieOPGj5dffiEiNg==",
+ "version": "11.0.4",
+ "resolved": "https://registry.npmjs.org/babel-plugin-tester/-/babel-plugin-tester-11.0.4.tgz",
+ "integrity": "sha512-cqswtpSPo0e++rZB0l/54EG17LL25l9gLgh59yXfnmNxX+2lZTIOpx2zt4YI9QIClVXc8xf63J6yWwKkzy0jNg==",
"dev": true,
"dependencies": {
- "@types/babel-plugin-tester": "^9.0.0",
+ "core-js": "^3.27.2",
+ "debug": "^4.3.4",
"lodash.mergewith": "^4.6.2",
- "prettier": "^2.0.1",
+ "prettier": "^2.8.3",
"strip-indent": "^3.0.0"
},
"engines": {
- "node": ">=10.13",
- "npm": ">=6"
+ "node": "^14.20.0 || ^16.16.0 || >=18.5.0"
},
"peerDependencies": {
- "@babel/core": "^7.11.6"
+ "@babel/core": ">=7.11.6"
+ }
+ },
+ "node_modules/babel-plugin-tester/node_modules/core-js": {
+ "version": "3.38.0",
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.38.0.tgz",
+ "integrity": "sha512-XPpwqEodRljce9KswjZShh95qJ1URisBeKCjUdq27YdenkslVe7OO0ZJhlYXAChW7OhXaRLl8AAba7IBfoIHug==",
+ "dev": true,
+ "hasInstallScript": true,
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/core-js"
}
},
"node_modules/babel-plugin-tester/node_modules/prettier": {
@@ -14483,6 +14486,8 @@
"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",
@@ -14496,6 +14501,8 @@
"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"
}
@@ -14505,6 +14512,8 @@
"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"
@@ -14515,20 +14524,12 @@
"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",
@@ -14621,12 +14622,6 @@
"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",
@@ -15373,17 +15368,24 @@
}
},
"babel-plugin-tester": {
- "version": "10.1.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-tester/-/babel-plugin-tester-10.1.0.tgz",
- "integrity": "sha512-4P2tNaM/Mtg6ytA9YAqmgONnMYqWvdbGDuwRTpIIC9yFZGQrEHoyvDPCx+X1QALAufVb5DKieOPGj5dffiEiNg==",
+ "version": "11.0.4",
+ "resolved": "https://registry.npmjs.org/babel-plugin-tester/-/babel-plugin-tester-11.0.4.tgz",
+ "integrity": "sha512-cqswtpSPo0e++rZB0l/54EG17LL25l9gLgh59yXfnmNxX+2lZTIOpx2zt4YI9QIClVXc8xf63J6yWwKkzy0jNg==",
"dev": true,
"requires": {
- "@types/babel-plugin-tester": "^9.0.0",
+ "core-js": "^3.27.2",
+ "debug": "^4.3.4",
"lodash.mergewith": "^4.6.2",
- "prettier": "^2.0.1",
+ "prettier": "^2.8.3",
"strip-indent": "^3.0.0"
},
"dependencies": {
+ "core-js": {
+ "version": "3.38.0",
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.38.0.tgz",
+ "integrity": "sha512-XPpwqEodRljce9KswjZShh95qJ1URisBeKCjUdq27YdenkslVe7OO0ZJhlYXAChW7OhXaRLl8AAba7IBfoIHug==",
+ "dev": true
+ },
"prettier": {
"version": "2.8.8",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
diff --git a/package.json b/package.json
index 065bfae6e..689a510c1 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": "^10.1.0",
+ "babel-plugin-tester": "^11.0.4",
"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 8b37f89c2..5f6794d58 100644
--- a/test/__snapshots__/icu.macro.spec.js.snap
+++ b/test/__snapshots__/icu.macro.spec.js.snap
@@ -2,9 +2,11 @@
exports[`macros > 1. macros > 1. macros 1`] = `
"
-import { Trans } from '../icu.macro'
+
+import { Trans } from '../../../icu.macro'
const x = Welcome, { name }!
+
↓ ↓ ↓ ↓ ↓ ↓
@@ -18,15 +20,16 @@ const x = (
}}
/>
);
-
"
`;
exports[`macros > 2. macros > 2. macros 1`] = `
"
-import { Trans } from '../icu.macro'
+
+import { Trans } from '../../../icu.macro'
const x = Welcome, { name }!
+
↓ ↓ ↓ ↓ ↓ ↓
@@ -40,16 +43,17 @@ const x = (
}}
/>
);
-
"
`;
exports[`macros > 3. macros > 3. macros 1`] = `
"
-import { Trans } from '../icu.macro'
+
+import { Trans } from '../../../icu.macro'
import { useTranslation } from 'react-i18next'
const x = Trainers: { trainersCount, number }
+
↓ ↓ ↓ ↓ ↓ ↓
@@ -63,15 +67,16 @@ const x = (
}}
/>
);
-
"
`;
exports[`macros > 4. macros > 4. macros 1`] = `
"
-import { Trans } from '../icu.macro'
+
+import { Trans } from '../../../icu.macro'
const x = Trainers: { trainersCount, number }!
+
↓ ↓ ↓ ↓ ↓ ↓
@@ -85,15 +90,16 @@ const x = (
}}
/>
);
-
"
`;
exports[`macros > 5. macros > 5. macros 1`] = `
"
-import { Trans } from '../icu.macro'
+
+import { Trans } from '../../../icu.macro'
const x = Caught on { catchDate, date, short }
+
↓ ↓ ↓ ↓ ↓ ↓
@@ -107,15 +113,16 @@ const x = (
}}
/>
);
-
"
`;
exports[`macros > 6. macros > 6. macros 1`] = `
"
-import { Trans } from '../icu.macro'
+
+import { Trans } from '../../../icu.macro'
const x = Caught on { catchDate, date, short }!
+
↓ ↓ ↓ ↓ ↓ ↓
@@ -129,15 +136,16 @@ const x = (
}}
/>
);
-
"
`;
exports[`macros > 7. macros > 7. macros 1`] = `
"
-import { Trans } from '../icu.macro'
+
+import { Trans } from '../../../icu.macro'
const x =
+
↓ ↓ ↓ ↓ ↓ ↓
@@ -151,15 +159,16 @@ const x = (
}}
/>
);
-
"
`;
exports[`macros > 8. macros > 8. macros 1`] = `
"
-import { Trans } from '../icu.macro'
+
+import { Trans } from '../../../icu.macro'
const x =
+
↓ ↓ ↓ ↓ ↓ ↓
@@ -174,15 +183,16 @@ const x = (
}}
/>
);
-
"
`;
exports[`macros > 9. macros > 9. macros 1`] = `
"
-import { Trans } from '../icu.macro'
+
+import { Trans } from '../../../icu.macro'
const x =
+
↓ ↓ ↓ ↓ ↓ ↓
@@ -197,15 +207,16 @@ const x = (
}}
/>
);
-
"
`;
exports[`macros > 10. macros > 10. macros 1`] = `
"
-import { Trans } from '../icu.macro'
+
+import { Trans } from '../../../icu.macro'
const x =
+
↓ ↓ ↓ ↓ ↓ ↓
@@ -219,16 +230,17 @@ const x = (
}}
/>
);
-
"
`;
exports[`macros > 11. macros > 11. macros 1`] = `
"
-import { Trans } from '../icu.macro'
+
+import { Trans } from '../../../icu.macro'
const Link = ({to, children}) => ({children})
const x = This should be overridden by defaults
+
↓ ↓ ↓ ↓ ↓ ↓
@@ -243,15 +255,16 @@ const x = (
components={[{catchDate}]}
/>
);
-
"
`;
exports[`macros > 12. macros > 12. macros 1`] = `
"
-import { Trans } from '../icu.macro'
+
+import { Trans } from '../../../icu.macro'
const x =
+
↓ ↓ ↓ ↓ ↓ ↓
@@ -266,13 +279,13 @@ const x = (
components={[]}
/>
);
-
"
`;
exports[`macros > 13. macros > 13. macros 1`] = `
"
-import { Select } from '../icu.macro'
+
+import { Select } from '../../../icu.macro'
const x =
+
↓ ↓ ↓ ↓ ↓ ↓
@@ -295,13 +309,13 @@ const x = (
}}
/>
);
-
"
`;
exports[`macros > 14. macros > 14. macros 1`] = `
"
-import { Select } from '../icu.macro'
+
+import { Select } from '../../../icu.macro'
const x =