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 Mar 20, 2024 via pnpm

jscodeshift 0.13.1

A toolkit for JavaScript codemods
Package summary
Share
7
issues
5
high severity
license
1
meta
4
1
moderate severity
meta
1
1
low severity
license
1
8
licenses
276
MIT
17
ISC
3
BSD-2-Clause
6
other licenses
BSD-3-Clause
2
Apache-2.0
1
(MIT OR Apache-2.0)
1
CC-BY-4.0
1
+ 1 more
Package created
25 Mar 2015
Version published
10 Jan 2022
Maintainers
5
Total deps
302
Direct deps
20
License
MIT

Issues

7

5 high severity issues

high
Recommendation: Read and validate the license terms
via: @babel/core@7.24.1 & others
via: micromatch@3.1.10
via: micromatch@3.1.10
via: micromatch@3.1.10
via: micromatch@3.1.10
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.1 & 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
276 Packages, Including:
@babel/code-frame@7.24.2
@babel/compat-data@7.24.1
@babel/core@7.24.1
@babel/generator@7.24.1
@babel/helper-annotate-as-pure@7.22.5
@babel/helper-builder-binary-assignment-operator-visitor@7.22.15
@babel/helper-compilation-targets@7.23.6
@babel/helper-create-class-features-plugin@7.24.1
@babel/helper-create-regexp-features-plugin@7.22.15
@babel/helper-define-polyfill-provider@0.6.1
@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.1
@babel/helper-module-transforms@7.23.3
@babel/helper-optimise-call-expression@7.22.5
@babel/helper-plugin-utils@7.24.0
@babel/helper-remap-async-to-generator@7.22.20
@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/helper-wrap-function@7.22.20
@babel/helpers@7.24.1
@babel/highlight@7.24.2
@babel/parser@7.24.1
@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.24.1
@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.24.1
@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.24.1
@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-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2
@babel/plugin-syntax-async-generators@7.8.4
@babel/plugin-syntax-class-properties@7.12.13
@babel/plugin-syntax-class-static-block@7.14.5
@babel/plugin-syntax-dynamic-import@7.8.3
@babel/plugin-syntax-export-namespace-from@7.8.3
@babel/plugin-syntax-flow@7.24.1
@babel/plugin-syntax-import-assertions@7.24.1
@babel/plugin-syntax-import-attributes@7.24.1
@babel/plugin-syntax-import-meta@7.10.4
@babel/plugin-syntax-json-strings@7.8.3
@babel/plugin-syntax-jsx@7.24.1
@babel/plugin-syntax-logical-assignment-operators@7.10.4
@babel/plugin-syntax-nullish-coalescing-operator@7.8.3

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.711
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

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
3 Packages, Including:
esprima@4.0.1
esutils@2.0.3
regjsparser@0.9.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
2 Packages, Including:
source-map@0.5.7
source-map@0.6.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

(MIT OR Apache-2.0)

Permissive
1 Packages, Including:
atob@2.1.2

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.30001599

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

20
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.1762.05 kBMIT
prod peer
1
1
@babel/parser7.24.11.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-env7.24.1144.02 kBMIT
prod peer
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.231.0708.58 kBMIT
prod
graceful-fs4.2.119.57 kBISC
prod
micromatch3.1.1018.81 kBMIT
prod
4
neo-async2.6.237.74 kBMIT
prod
node-dir0.1.176.29 kBMIT
prod
recast0.20.551.07 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.