Skip to content

feat(transformers): add path-mapping custom AST transformer#1927

Merged
ahnpnl merged 1 commit intokulshekhar:masterfrom
ahnpnl:path-mapping-transformer
Sep 4, 2020
Merged

feat(transformers): add path-mapping custom AST transformer#1927
ahnpnl merged 1 commit intokulshekhar:masterfrom
ahnpnl:path-mapping-transformer

Conversation

@ahnpnl
Copy link
Copy Markdown
Collaborator

@ahnpnl ahnpnl commented Sep 4, 2020

Summary

  • Add path mapping custom AST transformer and expose it as a public transformer. This transformer can help user to avoid using moduleNameMapper.

  • Adjust documentation for usage.

For now, it can be opt-in/out. If it’s stable and users want it as default, we can add it to default transformer set later

Test plan

Added unit tests and e2e tests

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

N.A.

@ahnpnl ahnpnl requested a review from kulshekhar as a code owner September 4, 2020 15:42
@coveralls
Copy link
Copy Markdown

coveralls commented Sep 4, 2020

Pull Request Test Coverage Report for Build 5816

  • 56 of 58 (96.55%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.001%) to 92.937%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/transformers/path-mapping.ts 56 58 96.55%
Totals Coverage Status
Change from base Build 5808: -0.001%
Covered Lines: 1123
Relevant Lines: 1162

💛 - Coveralls

@ahnpnl ahnpnl merged commit 3325186 into kulshekhar:master Sep 4, 2020
@ahnpnl ahnpnl deleted the path-mapping-transformer branch September 4, 2020 18:27
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