Skip to content

feat(config): support after and afterDeclarations AST transformers#1831

Merged
ahnpnl merged 2 commits intokulshekhar:masterfrom
ahnpnl:ast-transformer-more-support
Jul 28, 2020
Merged

feat(config): support after and afterDeclarations AST transformers#1831
ahnpnl merged 2 commits intokulshekhar:masterfrom
ahnpnl:ast-transformer-more-support

Conversation

@ahnpnl
Copy link
Copy Markdown
Collaborator

@ahnpnl ahnpnl commented Jul 27, 2020

Summary

At the moment, we only support before AST transformers. There are 2 other types, after and afterDeclarations which we should support too. This PR does:

  • Deprecate current way of defining astTransformers in ts-jest config by showing a warning message and instruct users how to migrate to the new way of config.

  • Replace the current way of defining astTransformers with a new way, which is an object to be able to accept all 3 types of AST transformers.

  • The old way of configuring will be removed in v27

Test plan

Added unit tests and e2e tests, Green CI

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

N.A.

@ahnpnl ahnpnl requested a review from kulshekhar as a code owner July 27, 2020 14:35
@coveralls
Copy link
Copy Markdown

coveralls commented Jul 27, 2020

Pull Request Test Coverage Report for Build 5459

  • 45 of 45 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 92.936%

Totals Coverage Status
Change from base Build 5458: 0.2%
Covered Lines: 1092
Relevant Lines: 1127

💛 - Coveralls

@ahnpnl
Copy link
Copy Markdown
Collaborator Author

ahnpnl commented Jul 27, 2020

Hmm gonna a few extra tests as not all added codes are covered

@ahnpnl
Copy link
Copy Markdown
Collaborator Author

ahnpnl commented Jul 27, 2020

look good now, all new added codes are covered :)

@ahnpnl ahnpnl merged commit be20a7c into kulshekhar:master Jul 28, 2020
@ahnpnl ahnpnl deleted the ast-transformer-more-support branch July 28, 2020 07:48
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.

3 participants