miniread 1.40.0 → 1.41.0
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/dist/scripts/evaluate/compute-transform-changed-lines.d.ts +10 -0
- package/dist/scripts/evaluate/compute-transform-changed-lines.js +21 -0
- package/dist/scripts/evaluate/evaluation-types.d.ts +2 -0
- package/dist/scripts/evaluate/format-transformation-outputs.d.ts +11 -0
- package/dist/scripts/evaluate/format-transformation-outputs.js +30 -0
- package/dist/scripts/evaluate/pair-evaluator.js +23 -27
- package/dist/scripts/evaluate/run-check-mode.js +2 -0
- package/dist/scripts/evaluate/run-evaluate-cli.js +1 -0
- package/dist/scripts/evaluate/shell-utilities.js +16 -10
- package/dist/scripts/evaluate/transform-manifest.d.ts +2 -0
- package/dist/scripts/evaluate/transform-manifest.js +14 -2
- package/dist/transforms/_generated/manifest.d.ts +2 -1
- package/dist/transforms/_generated/manifest.js +102 -48
- package/dist/transforms/expand-boolean-literals/manifest.json +3 -2
- package/dist/transforms/expand-sequence-expressions-v4/manifest.json +4 -3
- package/dist/transforms/expand-sequence-expressions-v5/manifest.json +4 -2
- package/dist/transforms/expand-special-number-literals/manifest.json +3 -2
- package/dist/transforms/expand-undefined-literals/manifest.json +3 -2
- package/dist/transforms/remove-redundant-else/manifest.json +3 -2
- package/dist/transforms/rename-arguments-length-flags/manifest.json +3 -2
- package/dist/transforms/rename-asap-wrappers/manifest.json +3 -2
- package/dist/transforms/rename-awaiter-parameters/manifest.json +3 -2
- package/dist/transforms/rename-buffer-variables/manifest.json +4 -3
- package/dist/transforms/rename-catch-parameters/manifest.json +4 -3
- package/dist/transforms/rename-char-code-at/manifest.json +3 -2
- package/dist/transforms/rename-charcode-variables/manifest.json +3 -2
- package/dist/transforms/rename-charcode-variables-v2/manifest.json +3 -2
- package/dist/transforms/rename-client-aliases/manifest.json +3 -2
- package/dist/transforms/rename-comparison-flags/manifest.json +3 -2
- package/dist/transforms/rename-date-now-start-times/manifest.json +4 -3
- package/dist/transforms/rename-default-options-parameters/manifest.json +3 -1
- package/dist/transforms/rename-deferred-resolve-parameters/manifest.json +3 -2
- package/dist/transforms/rename-destructured-aliases/manifest.json +4 -3
- package/dist/transforms/rename-error-variables/manifest.json +3 -2
- package/dist/transforms/rename-event-parameters/manifest.json +3 -1
- package/dist/transforms/rename-loop-index-variables/manifest.json +3 -2
- package/dist/transforms/rename-loop-index-variables-v2/manifest.json +3 -2
- package/dist/transforms/rename-loop-index-variables-v3/manifest.json +3 -2
- package/dist/transforms/rename-loop-length-variables/manifest.json +3 -2
- package/dist/transforms/rename-parameters-to-match-properties/manifest.json +4 -2
- package/dist/transforms/rename-parameters-to-match-properties-v2/manifest.json +3 -2
- package/dist/transforms/rename-process-stdout-handlers/manifest.json +4 -3
- package/dist/transforms/rename-promise-executor-parameters/manifest.json +3 -2
- package/dist/transforms/rename-regex-builders/manifest.json +3 -2
- package/dist/transforms/rename-replace-child-parameters/manifest.json +2 -1
- package/dist/transforms/rename-rest-parameters/manifest.json +3 -1
- package/dist/transforms/rename-this-aliases/manifest.json +4 -3
- package/dist/transforms/rename-timeout-duration-parameters/manifest.json +4 -3
- package/dist/transforms/rename-timeout-ids/manifest.json +4 -3
- package/dist/transforms/rename-typeof-variables/manifest.json +3 -1
- package/dist/transforms/rename-uint8array-concat-variables/manifest.json +2 -1
- package/dist/transforms/rename-url-parameters/manifest.json +3 -2
- package/dist/transforms/rename-url-variables/manifest.json +4 -3
- package/dist/transforms/rename-use-reference-guards/manifest.json +2 -1
- package/dist/transforms/rename-use-reference-guards-v2/manifest.json +3 -1
- package/dist/transforms/simplify-boolean-negations/manifest.json +3 -1
- package/dist/transforms/split-variable-declarations/manifest.json +4 -3
- package/dist/transforms/use-object-property-shorthand/manifest.json +2 -1
- package/dist/transforms/use-object-shorthand/manifest.json +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type ComputeTransformChangedLinesOptions = {
|
|
2
|
+
baselineTransforms: string[];
|
|
3
|
+
diffPath: string;
|
|
4
|
+
baselineOutputFrom: string;
|
|
5
|
+
testOutputFrom: string;
|
|
6
|
+
verbose: boolean;
|
|
7
|
+
log: (message: string) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const computeTransformChangedLines: (options: ComputeTransformChangedLinesOptions) => Promise<number | undefined>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { computeDirectoryDiff } from "./diff-utilities.js";
|
|
2
|
+
export const computeTransformChangedLines = async (options) => {
|
|
3
|
+
const { baselineTransforms, diffPath, baselineOutputFrom, testOutputFrom, verbose, log, } = options;
|
|
4
|
+
const isBaselineNone = baselineTransforms.length === 0 ||
|
|
5
|
+
(baselineTransforms.length === 1 && baselineTransforms[0] === "none");
|
|
6
|
+
if (!isBaselineNone) {
|
|
7
|
+
return undefined;
|
|
8
|
+
}
|
|
9
|
+
const transformDiff = await computeDirectoryDiff({
|
|
10
|
+
diffPath,
|
|
11
|
+
directoryA: baselineOutputFrom,
|
|
12
|
+
directoryB: testOutputFrom,
|
|
13
|
+
outputPath: undefined,
|
|
14
|
+
overwrite: false,
|
|
15
|
+
});
|
|
16
|
+
const changedLines = transformDiff.addedLines + transformDiff.removedLines;
|
|
17
|
+
if (verbose) {
|
|
18
|
+
log(`Transform changed lines: ${changedLines}`);
|
|
19
|
+
}
|
|
20
|
+
return changedLines;
|
|
21
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type FormatTransformationOutputsOptions = {
|
|
2
|
+
baselineOutputFrom: string;
|
|
3
|
+
baselineOutputTo: string;
|
|
4
|
+
testOutputFrom: string;
|
|
5
|
+
testOutputTo: string;
|
|
6
|
+
rootDirectory: string;
|
|
7
|
+
pnpmPath: string | undefined;
|
|
8
|
+
prettierPath: string | undefined;
|
|
9
|
+
};
|
|
10
|
+
export declare const formatTransformationOutputs: (options: FormatTransformationOutputsOptions) => Promise<void>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { formatDirectoryWithPrettier } from "./shell-utilities.js";
|
|
2
|
+
export const formatTransformationOutputs = async (options) => {
|
|
3
|
+
const { baselineOutputFrom, baselineOutputTo, testOutputFrom, testOutputTo, rootDirectory, pnpmPath, prettierPath, } = options;
|
|
4
|
+
await Promise.all([
|
|
5
|
+
formatDirectoryWithPrettier({
|
|
6
|
+
directory: baselineOutputFrom,
|
|
7
|
+
rootDirectory,
|
|
8
|
+
pnpmPath,
|
|
9
|
+
prettierPath,
|
|
10
|
+
}),
|
|
11
|
+
formatDirectoryWithPrettier({
|
|
12
|
+
directory: baselineOutputTo,
|
|
13
|
+
rootDirectory,
|
|
14
|
+
pnpmPath,
|
|
15
|
+
prettierPath,
|
|
16
|
+
}),
|
|
17
|
+
formatDirectoryWithPrettier({
|
|
18
|
+
directory: testOutputFrom,
|
|
19
|
+
rootDirectory,
|
|
20
|
+
pnpmPath,
|
|
21
|
+
prettierPath,
|
|
22
|
+
}),
|
|
23
|
+
formatDirectoryWithPrettier({
|
|
24
|
+
directory: testOutputTo,
|
|
25
|
+
rootDirectory,
|
|
26
|
+
pnpmPath,
|
|
27
|
+
prettierPath,
|
|
28
|
+
}),
|
|
29
|
+
]);
|
|
30
|
+
};
|
|
@@ -4,8 +4,9 @@ import envPaths from "env-paths";
|
|
|
4
4
|
import { computeDirectoryDiff } from "./diff-utilities.js";
|
|
5
5
|
import { calculateReductionRatio, formatDiffStats } from "./metrics.js";
|
|
6
6
|
import { getRelativePatchPath } from "./relative-patch-path.js";
|
|
7
|
-
import { formatDirectoryWithPrettier } from "./shell-utilities.js";
|
|
8
7
|
import { runPairTransformations } from "./run-pair-transformations.js";
|
|
8
|
+
import { computeTransformChangedLines } from "./compute-transform-changed-lines.js";
|
|
9
|
+
import { formatTransformationOutputs } from "./format-transformation-outputs.js";
|
|
9
10
|
const appPaths = envPaths("miniread");
|
|
10
11
|
export const evaluatePair = async (options) => {
|
|
11
12
|
const { pair, baselineTransforms, testTransforms, sourcesDirectory, rootDirectory, evaluationDirectory, nodePath, minireadCliPath, diffPath, pnpmPath, prettierPath, formatCode, baselinePatchPath, testPatchPath, overwrite, verbose, log, } = options;
|
|
@@ -33,32 +34,15 @@ export const evaluatePair = async (options) => {
|
|
|
33
34
|
if (formatCode) {
|
|
34
35
|
if (verbose)
|
|
35
36
|
log("Formatting output with Prettier...");
|
|
36
|
-
await
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
rootDirectory,
|
|
46
|
-
pnpmPath,
|
|
47
|
-
prettierPath,
|
|
48
|
-
}),
|
|
49
|
-
formatDirectoryWithPrettier({
|
|
50
|
-
directory: testOutputFrom,
|
|
51
|
-
rootDirectory,
|
|
52
|
-
pnpmPath,
|
|
53
|
-
prettierPath,
|
|
54
|
-
}),
|
|
55
|
-
formatDirectoryWithPrettier({
|
|
56
|
-
directory: testOutputTo,
|
|
57
|
-
rootDirectory,
|
|
58
|
-
pnpmPath,
|
|
59
|
-
prettierPath,
|
|
60
|
-
}),
|
|
61
|
-
]);
|
|
37
|
+
await formatTransformationOutputs({
|
|
38
|
+
baselineOutputFrom,
|
|
39
|
+
baselineOutputTo,
|
|
40
|
+
testOutputFrom,
|
|
41
|
+
testOutputTo,
|
|
42
|
+
rootDirectory,
|
|
43
|
+
pnpmPath,
|
|
44
|
+
prettierPath,
|
|
45
|
+
});
|
|
62
46
|
}
|
|
63
47
|
if (verbose)
|
|
64
48
|
log("Computing diffs...");
|
|
@@ -78,6 +62,17 @@ export const evaluatePair = async (options) => {
|
|
|
78
62
|
overwrite,
|
|
79
63
|
}),
|
|
80
64
|
]);
|
|
65
|
+
// Compute changed lines: diff between baseline (no transforms) and test (with transforms)
|
|
66
|
+
// Both outputs go through the same miniread pipeline and Prettier formatting,
|
|
67
|
+
// so the only difference is the transform's effect
|
|
68
|
+
const transformChangedLines = await computeTransformChangedLines({
|
|
69
|
+
baselineTransforms,
|
|
70
|
+
diffPath,
|
|
71
|
+
baselineOutputFrom,
|
|
72
|
+
testOutputFrom,
|
|
73
|
+
verbose,
|
|
74
|
+
log,
|
|
75
|
+
});
|
|
81
76
|
if (verbose) {
|
|
82
77
|
log(`Baseline: ${formatDiffStats(baselineDiff)}`);
|
|
83
78
|
log(`Test: ${formatDiffStats(testDiff)}`);
|
|
@@ -107,6 +102,7 @@ export const evaluatePair = async (options) => {
|
|
|
107
102
|
reductionRatio,
|
|
108
103
|
baselinePatchPath: reportBaselinePatchPath,
|
|
109
104
|
testPatchPath: reportTestPatchPath,
|
|
105
|
+
transformChangedLines,
|
|
110
106
|
};
|
|
111
107
|
}
|
|
112
108
|
finally {
|
|
@@ -41,6 +41,8 @@ export const runCheckMode = async (options) => {
|
|
|
41
41
|
console.error(` {`);
|
|
42
42
|
console.error(` "diffReductionImpact": 0,`);
|
|
43
43
|
console.error(` "recommended": true,`);
|
|
44
|
+
console.error(` "evaluatedAt": "2026-01-25T00:00:00.000Z",`);
|
|
45
|
+
console.error(` "changedLines": 0,`);
|
|
44
46
|
console.error(` "notes": "Description of the transform's impact"`);
|
|
45
47
|
console.error(` }`);
|
|
46
48
|
exitCode = 1;
|
|
@@ -112,6 +112,7 @@ export const runEvaluateCli = async (argv) => {
|
|
|
112
112
|
testTransforms: parsedOptions.testTransforms,
|
|
113
113
|
reductionRatios: results.map((r) => r.reductionRatio),
|
|
114
114
|
recommendedTransformIds: transformPresets.recommended,
|
|
115
|
+
transformChangedLines: results.map((r) => r.transformChangedLines),
|
|
115
116
|
});
|
|
116
117
|
console.error(updateResult.message);
|
|
117
118
|
}
|
|
@@ -49,20 +49,26 @@ export const runMiniread = async (options) => {
|
|
|
49
49
|
};
|
|
50
50
|
export const formatDirectoryWithPrettier = async (options) => {
|
|
51
51
|
const { directory, rootDirectory, pnpmPath, prettierPath } = options;
|
|
52
|
+
// Use generous print-width to avoid line-wrap differences in diffs
|
|
53
|
+
const prettierArguments = [
|
|
54
|
+
"--write",
|
|
55
|
+
"--ignore-unknown",
|
|
56
|
+
"--print-width",
|
|
57
|
+
"9999",
|
|
58
|
+
directory,
|
|
59
|
+
];
|
|
52
60
|
if (prettierPath) {
|
|
53
|
-
await runCommand(prettierPath,
|
|
61
|
+
await runCommand(prettierPath, prettierArguments, {
|
|
62
|
+
cwd: rootDirectory,
|
|
63
|
+
label: "prettier",
|
|
64
|
+
});
|
|
54
65
|
return;
|
|
55
66
|
}
|
|
56
67
|
if (!pnpmPath) {
|
|
57
68
|
throw new Error("Unable to format: missing pnpmPath and prettierPath (this is a bug).");
|
|
58
69
|
}
|
|
59
|
-
await runCommand(pnpmPath, [
|
|
60
|
-
|
|
61
|
-
"prettier",
|
|
62
|
-
|
|
63
|
-
"--ignore-unknown",
|
|
64
|
-
"--print-width",
|
|
65
|
-
"9999",
|
|
66
|
-
directory,
|
|
67
|
-
], { cwd: rootDirectory, label: "pnpm exec prettier" });
|
|
70
|
+
await runCommand(pnpmPath, ["exec", "prettier", ...prettierArguments], {
|
|
71
|
+
cwd: rootDirectory,
|
|
72
|
+
label: "pnpm exec prettier",
|
|
73
|
+
});
|
|
68
74
|
};
|
|
@@ -5,6 +5,8 @@ type UpdateTransformManifestOptions = {
|
|
|
5
5
|
testTransforms: string[];
|
|
6
6
|
reductionRatios: number[];
|
|
7
7
|
recommendedTransformIds: string[];
|
|
8
|
+
/** Changed lines per evaluation pair (added + removed). Summed for manifest. */
|
|
9
|
+
transformChangedLines?: (number | undefined)[];
|
|
8
10
|
};
|
|
9
11
|
export declare const updateTransformManifestFromEvaluation: (options: UpdateTransformManifestOptions) => Promise<{
|
|
10
12
|
updated: boolean;
|
|
@@ -24,8 +24,14 @@ const loadManifest = async (manifestPath) => {
|
|
|
24
24
|
throw error;
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
|
+
const sumDefined = (values) => {
|
|
28
|
+
const defined = values.filter((v) => v !== undefined);
|
|
29
|
+
if (defined.length === 0)
|
|
30
|
+
return undefined;
|
|
31
|
+
return defined.reduce((a, b) => a + b, 0);
|
|
32
|
+
};
|
|
27
33
|
export const updateTransformManifestFromEvaluation = async (options) => {
|
|
28
|
-
const { transformsDirectory, presetStatsPath, baselineTransforms, testTransforms, reductionRatios, recommendedTransformIds, } = options;
|
|
34
|
+
const { transformsDirectory, presetStatsPath, baselineTransforms, testTransforms, reductionRatios, recommendedTransformIds, transformChangedLines, } = options;
|
|
29
35
|
const baselineIds = normalizeTransformIds(baselineTransforms);
|
|
30
36
|
const testIds = normalizeTransformIds(testTransforms);
|
|
31
37
|
const isBaselineNone = baselineIds.length === 0 ||
|
|
@@ -40,9 +46,15 @@ export const updateTransformManifestFromEvaluation = async (options) => {
|
|
|
40
46
|
const manifest = await loadManifest(manifestPath);
|
|
41
47
|
if (manifest) {
|
|
42
48
|
const measuredImpact = average(reductionRatios);
|
|
43
|
-
|
|
49
|
+
const totalChangedLines = (transformChangedLines
|
|
50
|
+
? sumDefined(transformChangedLines)
|
|
51
|
+
: undefined) ?? 0;
|
|
52
|
+
const impactChanged = manifest.diffReductionImpact !== measuredImpact;
|
|
53
|
+
const changedLinesChanged = manifest.changedLines !== totalChangedLines;
|
|
54
|
+
if (impactChanged || changedLinesChanged) {
|
|
44
55
|
manifest.diffReductionImpact = measuredImpact;
|
|
45
56
|
manifest.evaluatedAt = new Date().toISOString();
|
|
57
|
+
manifest.changedLines = totalChangedLines;
|
|
46
58
|
await writeJsonFileAtomic(manifestPath, manifest, {
|
|
47
59
|
overwrite: true,
|
|
48
60
|
});
|
|
@@ -6,9 +6,10 @@ export type TransformManifestEntry = {
|
|
|
6
6
|
parallelizable: boolean;
|
|
7
7
|
diffReductionImpact: number;
|
|
8
8
|
recommended: boolean;
|
|
9
|
-
evaluatedAt
|
|
9
|
+
evaluatedAt: string;
|
|
10
10
|
notes?: string;
|
|
11
11
|
supersededBy?: string;
|
|
12
|
+
changedLines: number;
|
|
12
13
|
};
|
|
13
14
|
export declare const manifestEntries: TransformManifestEntry[];
|
|
14
15
|
export declare const recommendedTransformIds: string[];
|
|
@@ -5,238 +5,284 @@ const manifestData = {
|
|
|
5
5
|
"expand-boolean-literals": {
|
|
6
6
|
diffReductionImpact: 0,
|
|
7
7
|
recommended: true,
|
|
8
|
-
evaluatedAt: "2026-01-
|
|
8
|
+
evaluatedAt: "2026-01-25T19:39:37.248Z",
|
|
9
9
|
notes: "Improves readability but does not reduce diffs (boolean literals are already deterministic)",
|
|
10
|
+
changedLines: 35954,
|
|
10
11
|
},
|
|
11
12
|
"expand-sequence-expressions-v4": {
|
|
12
|
-
diffReductionImpact: -0.
|
|
13
|
+
diffReductionImpact: -0.017358355066712017,
|
|
13
14
|
recommended: false,
|
|
14
|
-
evaluatedAt: "2026-01-
|
|
15
|
+
evaluatedAt: "2026-01-25T19:43:32.852Z",
|
|
15
16
|
notes: "Measured with baseline none: -1.73%. Supersedes all prior sequence expression transforms. Superseded by expand-sequence-expressions-v5.",
|
|
16
17
|
supersededBy: "expand-sequence-expressions-v5",
|
|
18
|
+
changedLines: 181675,
|
|
17
19
|
},
|
|
18
20
|
"expand-sequence-expressions-v5": {
|
|
19
|
-
diffReductionImpact: -0.
|
|
21
|
+
diffReductionImpact: -0.020297085837396533,
|
|
20
22
|
recommended: true,
|
|
23
|
+
evaluatedAt: "2026-01-25T19:44:54.843Z",
|
|
21
24
|
notes: "Extends expand-sequence-expressions-v4 by also expanding `if ((a, b)) ...` style tests.",
|
|
25
|
+
changedLines: 204852,
|
|
22
26
|
},
|
|
23
27
|
"expand-special-number-literals": {
|
|
24
28
|
diffReductionImpact: 0,
|
|
25
29
|
recommended: true,
|
|
26
|
-
evaluatedAt: "2026-01-
|
|
30
|
+
evaluatedAt: "2026-01-25T19:45:58.037Z",
|
|
27
31
|
notes: "Auto-added by evaluation script.",
|
|
32
|
+
changedLines: 310,
|
|
28
33
|
},
|
|
29
34
|
"expand-undefined-literals": {
|
|
30
35
|
diffReductionImpact: 0,
|
|
31
36
|
recommended: true,
|
|
32
|
-
evaluatedAt: "2026-01-
|
|
37
|
+
evaluatedAt: "2026-01-25T19:46:58.935Z",
|
|
33
38
|
notes: "Auto-added by evaluation script.",
|
|
39
|
+
changedLines: 12668,
|
|
34
40
|
},
|
|
35
41
|
"remove-redundant-else": {
|
|
36
42
|
diffReductionImpact: 0,
|
|
37
43
|
recommended: true,
|
|
38
|
-
evaluatedAt: "2026-01-
|
|
44
|
+
evaluatedAt: "2026-01-25T19:48:00.028Z",
|
|
39
45
|
notes: "Added manually; improves readability by reducing nesting.",
|
|
46
|
+
changedLines: 5208,
|
|
40
47
|
},
|
|
41
48
|
"rename-arguments-length-flags": {
|
|
42
49
|
diffReductionImpact: 0,
|
|
43
50
|
recommended: true,
|
|
44
|
-
evaluatedAt: "2026-01-
|
|
51
|
+
evaluatedAt: "2026-01-25T19:48:49.771Z",
|
|
45
52
|
notes: "Measured with baseline none: 0.00%. Added to recommended for readability.",
|
|
53
|
+
changedLines: 24,
|
|
46
54
|
},
|
|
47
55
|
"rename-asap-wrappers": {
|
|
48
56
|
diffReductionImpact: 0,
|
|
49
57
|
recommended: true,
|
|
50
|
-
evaluatedAt: "2026-01-
|
|
58
|
+
evaluatedAt: "2026-01-25T19:49:34.714Z",
|
|
51
59
|
notes: "Measured with baseline none: 0.00%. Added to recommended for readability.",
|
|
60
|
+
changedLines: 10,
|
|
52
61
|
},
|
|
53
62
|
"rename-awaiter-parameters": {
|
|
54
63
|
diffReductionImpact: 0,
|
|
55
64
|
recommended: true,
|
|
56
|
-
evaluatedAt: "2026-01-
|
|
65
|
+
evaluatedAt: "2026-01-25T19:50:21.181Z",
|
|
57
66
|
notes: "Measured with baseline none: 0.00%. Added to recommended for readability.",
|
|
67
|
+
changedLines: 196,
|
|
58
68
|
},
|
|
59
69
|
"rename-buffer-variables": {
|
|
60
|
-
diffReductionImpact: 0.
|
|
70
|
+
diffReductionImpact: 0.00024568167214722436,
|
|
61
71
|
recommended: true,
|
|
62
|
-
evaluatedAt: "2026-01-
|
|
72
|
+
evaluatedAt: "2026-01-25T20:34:47.336Z",
|
|
63
73
|
notes: "Measured with baseline none: 0.02%. Added to recommended for readability.",
|
|
74
|
+
changedLines: 372,
|
|
64
75
|
},
|
|
65
76
|
"rename-catch-parameters": {
|
|
66
|
-
diffReductionImpact: 0.
|
|
77
|
+
diffReductionImpact: 0.0007748421967721519,
|
|
67
78
|
recommended: true,
|
|
68
|
-
evaluatedAt: "2026-01-
|
|
79
|
+
evaluatedAt: "2026-01-25T19:51:21.651Z",
|
|
69
80
|
notes: "Auto-added by evaluation script.",
|
|
81
|
+
changedLines: 7136,
|
|
70
82
|
},
|
|
71
83
|
"rename-char-code-at": {
|
|
72
84
|
diffReductionImpact: 0,
|
|
73
85
|
recommended: true,
|
|
74
|
-
evaluatedAt: "2026-01-
|
|
86
|
+
evaluatedAt: "2026-01-25T19:52:21.530Z",
|
|
75
87
|
notes: "Measured with baseline none: 0.00%. Renames variables used in charCodeAt to improve readability.",
|
|
88
|
+
changedLines: 1716,
|
|
76
89
|
},
|
|
77
90
|
"rename-charcode-variables": {
|
|
78
91
|
diffReductionImpact: 0,
|
|
79
92
|
recommended: false,
|
|
80
|
-
evaluatedAt: "2026-01-
|
|
93
|
+
evaluatedAt: "2026-01-25T19:53:17.435Z",
|
|
81
94
|
notes: "Superseded by rename-charcode-variables-v2.",
|
|
82
95
|
supersededBy: "rename-charcode-variables-v2",
|
|
96
|
+
changedLines: 308,
|
|
83
97
|
},
|
|
84
98
|
"rename-charcode-variables-v2": {
|
|
85
99
|
diffReductionImpact: 0,
|
|
86
100
|
recommended: true,
|
|
87
|
-
evaluatedAt: "2026-01-
|
|
101
|
+
evaluatedAt: "2026-01-25T19:54:12.058Z",
|
|
88
102
|
notes: "Derives names from charCodeAt argument for better stability (e.g., $charCodeAtIndex, $charCodeAtIndexPlus1).",
|
|
103
|
+
changedLines: 238,
|
|
89
104
|
},
|
|
90
105
|
"rename-client-aliases": {
|
|
91
106
|
diffReductionImpact: 0,
|
|
92
107
|
recommended: true,
|
|
93
|
-
evaluatedAt: "2026-01-
|
|
108
|
+
evaluatedAt: "2026-01-25T19:54:55.148Z",
|
|
94
109
|
notes: "Measured with baseline none: 0.00%. Added to recommended for readability.",
|
|
110
|
+
changedLines: 68,
|
|
95
111
|
},
|
|
96
112
|
"rename-comparison-flags": {
|
|
97
113
|
diffReductionImpact: 0,
|
|
98
114
|
recommended: true,
|
|
99
|
-
evaluatedAt: "2026-01-
|
|
115
|
+
evaluatedAt: "2026-01-25T19:55:51.913Z",
|
|
100
116
|
notes: "Measured with baseline none: 0%. Improves readability by renaming minified variables like 'saA === \"darwin\"' to '$isDarwin'.",
|
|
117
|
+
changedLines: 190,
|
|
101
118
|
},
|
|
102
119
|
"rename-date-now-start-times": {
|
|
103
|
-
diffReductionImpact: 0.
|
|
120
|
+
diffReductionImpact: 0.00003779718033036783,
|
|
104
121
|
recommended: true,
|
|
105
|
-
evaluatedAt: "2026-01-
|
|
122
|
+
evaluatedAt: "2026-01-25T19:56:51.182Z",
|
|
106
123
|
notes: "Measured with baseline none: 0.00%. Added to recommended for readability.",
|
|
124
|
+
changedLines: 354,
|
|
107
125
|
},
|
|
108
126
|
"rename-default-options-parameters": {
|
|
109
127
|
diffReductionImpact: 0,
|
|
110
128
|
recommended: true,
|
|
129
|
+
evaluatedAt: "2026-01-25T19:51:46.527Z",
|
|
130
|
+
changedLines: 0,
|
|
111
131
|
},
|
|
112
132
|
"rename-deferred-resolve-parameters": {
|
|
113
133
|
diffReductionImpact: 0,
|
|
114
134
|
recommended: true,
|
|
115
|
-
evaluatedAt: "2026-01-
|
|
135
|
+
evaluatedAt: "2026-01-25T19:58:33.332Z",
|
|
116
136
|
notes: "Measured with baseline none: 0.00%. Renames single-parameter promise executors to $resolve when usage only stores or calls the resolver.",
|
|
137
|
+
changedLines: 484,
|
|
117
138
|
},
|
|
118
139
|
"rename-destructured-aliases": {
|
|
119
|
-
diffReductionImpact: 0.
|
|
140
|
+
diffReductionImpact: 0.021997958952262198,
|
|
120
141
|
recommended: true,
|
|
121
|
-
evaluatedAt: "2026-01-
|
|
142
|
+
evaluatedAt: "2026-01-25T19:59:48.188Z",
|
|
122
143
|
notes: "Auto-added by evaluation script. Measured with baseline none: 0.09%.",
|
|
144
|
+
changedLines: 38927,
|
|
123
145
|
},
|
|
124
146
|
"rename-error-variables": {
|
|
125
|
-
diffReductionImpact: 0.
|
|
147
|
+
diffReductionImpact: 0.0003023774426428316,
|
|
126
148
|
recommended: true,
|
|
127
|
-
evaluatedAt: "2026-01-
|
|
149
|
+
evaluatedAt: "2026-01-25T20:00:46.578Z",
|
|
128
150
|
notes: "Auto-added by evaluation script.",
|
|
151
|
+
changedLines: 930,
|
|
129
152
|
},
|
|
130
153
|
"rename-event-parameters": {
|
|
131
154
|
diffReductionImpact: 0,
|
|
132
155
|
recommended: true,
|
|
156
|
+
evaluatedAt: "2026-01-25T20:01:29.649Z",
|
|
133
157
|
notes: "Added manually; recommended based on high-confidence heuristics (not yet evaluated).",
|
|
158
|
+
changedLines: 8,
|
|
134
159
|
},
|
|
135
160
|
"rename-loop-index-variables": {
|
|
136
161
|
diffReductionImpact: 0,
|
|
137
162
|
recommended: false,
|
|
138
|
-
evaluatedAt: "2026-01-
|
|
163
|
+
evaluatedAt: "2026-01-25T20:02:28.948Z",
|
|
139
164
|
notes: "Superseded by rename-loop-index-variables-v3.",
|
|
140
165
|
supersededBy: "rename-loop-index-variables-v3",
|
|
166
|
+
changedLines: 1462,
|
|
141
167
|
},
|
|
142
168
|
"rename-loop-index-variables-v2": {
|
|
143
169
|
diffReductionImpact: 0,
|
|
144
170
|
recommended: false,
|
|
145
|
-
evaluatedAt: "2026-01-
|
|
171
|
+
evaluatedAt: "2026-01-25T20:03:25.815Z",
|
|
146
172
|
notes: "Superseded by rename-loop-index-variables-v3.",
|
|
147
173
|
supersededBy: "rename-loop-index-variables-v3",
|
|
174
|
+
changedLines: 1522,
|
|
148
175
|
},
|
|
149
176
|
"rename-loop-index-variables-v3": {
|
|
150
177
|
diffReductionImpact: 0,
|
|
151
178
|
recommended: true,
|
|
152
|
-
evaluatedAt: "2026-01-
|
|
179
|
+
evaluatedAt: "2026-01-25T20:04:24.977Z",
|
|
153
180
|
notes: "Unifies rename-loop-index-variables and rename-loop-index-variables-v2 without modifying older transforms. Measured with baseline none: 0.00%.",
|
|
181
|
+
changedLines: 2984,
|
|
154
182
|
},
|
|
155
183
|
"rename-loop-length-variables": {
|
|
156
184
|
diffReductionImpact: 0,
|
|
157
185
|
recommended: true,
|
|
158
|
-
evaluatedAt: "2026-01-
|
|
186
|
+
evaluatedAt: "2026-01-25T20:05:17.827Z",
|
|
159
187
|
notes: "Measured with baseline none: 0.00%.",
|
|
188
|
+
changedLines: 208,
|
|
160
189
|
},
|
|
161
190
|
"rename-parameters-to-match-properties": {
|
|
162
|
-
diffReductionImpact: 0,
|
|
191
|
+
diffReductionImpact: 0.00003779718033036783,
|
|
163
192
|
recommended: false,
|
|
193
|
+
evaluatedAt: "2026-01-25T20:06:13.642Z",
|
|
164
194
|
notes: "Superseded by rename-parameters-to-match-properties-v2.",
|
|
165
195
|
supersededBy: "rename-parameters-to-match-properties-v2",
|
|
196
|
+
changedLines: 15823,
|
|
166
197
|
},
|
|
167
198
|
"rename-parameters-to-match-properties-v2": {
|
|
168
|
-
diffReductionImpact: 0.
|
|
199
|
+
diffReductionImpact: 0.00007559436066073566,
|
|
169
200
|
recommended: true,
|
|
170
|
-
evaluatedAt: "2026-01-
|
|
201
|
+
evaluatedAt: "2026-01-25T20:07:10.063Z",
|
|
171
202
|
notes: "Extends v1 to also handle this.property = param assignments.",
|
|
203
|
+
changedLines: 20493,
|
|
172
204
|
},
|
|
173
205
|
"rename-process-stdout-handlers": {
|
|
174
|
-
diffReductionImpact:
|
|
206
|
+
diffReductionImpact: 0,
|
|
175
207
|
recommended: false,
|
|
176
|
-
evaluatedAt: "2026-01-
|
|
208
|
+
evaluatedAt: "2026-01-25T20:07:50.099Z",
|
|
177
209
|
notes: "Measured with baseline none: -0.0019%. Kept out of recommended due to slight negative diff impact, but useful for readability in stdout hook handlers.",
|
|
210
|
+
changedLines: 8,
|
|
178
211
|
},
|
|
179
212
|
"rename-promise-executor-parameters": {
|
|
180
213
|
diffReductionImpact: 0,
|
|
181
214
|
recommended: true,
|
|
182
|
-
evaluatedAt: "2026-01-
|
|
215
|
+
evaluatedAt: "2026-01-25T20:08:45.593Z",
|
|
183
216
|
notes: "Auto-added by evaluation script.",
|
|
217
|
+
changedLines: 970,
|
|
184
218
|
},
|
|
185
219
|
"rename-regex-builders": {
|
|
186
220
|
diffReductionImpact: 0,
|
|
187
221
|
recommended: true,
|
|
188
|
-
evaluatedAt: "2026-01-
|
|
222
|
+
evaluatedAt: "2026-01-25T20:09:26.721Z",
|
|
189
223
|
notes: "Measured with baseline none: 0.00%. Added to recommended for readability.",
|
|
224
|
+
changedLines: 6,
|
|
190
225
|
},
|
|
191
226
|
"rename-replace-child-parameters": {
|
|
192
227
|
diffReductionImpact: 0,
|
|
193
228
|
recommended: false,
|
|
194
229
|
evaluatedAt: "2026-01-23T17:28:09.184Z",
|
|
195
230
|
notes: "Measured with baseline none: 0.00%.",
|
|
231
|
+
changedLines: 0,
|
|
196
232
|
},
|
|
197
233
|
"rename-rest-parameters": {
|
|
198
234
|
diffReductionImpact: 0,
|
|
199
235
|
recommended: true,
|
|
236
|
+
evaluatedAt: "2026-01-25T20:11:03.532Z",
|
|
237
|
+
changedLines: 1300,
|
|
200
238
|
},
|
|
201
239
|
"rename-this-aliases": {
|
|
202
|
-
diffReductionImpact: 0.
|
|
240
|
+
diffReductionImpact: 0.00003779718033036783,
|
|
203
241
|
recommended: true,
|
|
204
|
-
evaluatedAt: "2026-01-
|
|
242
|
+
evaluatedAt: "2026-01-25T20:11:56.982Z",
|
|
205
243
|
notes: "Measured with baseline none: 0.00%. Improves readability by stabilizing `this` aliases used for closures.",
|
|
244
|
+
changedLines: 1382,
|
|
206
245
|
},
|
|
207
246
|
"rename-timeout-duration-parameters": {
|
|
208
|
-
diffReductionImpact:
|
|
247
|
+
diffReductionImpact: 0,
|
|
209
248
|
recommended: false,
|
|
210
|
-
evaluatedAt: "2026-01-
|
|
249
|
+
evaluatedAt: "2026-01-25T20:12:50.886Z",
|
|
211
250
|
notes: "Negative diff reduction; leaving out of recommended preset.",
|
|
251
|
+
changedLines: 140,
|
|
212
252
|
},
|
|
213
253
|
"rename-timeout-ids": {
|
|
214
|
-
diffReductionImpact: 0.
|
|
254
|
+
diffReductionImpact: 0.00003779718033036783,
|
|
215
255
|
recommended: true,
|
|
216
|
-
evaluatedAt: "2026-01-
|
|
256
|
+
evaluatedAt: "2026-01-25T20:13:48.297Z",
|
|
217
257
|
notes: "Measured with baseline none: 0.00%. Added to recommended for readability.",
|
|
258
|
+
changedLines: 154,
|
|
218
259
|
},
|
|
219
260
|
"rename-typeof-variables": {
|
|
220
261
|
diffReductionImpact: 0,
|
|
221
262
|
recommended: true,
|
|
263
|
+
evaluatedAt: "2026-01-25T20:14:40.653Z",
|
|
264
|
+
changedLines: 372,
|
|
222
265
|
},
|
|
223
266
|
"rename-uint8array-concat-variables": {
|
|
224
267
|
diffReductionImpact: 0,
|
|
225
268
|
recommended: true,
|
|
226
269
|
evaluatedAt: "2026-01-24T12:41:44.793Z",
|
|
227
270
|
notes: "Measured with baseline none: 0.00%. Added to recommended for readability.",
|
|
271
|
+
changedLines: 0,
|
|
228
272
|
},
|
|
229
273
|
"rename-url-parameters": {
|
|
230
274
|
diffReductionImpact: 0,
|
|
231
275
|
recommended: true,
|
|
232
|
-
evaluatedAt: "2026-01-
|
|
276
|
+
evaluatedAt: "2026-01-25T20:16:11.998Z",
|
|
233
277
|
notes: "Measured with baseline none: 0.00%. Added to recommended for readability.",
|
|
278
|
+
changedLines: 20,
|
|
234
279
|
},
|
|
235
280
|
"rename-url-variables": {
|
|
236
|
-
diffReductionImpact: 0.
|
|
281
|
+
diffReductionImpact: 0.000018898590165128404,
|
|
237
282
|
recommended: true,
|
|
238
|
-
evaluatedAt: "2026-01-
|
|
283
|
+
evaluatedAt: "2026-01-25T20:17:07.056Z",
|
|
239
284
|
notes: "Measured with baseline none: 0.00%. Added to recommended for readability.",
|
|
285
|
+
changedLines: 218,
|
|
240
286
|
},
|
|
241
287
|
"rename-use-reference-guards": {
|
|
242
288
|
diffReductionImpact: 0,
|
|
@@ -244,34 +290,42 @@ const manifestData = {
|
|
|
244
290
|
evaluatedAt: "2026-01-22T17:03:19.826Z",
|
|
245
291
|
notes: "Superseded by rename-use-reference-guards-v2.",
|
|
246
292
|
supersededBy: "rename-use-reference-guards-v2",
|
|
293
|
+
changedLines: 0,
|
|
247
294
|
},
|
|
248
295
|
"rename-use-reference-guards-v2": {
|
|
249
296
|
diffReductionImpact: 0,
|
|
250
297
|
recommended: true,
|
|
298
|
+
evaluatedAt: "2026-01-25T20:18:55.920Z",
|
|
251
299
|
notes: "Supersedes rename-use-reference-guards and also covers guards that reset to false.",
|
|
300
|
+
changedLines: 166,
|
|
252
301
|
},
|
|
253
302
|
"simplify-boolean-negations": {
|
|
254
303
|
diffReductionImpact: 0,
|
|
255
304
|
recommended: true,
|
|
305
|
+
evaluatedAt: "2026-01-25T20:20:06.368Z",
|
|
256
306
|
notes: "Added manually; improves readability and cleans up `expand-boolean-literals` output.",
|
|
307
|
+
changedLines: 144,
|
|
257
308
|
},
|
|
258
309
|
"split-variable-declarations": {
|
|
259
|
-
diffReductionImpact: -0.
|
|
310
|
+
diffReductionImpact: -0.002796991344445665,
|
|
260
311
|
recommended: true,
|
|
261
|
-
evaluatedAt: "2026-01-
|
|
312
|
+
evaluatedAt: "2026-01-25T20:21:14.926Z",
|
|
262
313
|
notes: "Auto-added by evaluation script. Measured with baseline none: -0.28%. Enabled in the recommended preset for readability and to normalize variable declarations even when line diffs increase.",
|
|
314
|
+
changedLines: 208592,
|
|
263
315
|
},
|
|
264
316
|
"use-object-property-shorthand": {
|
|
265
317
|
diffReductionImpact: 0,
|
|
266
318
|
recommended: true,
|
|
267
319
|
evaluatedAt: "2026-01-24T12:47:30.495Z",
|
|
268
320
|
notes: "Auto-added by evaluation script.",
|
|
321
|
+
changedLines: 0,
|
|
269
322
|
},
|
|
270
323
|
"use-object-shorthand": {
|
|
271
324
|
diffReductionImpact: 0,
|
|
272
325
|
recommended: true,
|
|
273
326
|
evaluatedAt: "2026-01-24T12:08:16.000Z",
|
|
274
327
|
notes: "Improves readability by using object shorthand for stable-renamed identifiers; no diff reduction impact expected.",
|
|
328
|
+
changedLines: 0,
|
|
275
329
|
},
|
|
276
330
|
};
|
|
277
331
|
export const manifestEntries = Object.entries(transformRegistry)
|