@putout/plugin-nodejs 19.2.1 → 19.2.2

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.
@@ -12,19 +12,13 @@ const {entries} = Object;
12
12
  const {parse: parseJson} = JSON;
13
13
  const isString = (a) => typeof a === 'string';
14
14
 
15
- function insert(a, b, {importsEntries, aliasBased}) {
16
- if (aliasBased) {
17
- importsEntries.set(b, a);
18
- return;
19
- }
20
-
15
+ function insert(a, b, {importsEntries}) {
21
16
  importsEntries.set(a, b);
22
17
  }
23
18
 
24
- export const createGetPrivateImports = (importsCache = new Map(), emptyMap = new Map()) => (file, options = {}) => {
19
+ export const createGetPrivateImports = (importsCache = new Map(), emptyMap = new Map()) => (file) => {
25
20
  const filename = getFilename(file);
26
21
  const dir = dirname(filename);
27
- const {aliasBased = false} = options;
28
22
 
29
23
  if (importsCache.has(dir))
30
24
  return importsCache.get(dir);
@@ -58,7 +52,6 @@ export const createGetPrivateImports = (importsCache = new Map(), emptyMap = new
58
52
 
59
53
  insert(resolvedPath, alias, {
60
54
  importsEntries,
61
- aliasBased,
62
55
  });
63
56
  }
64
57
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-nodejs",
3
- "version": "19.2.1",
3
+ "version": "19.2.2",
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",