Observed since 20 Oct, 20:40 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
5to6-codemod
A collection of codemods that allow you to transform your js code from ES5 to ES6.
A collection of codemods that allow you to transform your JavaScript code from ES5 to ES6 using jscodeshift.
npm install -g jscodeshiftnpm install 5to6-codemodjscodeshift -t node_modules/5to6-codemod/transforms/[transform].js [files]git diff. Keep what you want, throw it out if you don't. Magic!When executing codemods, you can configure options like so:
jscodeshift -t node_modules/5to6-codemod/transforms/[transform].js [files] --key=value
Our transforms will automatically distinguish and pass through Recast config keys via jscodeshift. Official documentation for Recast's configuration can be found here. We currently support the following Recast keys:
esprimainputSourceMaplineTerminatorquoterangereuseWhitespacesourceFileNamesourceMapNamesourceRoottabWidthtoleranttrailingCommauseTabswrapColumnamd - Transforms AMD style modules to ES6 import/exportcjs - Transforms CommonJS style require() calls to ES6 import statements
hoist: Enables hoisting require statements to the topno-strict - Removes "use strict" statementsexports - Move CommonJS style module.exports statements to ES6 export statementsnamed-export-generation - Adds named exports corresponding to default export object keys. Only valid for ES6 modules exporting an object as the default export.let - Replace all var calls to use letsimple-arrow - Replace all function expressions with a body of a sole return statement into arrow functionsimport * as varName.simple-arrow loses comments in the function expression bodyDownload counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
jscodeshiftEnvironment{
"local_name": "jscodeshift",
"alias": false,
"peer_metadata": null
} | ^0.3.28 | runtime |
lodashEnvironment{
"local_name": "lodash",
"alias": false,
"peer_metadata": null
} | ^4.17.4 | runtime |
recastEnvironment{
"local_name": "recast",
"alias": false,
"peer_metadata": null
} | ^0.12.1 | runtime |
eslintEnvironment{
"local_name": "eslint",
"alias": false,
"peer_metadata": null
} | ^1.0.0 | development |
mochaEnvironment{
"local_name": "mocha",
"alias": false,
"peer_metadata": null
} | ^2.3.3 | development |
Source distribution
{
"integrity": "sha512-Nako5nAiihHQbnto9sIfD8OD2NLCEeciQph5y3DxrhbNpzUCdidEDRp/9XoczYPEO0hroAK/oQrikOY64/sBzw==",
"shasum": "61866c336f2c6ef5505eb9b7a12d825ef44aeb99",
"tarball": "https://registry.npmjs.org/5to6-codemod/-/5to6-codemod-1.7.1.tgz",
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEQCIBGZ/6ufuYR/sjPd+pwrYe/SAbYCOR6IerXzoucxzZgsAiBc6z2HdAREoIxhtvUemrZ/hcpim27HPbwwvGPFpqPKeQ=="
}
]
}Observed since 20 Oct, 20:40 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:afa075e519f1c8916eb68994a7ea7be0bb86d1069ec0d8014b60a1adcc10509d