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

fix: guard against self-referencing element in shouldTranspile #1007

Merged
merged 5 commits into from Feb 8, 2022

Conversation

eduardoboucas
Copy link
Member

Summary

When using NFT, we determine whether an ESM file needs to be transpiled by checking whether all of its parents are also ESM files. We use the reasons object to figure out the parent/child relationships, but we need to account for the fact that the initial file is declared as a parent of itself.

This PR accounts for this case.

@eduardoboucas eduardoboucas added the type: bug code to address defects in shipped code label Feb 8, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2022

⏱ Benchmark results

largeDepsEsbuild: 8s

^    8s   
│   ┌──┐  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
└───┴──┴──>
     T    
Legend
  • T (current commit): 8s

largeDepsZisi: 1m 7.9s

^ 1m 7.9s 
│   ┌──┐  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
└───┴──┴──>
     T    
Legend
  • T (current commit): 1m 7.9s

@kodiakhq kodiakhq bot merged commit 59f3ebd into main Feb 8, 2022
@kodiakhq kodiakhq bot deleted the fix/nft-shouldtranspile-check branch February 8, 2022 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants