Skip to content

Commit

Permalink
esmoduleinterop :/
Browse files Browse the repository at this point in the history
  • Loading branch information
bttmly committed Oct 11, 2019
1 parent 17f92a7 commit 20a324a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ example-toy: compile

dogfood: compile
rm -rf ./.perturb
node ./lib/cli -s lib --reporter quiet
node ./lib/cli -s lib

dogfood-fork: compile
rm -rf ./.perturb
Expand Down
2 changes: 1 addition & 1 deletion src/filters/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ export function sourceNodeIs(text: string) {
}

export const isESModuleInterop = nodeSourceIncludes(
"Object.defineProperty(exports, '__esModule', { value: true });",
"Object.defineProperty(exports, '__esModule'",
);
4 changes: 2 additions & 2 deletions src/filters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { MutantLocation } from "../types";

type LocationFilter = (m: MutantLocation) => boolean;

import { isUseStrict, isStringRequire } from "./filter";
import { isUseStrict, isStringRequire, isESModuleInterop } from "./filter";

const filters: LocationFilter[] = [
(m: MutantLocation) => !isUseStrict(m.node),
(m: MutantLocation) => !isStringRequire(m.node),
// (m: MutantLocation) => !isCallOfName("debug")(m.node),
(m: MutantLocation) => !isESModuleInterop(m.node),
];

export default R.allPass(filters);
Expand Down

0 comments on commit 20a324a

Please sign in to comment.