jscodeshift
Advanced tools
Comparing version 0.11.0 to 0.12.0
@@ -0,0 +0,0 @@ #!/usr/bin/env node |
@@ -7,2 +7,7 @@ # Changelog | ||
## [0.12.0] 2021-04-21 | ||
### Changed | ||
- Allow transform to be a Promise (#237, @rektide) | ||
- Support newer TypeScript syntax by upgrading to newer Babel parser (#410, @wdoug and @mfeckie) | ||
## [0.11.0] 2020-09-01 | ||
@@ -39,6 +44,6 @@ ### Changed | ||
### Fixed | ||
- Don't throw an error when jscodeshift processes an empty set of files (#295, | ||
- Don't throw an error when jscodeshift processes an empty set of files (#295, | ||
@skovhus). | ||
- `renameTo` should not rename class properties (#296, @henryqdineen). | ||
- Custom/unknown CLI parameters are parsed as JSON, just like nomnom used to | ||
- Custom/unknown CLI parameters are parsed as JSON, just like nomnom used to | ||
do. | ||
@@ -49,11 +54,11 @@ | ||
### Changed | ||
- `@babel/register`/`@babel/preset-env` is configured to not transpile any | ||
language features that the running Node process supports. That means if you use | ||
features in your transform code supported by the Node version you are running, | ||
- `@babel/register`/`@babel/preset-env` is configured to not transpile any | ||
language features that the running Node process supports. That means if you use | ||
features in your transform code supported by the Node version you are running, | ||
they will be left as is. Most of ES2015 is actually supported since Node v6. | ||
- Do not transpile object rest/spread in transform code if supported by running | ||
- Do not transpile object rest/spread in transform code if supported by running | ||
Node version. | ||
### Fixed | ||
- Presets and plugins passed to `@babel/register` are now properly named and | ||
- Presets and plugins passed to `@babel/register` are now properly named and | ||
loaded. | ||
@@ -64,13 +69,13 @@ | ||
### Added | ||
- Tranform files can be written in Typescript. If the file extension of the | ||
transform file is `.ts` or `.tsx`, `@babel/preset-typescript` is used to | ||
convert them. This requires the `--babel` option to be set (which it is by | ||
- Tranform files can be written in Typescript. If the file extension of the | ||
transform file is `.ts` or `.tsx`, `@babel/preset-typescript` is used to | ||
convert them. This requires the `--babel` option to be set (which it is by | ||
default). ( #287 , @brieb ) | ||
### Changed | ||
- The preset and plugins for converting the transform file itself via babeljs | ||
have been updated to work with babel v7. This included removing | ||
`babel-preset-es2015` and `babel-preset-stage-1` in favor of | ||
`@babel/preset-env`. Only `@babel/proposal-class-properties` and | ||
`@babel/proposal-object-rest-spread` are enabled as experimental features. If | ||
- The preset and plugins for converting the transform file itself via babeljs | ||
have been updated to work with babel v7. This included removing | ||
`babel-preset-es2015` and `babel-preset-stage-1` in favor of | ||
`@babel/preset-env`. Only `@babel/proposal-class-properties` and | ||
`@babel/proposal-object-rest-spread` are enabled as experimental features. If | ||
you want to use other's in your transform file, please create a PR. | ||
@@ -82,3 +87,3 @@ | ||
### Bumped | ||
- `micromatch` => v3.1.10, which doesn't (indirectly) depend on `randomatic` < | ||
- `micromatch` => v3.1.10, which doesn't (indirectly) depend on `randomatic` < | ||
v3 anymore (see #292). |
# Code of Conduct | ||
Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://code.facebook.com/codeofconduct) so that you can understand what actions will and will not be tolerated. |
@@ -0,0 +0,0 @@ # Contributing to jscodeshift |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -148,3 +148,3 @@ | ||
function(file, callback) { | ||
fs.readFile(file, function(err, source) { | ||
fs.readFile(file, async function(err, source) { | ||
if (err) { | ||
@@ -158,3 +158,3 @@ updateStatus('error', file, 'File error: ' + err); | ||
const jscodeshift = prepareJscodeshift(options); | ||
const out = transform( | ||
const out = await transform( | ||
{ | ||
@@ -161,0 +161,0 @@ path: file, |
@@ -0,0 +0,0 @@ |
{ | ||
"name": "jscodeshift", | ||
"version": "0.11.0", | ||
"version": "0.12.0", | ||
"description": "A toolkit for JavaScript codemods", | ||
@@ -12,3 +12,2 @@ "repository": { | ||
"scripts": { | ||
"prepare": "cp -R src/ dist/", | ||
"test": "jest --bail", | ||
@@ -26,12 +25,13 @@ "docs": "rm -rf docs && jsdoc -d docs -R README.md src/collections/* src/core.js src/Collection.js" | ||
"author": "Felix Kling", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@babel/core": "^7.1.6", | ||
"@babel/parser": "^7.1.6", | ||
"@babel/plugin-proposal-class-properties": "^7.1.0", | ||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.1.0", | ||
"@babel/plugin-proposal-optional-chaining": "^7.1.0", | ||
"@babel/plugin-transform-modules-commonjs": "^7.1.0", | ||
"@babel/preset-flow": "^7.0.0", | ||
"@babel/preset-typescript": "^7.1.0", | ||
"@babel/register": "^7.0.0", | ||
"@babel/core": "^7.13.16", | ||
"@babel/parser": "^7.13.16", | ||
"@babel/plugin-proposal-class-properties": "^7.13.0", | ||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.13.8", | ||
"@babel/plugin-proposal-optional-chaining": "^7.13.12", | ||
"@babel/plugin-transform-modules-commonjs": "^7.13.8", | ||
"@babel/preset-flow": "^7.13.13", | ||
"@babel/preset-typescript": "^7.13.0", | ||
"@babel/register": "^7.13.16", | ||
"babel-core": "^7.0.0-bridge.0", | ||
@@ -44,3 +44,3 @@ "colors": "^1.1.2", | ||
"node-dir": "^0.1.17", | ||
"recast": "^0.20.3", | ||
"recast": "^0.20.4", | ||
"temp": "^0.8.1", | ||
@@ -47,0 +47,0 @@ "write-file-atomic": "^2.3.0" |
@@ -36,2 +36,3 @@ | ||
'optionalChaining', | ||
['decorators', {decoratorsBeforeExport: false}], | ||
], | ||
@@ -38,0 +39,0 @@ }; |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ # jscodeshift [![Build Status](https://travis-ci.org/facebook/jscodeshift.svg?branch=master)](https://travis-ci.org/facebook/jscodeshift) |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -148,3 +148,3 @@ | ||
function(file, callback) { | ||
fs.readFile(file, function(err, source) { | ||
fs.readFile(file, async function(err, source) { | ||
if (err) { | ||
@@ -158,3 +158,3 @@ updateStatus('error', file, 'File error: ' + err); | ||
const jscodeshift = prepareJscodeshift(options); | ||
const out = transform( | ||
const out = await transform( | ||
{ | ||
@@ -161,0 +161,0 @@ path: file, |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
246910
72
7140
65
2
2
1
4
16
10
Updated@babel/core@^7.13.16
Updated@babel/parser@^7.13.16
Updated@babel/plugin-proposal-nullish-coalescing-operator@^7.13.8
Updated@babel/preset-flow@^7.13.13
Updated@babel/register@^7.13.16
Updatedrecast@^0.20.4