@putout/plugin-nodejs 4.6.0 → 4.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -75,7 +75,7 @@ module.exports.traverse = ({push, listStore}) => ({
|
|
|
75
75
|
if (!lastRequire.node.loc)
|
|
76
76
|
return;
|
|
77
77
|
|
|
78
|
-
const lastRequireLine = lastRequire.node.loc.
|
|
78
|
+
const lastRequireLine = lastRequire.node.loc.end.line;
|
|
79
79
|
|
|
80
80
|
for (const path of constPaths) {
|
|
81
81
|
const {loc} = path.node;
|
|
@@ -117,6 +117,8 @@ function getReferenceLine(path) {
|
|
|
117
117
|
if (!referencePaths.length)
|
|
118
118
|
return Infinity;
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
const [firstReference] = referencePaths;
|
|
121
|
+
|
|
122
|
+
return firstReference.node.loc.start.line;
|
|
121
123
|
}
|
|
122
124
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/plugin-nodejs",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.3",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "🐊Putout plugin adds ability to transform code to new API of Node.js",
|