jscodeshift
Reasonable, with limits. 7th of 9 JavaScript parsers and codemods.
jscodeshift is the long-standing codemod runner from Meta. It wraps Recast and gives you a jQuery-like API for finding and rewriting JavaScript and TypeScript syntax trees. It still works and many framework migration codemods use it, but maintenance is minimal and faster or type-aware tools such as ast-grep and ts-morph are gaining ground, so it is a reasonable choice for new work rather than a clear first pick.
Best for: Teams writing syntax-level migration codemods in JavaScript that need small, format-preserving diffs and want a mature, well-documented pattern.
Scores
Overall6.4
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 5.5, likely 4.5 to 6.5
jscodeshift still does its job well for syntax-level JS/TS migrations with small, format-preserving diffs, and many examples exist. Maintenance is thin and its share is shrinking. Peers do parts of the job better: ast-grep for speed and simple rewrites, ts-morph for type-aware changes. It remains a reasonable but not leading choice for new codemods.
- npm downloads ratio: 1.47x vs 4.1x median
- github.com/facebook/jscodeshift/issues/587: Thin maintenance
- pkgpulse.com/guides/recast-vs-jscodeshift-vs-ts-morph-codemods-code-2026: Still recommended for syntax-level migrations
GPT-6.2 Sol: 7.2, likely 6.1 to 8.3
jscodeshift is a strong choice for custom migrations that benefit from ordinary JavaScript logic and formatting-preserving output. Ast-grep is a better first choice for simple structural rewrites, and ts-morph is better when a change must follow TypeScript symbols across files. A slow release cadence and below-median download growth lower confidence in its long-term position.
- voxgig.com/howto/jscodeshift-codemod-across-generated-files: Compares the three tools on a concrete TypeScript rewrite.
- github.com/mui/mui-x/blob/master/packages/x-codemod/README.md: A current framework migration uses jscodeshift.
- github commitsLastYear, npm versionsLastYear, npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, medianDownloadsRatio: Light release activity and growth below the catalog median.
Needed by many4.2
How many developers need a tool for this job?
Claude Opus 5.5: 4.0, likely 3.0 to 5.0
Many developers run a codemod now and then, but few write their own. Writing codemods is a clear niche, mostly for library authors and teams that maintain large codebases. jscodeshift covers JS, TS and JSX, but not other languages.
- martinfowler.com/articles/codemods-api-refactoring.html: Codemods are used for API migrations at scale
- dependents repos: 154,569 repos depend on it, largely through framework codemod tools
GPT-6.2 Sol: 4.3, likely 3.2 to 5.6
The tool covers JavaScript, JSX, and TypeScript across frameworks. Authoring AST transforms is mostly an occasional job for teams doing upgrades or repeated refactors. State of JavaScript shows why TypeScript support matters, but provides no direct estimate of how many teams author codemods.
- jscodeshift.com/overview/introduction: Describes the multi-file JavaScript and TypeScript workflow.
- 2025.stateofjs.com/en-US/usage: Measures widespread TypeScript use among respondents.
Helps a lot6.9
How well does it do the job for those who need it?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
It is a mature, capable toolkit: a collection API, a parallel CLI, format-preserving output through Recast, and test utilities. Its limits are clear. It only works on syntax, it is slow on big repos, and it ships no bundled types. ast-grep is faster for pattern rewrites, and ts-morph is better when a change needs type information.
- pkgpulse.com/guides/recast-vs-jscodeshift-vs-ts-morph-codemods-code-2026: Recommended for syntax-level migrations; cannot resolve cross-file references
- dev.to/herrington_darkholme/how-fast-is-your-code-search-tool-a-benchmark-of-five-ast-tools-590j: Benchmark: ast-grep 43 ms vs jscodeshift 754 ms
- npm hasTypes: No bundled types
GPT-6.2 Sol: 7.7, likely 6.5 to 8.7
Version 17.4.0 combines a flexible collection API, formatting-preserving output, and a runner with dry runs and fixture tests. A third-party comparison found ast-grep faster for a simple rewrite and showed how ts-morph can follow a specific TypeScript symbol across files. Separate types and reported printer quirks add friction. Examples and fixtures give coding agents a way to check their work, while evidence on agent accuracy is limited.
- github.com/meta/jscodeshift: Documents parser choices, CLI flags, and fixture test helpers.
- voxgig.com/howto/jscodeshift-codemod-across-generated-files: Tests 17.4.0 against ast-grep and ts-morph on a TypeScript rename.
- github.com/meta/jscodeshift/issues/688: A user reports unexpected newlines when inserting an inline comment.
- npm hasTypes: The npm package ships without bundled declarations.
- raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/master/types/jscodeshift/package.json: DefinitelyTyped maintains the separate declarations.
Holds up over time5.0
Will it still be a good choice in two years?
Claude Opus 5.5: 4.0, likely 3.0 to 5.0
Activity is low: 15 commits last year, no GitHub release since March 2025, and only one npm version (17.4.0, July 2026). Meta has no active maintainers, and the Codemod team's planned TypeScript rewrite has not appeared. That team now promotes jssg, built on ast-grep, as the successor. The project is not archived, and so many tools depend on it that it is likely to keep getting basic upkeep.
- github.com/facebook/jscodeshift/issues/587: 2024: no active Meta maintainers; Codemod team added
- github commitsLastYear: 15 commits, 0 GitHub releases in the last year
- codemod-aldn7on1f-codemod.vercel.app/blog/jssg: Codemod presents jssg as the successor to jscodeshift
- github.com/facebook/jscodeshift/releases: Recent releases are mostly Recast bumps
GPT-6.2 Sol: 5.9, likely 4.5 to 7.2
The project made 15 commits and published one npm version in the past year. July's 17.4.0 added collection iteration and fixed an ignore-pattern bug, while GitHub Releases still lists 17.3.0. The last public maintenance plan named community maintainers, and longstanding open reports leave future fix cadence and maintainer capacity uncertain.
- github commitsLastYear, github openIssues, github openPullRequests, npm versionsLastYear, npm latestPublishedAt: 15 commits, 123 open issues, 44 open PRs, and one npm version.
- raw.githubusercontent.com/meta/jscodeshift/main/CHANGELOG.md: Documents the two changes shipped in 17.4.0.
- github.com/meta/jscodeshift/releases: GitHub Releases still shows 17.3.0 as latest.
- github.com/meta/jscodeshift/issues/587: The 2024 maintenance plan added the Codemod team as maintainers.
- github.com/meta/jscodeshift/issues/650: A February 2025 report about moved JSDoc remains open.
Used widely6.2
How many use it, and is that growing?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
It has about 31.7M downloads per 4 weeks and 154k dependent repos, but much of that comes in through framework codemod CLIs rather than direct choice. Downloads grew 1.47x in a year, far below the 4.1x median, so it is losing share. ast-grep and ts-morph are growing much faster.
- npm downloadsLast4Weeks: 31.7M, up from 21.6M a year ago (1.47x vs 4.1x median)
- dependents repos: 154,569 repos, 2,185 packages
- peers ast-grep / ts-morph: Peers grew about 9x and 6.7x
- bluesky posts: 0 posts, little current attention
GPT-6.2 Sol: 6.4, likely 5.2 to 7.6
ecosyste.ms found about 155,000 dependent repositories, ahead of ts-morph and behind Recast. Four-week downloads rose from 21.6 million to 31.7 million, but the 1.47× ratio trails the 4.1× catalog median and growth at ast-grep and ts-morph. Framework tooling accounts for some installs, and incomplete dependency coverage leaves direct adoption uncertain.
- dependents repos, dependents packages, github stars: 154,569 repositories, 2,185 npm packages, and 10,050 stars.
- npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, medianDownloadsRatio: Downloads rose 47%, well below the catalog's median growth.
- peers Recast, peers ts-morph, peers ast-grep: Recast has more tracked dependents, and ts-morph and ast-grep grew faster.
- github.com/vercel/next.js/blob/canary/packages/next-codemod/package.json: Next.js upgrade tooling installs jscodeshift as a dependency.
Vouched for7.0
Who stands behind it being good?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
Its record in production is long. Framework codemods such as those from Next.js and Storybook have run on it, and independent write-ups like Martin Fowler's 2025 article use it as the reference tool. Current attention is low, though: no HN or Bluesky activity, and recent comparisons favour newer tools for speed or type awareness.
- martinfowler.com/articles/codemods-api-refactoring.html: 2025 independent article built on jscodeshift
- ast-grep.github.io/advanced/tool-comparison.html: Compared as the established JS codemod tool
- framework codemods: Next.js and Storybook codemod CLIs have used jscodeshift
GPT-6.2 Sol: 8.0, likely 6.8 to 9.0
Next.js and MUI X ship upgrade tooling built on jscodeshift, and AWS used it for its JavaScript SDK migration. A third party tested the current release and found it useful for custom rewrites where formatting matters. These are concrete uses, though most framework evidence concerns upgrade scripts and broad satisfaction data is unavailable.
- github.com/vercel/next.js/blob/canary/packages/next-codemod/package.json: Vercel's current codemod package depends on jscodeshift 17.0.0.
- github.com/mui/mui-x/blob/master/packages/x-codemod/README.md: MUI X uses jscodeshift for its v9 migration scripts.
- raw.githubusercontent.com/aws/aws-sdk-js-codemod/main/package.json: AWS's SDK v2-to-v3 migration package uses jscodeshift.
- voxgig.com/howto/jscodeshift-codemod-across-generated-files: A third-party walkthrough verifies a working migration on 17.4.0.
Safe7.0
How safe is it to depend on?
Claude Opus 5.5: 7.0, likely 5.0 to 8.0
It has no OSV advisories and an MIT licence. It is usually a dev-time tool, which limits exposure. It pulls in 18 dependencies, has no Scorecard data, and only a few people publish it, which keeps the score from going higher.
- advisories total: 0 advisories
- npm dependencies: 18 direct dependencies
- scorecard: No Scorecard data
- github.com/facebook/jscodeshift/releases: Replaced colors with chalk after a vulnerability
GPT-6.2 Sol: 6.9, likely 5.6 to 8.1
The package is MIT-licensed, and OSV lists zero advisories against it. It has 18 direct dependencies, and its tmp version range allows older affected versions as well as the patched 0.2.7. GitHub Actions defines a test-gated publishing workflow, and npm lists three collaborators. The missing Scorecard and unverified provenance for 17.4.0 leave uncertainty about release controls.
- npm license, npm dependencies, advisories total, scorecard: MIT, 18 direct dependencies, zero package advisories, and no Scorecard.
- raw.githubusercontent.com/meta/jscodeshift/main/package.json: Declares tmp at ^0.2.3.
- github.com/raszi/node-tmp/security/advisories/GHSA-7c78-jf6q-g5cm: The tmp maintainer lists 0.2.7 as the patched version.
- raw.githubusercontent.com/meta/jscodeshift/main/.github/workflows/push.yml: The Changesets publishing job depends on the test job.
- npmjs.com/package/jscodeshift?activeTab=code: The registry lists three collaborators.
Good
- Recast keeps the original formatting and comments, so diffs stay small and easy to review.
- The CLI runs transforms in parallel over many files, and test helpers such as defineInlineTest make transforms easy to test.
- Many existing codemods, examples and AI-agent guides use it, so agents write working transforms for it fairly reliably.
- No known advisories and a permissive MIT licence.
Bad
- It only sees syntax, one file at a time. It has no type information and no cross-file renames, which ts-morph offers.
- It is much slower and uses more memory than ast-grep on large codebases.
- Development has slowed: 15 commits and a single npm release in the last year, Meta has no active maintainers, and the planned TypeScript rewrite has not shipped.
- It ships no bundled types (they come from @types/jscodeshift) and pulls in 18 dependencies.
The numbers
- npm downloads, 4 weeks
- 32M +47% in a year
- GitHub stars
- 10k
- Commits, 12 months
- 15
- npm version
- 17.4.0 Jul 2026
- Versions, 12 months
- 1
- Advisories, 24 months
- 0 of 0 ever
- OpenSSF Scorecard
- None
- Licence
- MIT
Read on 21 November 2026 from GitHub (meta/jscodeshift), npm (jscodeshift), OSV and the OpenSSF Scorecard.
JavaScript parsers and codemods
- 8.0Babel parser
- 7.8Oxc parser
- 7.5ast-grep
- 7.1Acorn
- 7.1Recast
- 7.0ts-morph
- 6.4jscodeshift
- 6.3Meriyah
- 2.4Esprima