-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Reusing AST nodes can result in subtle bugs, for example [this issue](#3856) is caused by AST node reuse breaking [memoization](https://github.com/babel/babel/blob/main/packages/babel-helper-module-transforms/src/rewrite-live-references.ts#L275-L276) in the `babel/plugin-transform-modules-commonjs` plugin. The first commit here introduces [babel/helper-check-duplicated-nodes](https://github.com/babel/babel/tree/main/packages/babel-helper-check-duplicate-nodes) which breaks a number of tests. The second commit fixes those tests. Fixes #3856. Pull Request resolved: #4309 Reviewed By: voideanvalue Differential Revision: D45750523 Pulled By: captbaritone fbshipit-source-id: 7b962a4fed309a1cc85e00fc6a9d0442d2bcd8e2
- Loading branch information
1 parent
d1dfe1f
commit 39ebc1c
Showing
4 changed files
with
32 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters