Skip to content

Commit

Permalink
fix(ts): support es private fields (#2605)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicojs committed Nov 4, 2020
1 parent 0dc78a5 commit 6bd2fbb
Show file tree
Hide file tree
Showing 15 changed files with 1,260 additions and 23 deletions.
14 changes: 7 additions & 7 deletions e2e/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion e2e/package.json
Expand Up @@ -29,7 +29,7 @@
"link-parent-bin": "^2.0.0",
"load-grunt-tasks": "~5.1.0",
"mocha": "~8.2.0",
"mutation-testing-metrics": "~1.4.0",
"mutation-testing-metrics": "~1.4.3",
"rxjs": "~6.5.3",
"semver": "~6.3.0",
"ts-jest": "~26.3.0",
Expand Down
14 changes: 7 additions & 7 deletions e2e/test/karma-webpack-with-ts/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions e2e/test/karma-webpack-with-ts/package.json
Expand Up @@ -8,8 +8,8 @@
},
"dependencies": {
"lit-element": "~2.3.1",
"mutation-testing-metrics": "~1.4.0",
"mutation-testing-report-schema": "~1.4.0"
"mutation-testing-metrics": "~1.4.3",
"mutation-testing-report-schema": "~1.4.3"
},
"devDependencies": {
"@types/webpack-env": "~1.15.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/api/package.json
Expand Up @@ -38,7 +38,7 @@
"node": ">=10"
},
"dependencies": {
"mutation-testing-report-schema": "~1.4.0",
"mutation-testing-report-schema": "~1.4.3",
"surrial": "~2.0.2",
"tslib": "~2.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/core/package.json
Expand Up @@ -71,8 +71,8 @@
"log4js": "~6.2.1",
"minimatch": "~3.0.4",
"mkdirp": "~1.0.3",
"mutation-testing-elements": "~1.4.1",
"mutation-testing-metrics": "~1.4.0",
"mutation-testing-elements": "~1.4.3",
"mutation-testing-metrics": "~1.4.3",
"npm-run-path": "~4.0.1",
"progress": "~2.0.0",
"rimraf": "~3.0.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/instrumenter/package.json
Expand Up @@ -33,7 +33,9 @@
"@babel/core": "~7.12.3",
"@babel/generator": "~7.12.1",
"@babel/parser": "~7.12.3",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-proposal-decorators": "~7.12.1 ",
"@babel/plugin-proposal-private-methods": "^7.12.1",
"@babel/preset-typescript": "~7.12.1 ",
"@stryker-mutator/api": "4.1.0",
"@stryker-mutator/util": "4.1.0",
Expand Down
6 changes: 5 additions & 1 deletion packages/instrumenter/src/parsers/ts-parser.ts
Expand Up @@ -18,7 +18,11 @@ export async function parse(text: string, fileName: string): Promise<TSAst> {
configFile: false,
babelrc: false,
presets: [[require.resolve('@babel/preset-typescript'), { isTSX, allExtensions: true }]],
plugins: [[require.resolve('@babel/plugin-proposal-decorators'), { legacy: true }]],
plugins: [
require.resolve('@babel/plugin-proposal-class-properties'),
require.resolve('@babel/plugin-proposal-private-methods'),
[require.resolve('@babel/plugin-proposal-decorators'), { legacy: true }],
],
});
if (types.isProgram(ast)) {
throw new Error(`Expected ${fileName} to contain a babel.types.file, but was a program`);
Expand Down

0 comments on commit 6bd2fbb

Please sign in to comment.