@putout/test 13.2.1 → 13.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/fixture.js +3 -0
- package/lib/test.js +6 -6
- package/package.json +2 -2
package/lib/fixture.js
CHANGED
|
@@ -17,6 +17,7 @@ module.exports.readFixture = (name, extension) => {
|
|
|
17
17
|
return [
|
|
18
18
|
dataTS,
|
|
19
19
|
TS.ENABLED,
|
|
20
|
+
'ts',
|
|
20
21
|
];
|
|
21
22
|
|
|
22
23
|
const [eJS, dataJS] = tryCatch(readFileSync, `${name}.js`, 'utf8');
|
|
@@ -25,6 +26,7 @@ module.exports.readFixture = (name, extension) => {
|
|
|
25
26
|
return [
|
|
26
27
|
dataJS,
|
|
27
28
|
TS.DISABLED,
|
|
29
|
+
'js',
|
|
28
30
|
];
|
|
29
31
|
|
|
30
32
|
if (extension) {
|
|
@@ -34,6 +36,7 @@ module.exports.readFixture = (name, extension) => {
|
|
|
34
36
|
return [
|
|
35
37
|
data,
|
|
36
38
|
TS.DISABLED,
|
|
39
|
+
extension,
|
|
37
40
|
];
|
|
38
41
|
}
|
|
39
42
|
|
package/lib/test.js
CHANGED
|
@@ -300,7 +300,7 @@ const transform = currify((dir, linterOptions, options, t, name, transformed = n
|
|
|
300
300
|
const {plugins} = options;
|
|
301
301
|
const full = join(dir, name);
|
|
302
302
|
const isStr = isString(transformed);
|
|
303
|
-
const [input, isTS] = readFixture(full, extension);
|
|
303
|
+
const [input, isTS, currentExtension] = readFixture(full, extension);
|
|
304
304
|
|
|
305
305
|
if (!isStr)
|
|
306
306
|
addons = transformed;
|
|
@@ -323,7 +323,7 @@ const transform = currify((dir, linterOptions, options, t, name, transformed = n
|
|
|
323
323
|
writeFixture({
|
|
324
324
|
full,
|
|
325
325
|
code,
|
|
326
|
-
extension,
|
|
326
|
+
extension: currentExtension,
|
|
327
327
|
});
|
|
328
328
|
return t.pass('fixed fixture updated');
|
|
329
329
|
}
|
|
@@ -337,7 +337,7 @@ const transformWithOptions = currify((dir, linterOptions, options, t, name, plug
|
|
|
337
337
|
const {lint, extension} = linterOptions;
|
|
338
338
|
|
|
339
339
|
const full = join(dir, name);
|
|
340
|
-
const [input, isTS] = readFixture(full, extension);
|
|
340
|
+
const [input, isTS, currentExtension] = readFixture(full, extension);
|
|
341
341
|
|
|
342
342
|
const rule = parseRule(options);
|
|
343
343
|
|
|
@@ -355,7 +355,7 @@ const transformWithOptions = currify((dir, linterOptions, options, t, name, plug
|
|
|
355
355
|
writeFixture({
|
|
356
356
|
full,
|
|
357
357
|
code,
|
|
358
|
-
extension,
|
|
358
|
+
extension: currentExtension,
|
|
359
359
|
});
|
|
360
360
|
return t.pass('fixed fixture updated');
|
|
361
361
|
}
|
|
@@ -374,7 +374,7 @@ const parseRule = ({plugins}) => {
|
|
|
374
374
|
const noTransformWithOptions = currify((dir, linterOptions, options, t, name, ruleOptions) => {
|
|
375
375
|
const {lint, extension} = linterOptions;
|
|
376
376
|
const full = join(dir, name);
|
|
377
|
-
const [input, isTS] = readFixture(full, extension);
|
|
377
|
+
const [input, isTS, currentExtension] = readFixture(full, extension);
|
|
378
378
|
|
|
379
379
|
rmFixture(`${full}-fix`);
|
|
380
380
|
|
|
@@ -393,7 +393,7 @@ const noTransformWithOptions = currify((dir, linterOptions, options, t, name, ru
|
|
|
393
393
|
writeFixture({
|
|
394
394
|
full,
|
|
395
395
|
code,
|
|
396
|
-
extension,
|
|
396
|
+
extension: currentExtension,
|
|
397
397
|
});
|
|
398
398
|
|
|
399
399
|
return t.pass('source fixture updated');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/test",
|
|
3
|
-
"version": "13.2.
|
|
3
|
+
"version": "13.2.2",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "Test runner for 🐊Putout plugins ",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@putout/plugin-putout": "*",
|
|
67
67
|
"@putout/plugin-remove-console": "*",
|
|
68
68
|
"@putout/plugin-remove-unused-variables": "*",
|
|
69
|
-
"@putout/processor-wasm": "
|
|
69
|
+
"@putout/processor-wasm": "*",
|
|
70
70
|
"c8": "^10.0.0",
|
|
71
71
|
"eslint": "^9.0.0",
|
|
72
72
|
"eslint-plugin-n": "^17.0.0",
|