@putout/operate
Advanced tools
Comparing version 8.14.0 to 8.15.0
@@ -6,5 +6,13 @@ 'use strict'; | ||
module.exports.rename = (path, from, to) => { | ||
path.scope.rename(from, to); | ||
renameProperty(path, from, to); | ||
const bindings = path.scope.getAllBindings(); | ||
const bindingCurrent = bindings[from]; | ||
if (!bindingCurrent) | ||
return; | ||
const bindingPath = bindings[from].path; | ||
bindingPath.scope.rename(from, to); | ||
renameProperty(bindingPath, from, to); | ||
}; | ||
{ | ||
"name": "@putout/operate", | ||
"version": "8.14.0", | ||
"version": "8.15.0", | ||
"type": "commonjs", | ||
@@ -37,2 +37,4 @@ "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", | ||
"devDependencies": { | ||
"@putout/plugin-minify": "*", | ||
"@putout/plugin-remove-unreferenced-variables": "*", | ||
"c8": "^7.5.0", | ||
@@ -39,0 +41,0 @@ "eslint": "^8.0.1", |
19926
402
14