Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 13, 2024 via pnpm

jscodeshift 0.15.0

A toolkit for JavaScript codemods
Package summary
Share
3
issues
1
high severity
license
1
1
moderate severity
meta
1
1
low severity
license
1
7
licenses
112
MIT
17
ISC
1
Apache-2.0
4
other licenses
CC-BY-4.0
1
BSD-2-Clause
1
BSD-3-Clause
1
0BSD
1
Package created
25 Mar 2015
Version published
7 May 2023
Maintainers
5
Total deps
134
Direct deps
19
License
MIT

Issues

3

1 high severity issue

high
Recommendation: Read and validate the license terms
via: @babel/core@7.24.4 & others
Collapse
Expand

1 moderate severity issue

moderate
via: babel-core@7.0.0-bridge.0
Collapse
Expand

1 low severity issue

low
Recommendation: Read and validate the license terms
via: @babel/core@7.24.4 & others
Collapse
Expand

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
112 Packages, Including:
@babel/code-frame@7.24.2
@babel/compat-data@7.24.4
@babel/core@7.24.4
@babel/generator@7.24.4
@babel/helper-annotate-as-pure@7.22.5
@babel/helper-compilation-targets@7.23.6
@babel/helper-create-class-features-plugin@7.24.4
@babel/helper-environment-visitor@7.22.20
@babel/helper-function-name@7.23.0
@babel/helper-hoist-variables@7.22.5
@babel/helper-member-expression-to-functions@7.23.0
@babel/helper-module-imports@7.24.3
@babel/helper-module-transforms@7.23.3
@babel/helper-optimise-call-expression@7.22.5
@babel/helper-plugin-utils@7.24.0
@babel/helper-replace-supers@7.24.1
@babel/helper-simple-access@7.22.5
@babel/helper-skip-transparent-expression-wrappers@7.22.5
@babel/helper-split-export-declaration@7.22.6
@babel/helper-string-parser@7.24.1
@babel/helper-validator-identifier@7.22.20
@babel/helper-validator-option@7.23.5
@babel/helpers@7.24.4
@babel/highlight@7.24.2
@babel/parser@7.24.4
@babel/plugin-proposal-class-properties@7.18.6
@babel/plugin-proposal-nullish-coalescing-operator@7.18.6
@babel/plugin-proposal-optional-chaining@7.21.0
@babel/plugin-syntax-flow@7.24.1
@babel/plugin-syntax-jsx@7.24.1
@babel/plugin-syntax-nullish-coalescing-operator@7.8.3
@babel/plugin-syntax-optional-chaining@7.8.3
@babel/plugin-syntax-typescript@7.24.1
@babel/plugin-transform-flow-strip-types@7.24.1
@babel/plugin-transform-modules-commonjs@7.24.1
@babel/plugin-transform-typescript@7.24.4
@babel/preset-flow@7.24.1
@babel/preset-typescript@7.24.1
@babel/register@7.23.7
@babel/template@7.24.0
@babel/traverse@7.24.1
@babel/types@7.24.0
@jridgewell/gen-mapping@0.3.5
@jridgewell/resolve-uri@3.1.2
@jridgewell/set-array@1.2.1
@jridgewell/sourcemap-codec@1.4.15
@jridgewell/trace-mapping@0.3.25
ansi-styles@3.2.1
ansi-styles@4.3.0
ast-types@0.16.1

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
17 Packages, Including:
electron-to-chromium@1.4.736
fs.realpath@1.0.0
glob@7.2.3
graceful-fs@4.2.11
inflight@1.0.6
inherits@2.0.4
lru-cache@5.1.1
minimatch@3.1.2
once@1.4.0
picocolors@1.0.0
rimraf@2.6.3
semver@5.7.2
semver@6.3.1
signal-exit@3.0.7
wrappy@1.0.2
write-file-atomic@2.4.3
yallist@3.1.1

Apache License 2.0

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
use-patent-claims
place-warranty
Cannot
hold-liable
use-trademark
Must
include-copyright
include-license
state-changes
include-notice
1 Packages, Including:
@ampproject/remapping@2.3.0

Creative Commons Attribution 4.0 International

Uncategorized
Not OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
Cannot
Must
1 Packages, Including:
caniuse-lite@1.0.30001609

BSD 2-Clause "Simplified" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
esprima@4.0.1

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
source-map@0.6.1

BSD Zero Clause License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
include-copyright
include-license
include-original
Cannot
hold-liable
Must
1 Packages, Including:
tslib@2.6.2
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

19
All Dependencies CSV
β“˜ This is a list of jscodeshift 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
@babel/core7.24.4763.3 kBMIT
prod peer
1
1
@babel/parser7.24.41.8 MBMIT
prod
@babel/plugin-proposal-class-properties7.18.61.64 kBMIT
prod
1
1
@babel/plugin-proposal-nullish-coalescing-operator7.18.61.96 kBMIT
prod
1
1
@babel/plugin-proposal-optional-chaining7.21.08.85 kBMIT
prod
1
1
@babel/plugin-transform-modules-commonjs7.24.141.43 kBMIT
prod
1
1
@babel/preset-flow7.24.18.86 kBMIT
prod
1
1
@babel/preset-typescript7.24.120.98 kBMIT
prod
1
1
@babel/register7.23.717.36 kBMIT
prod
1
1
babel-core7.0.0-bridge.0864 BMIT
prod
1
1
1
chalk4.1.211.31 kBMIT
prod
flow-parser0.233.0708.72 kBMIT
prod
graceful-fs4.2.119.57 kBISC
prod
micromatch4.0.514.09 kBMIT
prod
neo-async2.6.237.74 kBMIT
prod
node-dir0.1.176.29 kBMIT
prod
recast0.23.6239.37 kBMIT
prod
temp0.8.45.74 kBMIT
prod
write-file-atomic2.4.34.39 kBISC
prod

Visualizations

Frequently Asked Questions

What does jscodeshift do?

jscodeshift is a toolkit designed specifically for running codemods across multiple JavaScript or TypeScript files. Essentially, it aids in bulk modification of JavaScript code. Two key features that jscodeshift delivers include a runner, which executes the provided transformation for each file passed to it and a wrapper around Recast, thereby facilitating AST-to-AST code transformation.

How do you use jscodeshift?

Using jscodeshift is simple. A global installation through npm is required first:

$ npm install -g jscodeshift

Once installed, you can run the jscodeshift runner via the CLI with multiple options for customization. For instance, to run a transform, you use the -t or --transform option followed by the path to the transform file:

$ jscodeshift -t myTransform.js path-to-your-source-files

If you want to run jscodeshift programmatically in a JS file, the following code can be used as an example:

const {run: jscodeshift} = require('jscodeshift/src/Runner');
const path = require('node:path');

const transformPath = path.resolve('transform.js')
const paths = ['foo.js', 'bar.js'];
const options = {
  dry: true,
  print: true,
  verbose: 1,
  // other options...
};

const response = await jscodeshift(transformPath, paths, options);
console.log(response);

In this code example, transformPath is the path to your JavaScript code transformation script, paths is an array of file paths you want to transform, and options is a object for optional parameters.

Where are the jscodeshift docs?

The documentation for jscodeshift can be found on the project's GitHub page here. The README in the repository provides a comprehensive guide to using jscodeshift, including installation, CLI usage, JS usage, and the jscodeshift API. Users can also find a guide on extending jscodeshift with their own functionalities. Local documentation server can be run using npm run docs and viewed using npx http-server ./docs.