add object update transformer to pipeline

This commit is contained in:
mdgriffith 2020-08-07 08:40:20 -04:00
parent e6a34feffd
commit 0b514d1002

View File

@ -19,7 +19,7 @@ import { execSync } from 'child_process';
import { inlineEquality } from './experiments/inlineEquality';
import {
createReplaceUtilsUpdateWithObjectSpread,
objectUpdate,
convertFunctionExpressionsToArrowFuncs,
} from './experiments/modernizeJS';
import { createRemoveUnusedLocalsTransform } from './experiments/removeUnusedLocals';
@ -128,9 +128,9 @@ export const compileAndTransform = async (
return {};
};
function includeObjectUpdate(objectUpdate: ObjectUpdate | null): any {
if (objectUpdate != null) {
return [true, createReplaceUtilsUpdateWithObjectSpread(objectUpdate)];
function includeObjectUpdate(kind: ObjectUpdate | null): any {
if (kind != null) {
return [true, objectUpdate(kind)];
} else {
return [];
}