Automatically upgrades JavaScript and TypeScript syntax to modern ECMAScript features based on browser support, using npx on files, directories, or stdin.
Keeping your JavaScript and TypeScript code up to date with full browser compatibility.
Sponsors
Usage
esupgrade is safe and meant to be used automatically on your codebase.
We recommend integrating it into your development workflow using [pre-commit], [husky], or as an agent skill.
CLI
To try it out on a repository without writing changes, run:
esupgrade is available as a skill in [Claude Code]. To use it:
Run /plugin marketplace add codingjoe/esupgrade
Run /plugin install esupgrade@esupgrade
The skill will analyze your selected code and suggest transformations based on the Baseline browser support policy.
Browser Support & Baseline
All transformations are based on [Web Platform Baseline][baseline] features. Baseline tracks which web platform features are safe to use across browsers.
By default, esupgrade uses widely available features, meaning they work in all major browsers (Chrome, Edge, Safari, Firefox) for at least 30 months. This ensures full compatibility while keeping your code modern.
You can opt into newly available features (available in all browsers for 0-30 months) with:
npx esupgrade --baseline newly-available <files>
For more information about Baseline browser support, visit [web.dev/baseline][baseline].
Supported File Types & Languages
.js - JavaScript
.jsx - React/JSX
.ts - TypeScript
.tsx - TypeScript with JSX
.mjs - ES Modules
.cjs - CommonJS
Transformations
Widely available
var → [const][mdn-const] & [let][mdn-let]
-var x = 1;
-var y = 2;
-y = 3;
+const x = 1;
+let y = 2;
+y = 3;
AI-powered upgrade intelligence platform. Multi-agent council analyzes your codebase across 8 dimensions, produces confidence-scored suggestions with visual impact heatmaps, upgrade roadmaps, framework-specific deep dives, and before/after impact previews. Features innovation radar, tech debt forecasting, and coordinated upgrade bundles.