Skip to content

Commit 5d2ba99

Browse files
committed
feature: @putout/plugin-putout: drop support of 🐊 < 41
1 parent 82ea381 commit 5d2ba99

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

packages/plugin-putout/lib/apply-fixture-name-to-message/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ const check = ({__a}, path) => {
7373
if (name.includes(')'))
7474
return false;
7575

76-
const encodedName = encode(name);
76+
const safeName = RegExp.escape(name);
7777

78-
const regEnd = RegExp(`: ${encodedName}$`);
79-
const regMiddle = RegExp(`: ${encodedName}: .*`);
78+
const regEnd = RegExp(`: ${safeName}$`);
79+
const regMiddle = RegExp(`: ${safeName}: .*`);
8080

8181
return !regEnd.test(value) && !regMiddle.test(value);
8282
};
@@ -117,4 +117,3 @@ const getTestNodeArgument = (path) => {
117117
return first;
118118
};
119119

120-
const encode = (a) => a.replaceAll('+', '\\+');

packages/plugin-putout/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"supertape": "^11.0.3"
5959
},
6060
"peerDependencies": {
61-
"putout": ">=40"
61+
"putout": ">=41"
6262
},
6363
"license": "MIT",
6464
"engines": {

0 commit comments

Comments
 (0)