@putout/plugin-nodejs 18.8.0 → 18.8.1
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.
|
@@ -8,7 +8,7 @@ const {
|
|
|
8
8
|
isObjectExpression,
|
|
9
9
|
isStringLiteral,
|
|
10
10
|
isImportDefaultSpecifier,
|
|
11
|
-
|
|
11
|
+
exportNamespaceSpecifier,
|
|
12
12
|
} = types;
|
|
13
13
|
|
|
14
14
|
const {replaceWith} = operator;
|
|
@@ -107,7 +107,10 @@ function addExportToBinding(name, path) {
|
|
|
107
107
|
if (isImportDefaultSpecifier(bindingPath)) {
|
|
108
108
|
const {local} = bindingPath.node;
|
|
109
109
|
const {source} = bindingPath.parentPath.node;
|
|
110
|
-
const
|
|
110
|
+
const specifiers = [
|
|
111
|
+
exportNamespaceSpecifier(local),
|
|
112
|
+
];
|
|
113
|
+
const exportNode = exportNamedDeclaration(null, specifiers, source);
|
|
111
114
|
|
|
112
115
|
replaceWith(bindingPath.parentPath, exportNode);
|
|
113
116
|
return '';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/plugin-nodejs",
|
|
3
|
-
"version": "18.8.
|
|
3
|
+
"version": "18.8.1",
|
|
4
4
|
"type": "module",
|
|
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",
|