Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tsconfig): rewrite tsconfig references #2292

Merged
merged 3 commits into from
Jul 5, 2020

Conversation

nicojs
Copy link
Member

@nicojs nicojs commented Jul 5, 2020

Add a new tsconfigFile option (reused from the old @stryker-mutator/typescript package). Use this new option in the @stryker-mutator/typescript-checker instead of a specific typescript-checker specific one

From stryker core, use this setting to rewrite tsconfig.json file's references and extends when they refer config files that fall outside of the sandbox.

For example:

{
  "extends": "../../tsconfig.settings.json",
  "references": {
     "path": "../model"
  }
}

becomes:

{
  "extends": "../../../../tsconfig.settings.json",
  "references": {
     "path": "../../../model"
  }
}

The implementation relies on typescript being available, but will only import it when it found a tsconfig.json file. Once a tsconfig file is found, referenced files within the sandbox also get rewritten.

Closes #2276

Use this new option in the @stryker-mutator/typescript checker instead of a specific typescript-checker specific one
Rewrite tsconfig `references` and `extends` when they refer config files that fall outside of the sandbox.

Implementation relies on typescript being available, but will only import it when it found a tsconfig.json file.

Implementation works recursively, so referenced files within the sandbox also get rewritten.
@nicojs nicojs merged commit 4ee4950 into epic/mutation-switching Jul 5, 2020
@nicojs nicojs deleted the feat/tsconfig-file branch July 5, 2020 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow a custom build command, instead of the transpiler plugin
1 participant