Use the CLI with npx on files, directories, or standard input:
npx -y esupgrade [--baseline <newly-available|widely-available>] [--check] [--write] <files-or-directories|->
- Use
--checkto preview changes and fail when updates are needed. - Use
-to read from standard input and write the transformed code to standard output. - Use
--writeto apply updates in place for file inputs. - Use
--baselineto choosenewly-availableorwidely-available(default).