Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port babel-parser changes from 2022-03-06 to 2022-04-29 (alangpierce#717
) Instructions: https://github.com/alangpierce/sucrase/wiki/Porting-changes-from-Babel's-parser 4bb9b89b2d Remove length restriction from JSX entities, and ignore `Object.prototype` (#14327) ✅ Fixed prototype issue by switching to Map. Fixed length restriction by porting code in a similar way. 9ba894c123 Type-safe ParseErrors (#14320) 🚫 Appears to only affect error handling, so not relevant to Sucrase. 24f0944e2d Report single error for invalid num seps in unicode escapes (#14338) 🚫 Only affects error handling. bae5027844 Allow variable and function with the same name in static blocks (#14344) 🚫 Already worked in Sucrase, and Sucrase never does this type of checking, so doesn't seem useful to add a test. 983f707611 move static-block and private-in tests to es2022 (#14346) 🚫 Babel-internal change. 4f1617cdd0 v7.17.7 🚫 Release only. 01380a61f1 Allow keywords in TS qualified types (#14362) 🚫 Fixes regression that didn't happen in Sucrase. 4392e4f69f Defer `<T>() => {}` TSX error to Babel 8 (#14367) 🚫 Only affects error handling. Sucrase handles this syntax without the trailing comma. 1a58c7ed6a v7.17.8 🚫 Release only. cb74c3772e refactor: replace deprecated String.prototype.substr() (#14377) 🚫 Already done in Sucrase. c79709a669 Parenthesize non-simple decorator expression (#14378) 🚫 Only affects paren parsing, which Sucrase doesn't need to handle. 326c4208fc fix: parse type parameters with inType context (#14384) ✅ Fixed by switching tokenizing approach to be more similar to Babel. We now always treat > as greater-than in a type context and rescan if necessary after an `as` operator. The original fix from this PR was unnecessary because type aliases already are in a type context. 84336bb184 Merge `babel-check-duplicated-nodes` into monorepo (#14420) 🚫 Internal Babel change that doesn't affect Sucrase. 7a473ed0c6 Restore numeric seaprators support in `@babel/standalone` (#14427) 🚫 Fix for regression that didn't happen in Sucrase. 3c762e876d v7.17.9 🚫 Release only. 99842ace6e chore: correct typos (#14440) 🚫 These typos aren't present in Sucrase. df5c1ebb45 Add missing `startColumn` to `ParserOptions` type definition (#14453) 🚫 Only affects type definitions. 09b335ad5d v7.17.10 🚫 Release only. c90add779a Provide plugin/preset typings from plugin-utils (#14499) 🚫 Only affects types for the Babel project.
- Loading branch information