facebook/jscodeshift
52.4
Adequate · 2 October 2026
3k
lines of production code
JavaScript
primary language
2
measurements over time
What this system is
This system is jscodeshift, a command-line tool for running codemods that transform JavaScript, TypeScript, and Flow source code. It provides a programmatic API for traversing and modifying Abstract Syntax Trees, including capabilities for managing imports, inserting or replacing nodes, and handling asynchronous transformations. The tool supports modern syntax features and offers a CLI for batch processing files with options for custom parsers and stdin input.
How it got here
2015 — CLI rewrite and modernization
9 changes.
The project underwent a significant modernization, replacing the deprecated nomnom CLI with a custom argument parser and migrating the dependency stack to Babel and modern utilities. This period introduced support for asynchronous transforms and TypeScript parsing, while expanding the Collection API with new import and node management features. Comprehensive test suites were added to cover the new CLI capabilities and core library components, alongside infrastructure updates like the license change and documentation site.
2016–2024 — Parser modernization and documentation overhaul
8 changes.
The project migrated its parser implementation to @babel/parser and flow-parser to support modern JavaScript and TypeScript syntax features. Concurrently, the documentation website was rebuilt using Astro and Starlight to provide structured API and CLI references, while sample transformers and test utilities were expanded to demonstrate these capabilities.
Features
Add Astro-based documentation website
The website directory now uses Astro with the Starlight theme to host documentation for jscodeshift. This introduces a new site structure with content collections for docs (including an introduction, API reference, AST grammar, and CLI guides), a Starlight-powered navigation sidebar, and build commands managed via Yarn. The previous JSHint configuration has been replaced by a strict TypeScript configuration extending Astro's defaults.
website · high confidence
Add reverse-identifiers sample transformer
A new sample transformer has been added to the \sample\ directory that reverses the names of all identifiers in JavaScript code. This example demonstrates how to use jscodeshift to find and modify identifier nodes within a source file.
sample · high confidence
Launch of the Astro-based documentation website
The documentation site has been rebuilt using Astro and the Starlight theme, introducing a new content structure under \website/src/content/docs\. This update adds a dedicated API Reference page detailing jscodeshift's core, traversal, and transformation methods, alongside a comprehensive AST Grammar reference listing all supported node types. The site also includes an updated Introduction and a detailed CLI Reference covering all command-line options, providing a more structured and navigable experience for users building and running codemods.
website/src · high confidence
New utility modules for package resolution and test file management
Added two new utility files: \requirePackage.js\, which resolves and returns metadata for a given package name by traversing the directory tree, and \testUtils.js\, which provides helper functions for creating temporary files and directories during tests. The test utilities specifically use the \tmp\ library for temporary file creation and native \fs.mkdirSync\ with recursive option for directory creation, replacing previous dependencies or implementations.
utils · high confidence
Support for async transforms and TypeScript/TSX parsing
Transforms can now return a Promise, allowing for asynchronous operations during code transformation, and the test utilities have been updated to handle and await these async transforms. Additionally, the tooling now supports parsing and transforming TypeScript (.ts) and TSX (.tsx) files, with dedicated test fixtures demonstrating the correct handling of TypeScript syntax like enums and type annotations.
src · high confidence
Removals
Removal of unused test-preprocess script
The \scripts/test-preprocess.js\ file has been removed from the project. This script previously handled preprocessing for test files by transforming source code using \react-tools\ with Harmony and TypeScript stripping enabled. Its removal indicates that this specific preprocessing step is no longer required for the test suite.
scripts · high confidence
Behavioural changes
CLI rewritten with new argument parser and expanded options
The jscodeshift command-line interface has been completely rewritten to replace the deprecated nomnom library with a custom argument parser. This change introduces several new capabilities: users can now select from multiple parsers (babel, babylon, flow, ts, tsx) via the --parser flag, pass custom configuration to parsers using --parser-config, and run transforms serially in the current process with --run-in-band. The default file extensions now include TypeScript (.ts, .tsx), and the --verbosity flag has been renamed to --verbose. Additionally, the CLI now supports reading file or directory lists from stdin via the --stdin flag, allows ignoring files based on .gitignore patterns with --gitignore, and can return a non-zero exit code on errors with --fail-on-error. The old shell wrapper (jscodeshift.sh) now simply delegates to the new Node.js script (jscodeshift.js).
bin · high confidence
License changed from BSD to MIT and project structure updated
The project license has been updated from BSD to MIT, and the PATENTS file has been removed. The main entry point now loads from the \src\ directory instead of \dist\, and the repository has adopted new configuration files including \.editorconfig\, \.eslintignore\, and \.eslintrc\ (using \@babel/eslint-parser\). Documentation has been refreshed to reflect the new MIT license, updated CLI help text, and the addition of a VSCode debugging setup.
(repo-wide) · high confidence
New import declaration management and enhanced JSX/Node collection capabilities
Users can now manage import statements directly via the new ImportDeclaration collection, which provides methods to insert, find, check for existence, and rename import declarations. The Node collection has been extended to support inserting or replacing multiple nodes at once (arrays) and includes a new remove method for deleting nodes. Additionally, JSXElement traversal now supports filtering children by specific type via childNodesOfType, and the hasAttributes filter correctly handles JSX attributes with omitted boolean values.
src/collections · high confidence
Parser implementation migrated to @babel/parser and flow-parser
The parser module has been rewritten to use @babel/parser (imported from '@babel/parser') for JavaScript, TypeScript, and TSX files, and the dedicated flow-parser library for Flow files. This change introduces a new babel5Compat parser that replicates legacy Babel 5 defaults for backward compatibility, while the standard babylon, ts, tsx, and flow parsers now enable a comprehensive set of experimental and modern syntax features—including decorators, optional chaining, nullish coalescing, numeric separators, and dynamic imports—ensuring the tool can process contemporary codebases that rely on these language capabilities.
parser · high confidence
Test coverage
Added TypeScript test fixtures for identifier reversal; Added comprehensive test suite for core library components; Added sample tests demonstrating jscodeshift test utilities; Added tests for TSX parser configuration; Expanded test coverage for collection APIs and parser migration; Updated test suite infrastructure and added stdin support tests.
Dependencies
jscodeshift v17.4.0: Modernized dependency stack and new documentation site
jscodeshift has been upgraded to version 17.4.0, replacing legacy dependencies like \async\, \lodash\, \nomnom\, and \esprima-fb\ with modern equivalents such as \@babel/core\, \@babel/parser\, \picomatch\, and \neo-async\. The build system now uses Yarn and \@babel/register\ instead of JSX compilation, and the CLI binary has been updated to a JavaScript file. Additionally, a new documentation website has been added in the \/website\ directory, built with Astro and Starlight.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 55 → 52 (-2.7)
- Rubric changed (rubric-2026.09.12 → rubric-2026.09.18) — scores are not directly comparable.
Lenses
- Code Health 62 → 62 (+0.2)
- Architecture 99 → 99 (+0.1)
- Maturity 60 → 60 (+0.0)
- Readiness 50 → 38 (-12.0)
- Security 53 → 61 (+7.4)
- Performance 100 (new)
Resolved (3)
- Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (no pnpm-resolved versions to grade)
- Documentation: no usage examples (README.md)
- Off-boarding risk: anonymized user #1
New (21)
- Medium vulnerability: [GHSA redacted] (yarn.lock)
- Off-boarding risk: anonymized user #1
- Outdated (npm): @astrojs/starlight
- Outdated (npm): @babel/core
- Outdated (npm): @babel/parser
- Outdated (npm): @babel/plugin-transform-class-properties
- Outdated (npm): @babel/plugin-transform-modules-commonjs
- Outdated (npm): @babel/plugin-transform-nullish-coalescing-operator
- Outdated (npm): @babel/plugin-transform-optional-chaining
- Outdated (npm): @babel/plugin-transform-private-methods
- Outdated (npm): @babel/preset-flow
- Outdated (npm): @babel/preset-typescript
- Outdated (npm): @babel/register
- Outdated (npm): astro
- Outdated (npm): flow-parser
- Outdated (npm): picocolors
- Outdated (npm): picomatch
- Outdated (npm): recast
- Outdated (npm): sharp
- Outdated (npm): tmp
- …and 1 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
facebook/jscodeshift was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 2 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit e71f63dba4f60e39944f5ef1e74a36fbdd317e1e — the exact code this score is about.
- Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.