@putout/plugin-esm 9.8.0 → 9.9.0

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.
package/README.md CHANGED
@@ -18,7 +18,6 @@ npm i putout @putout/plugin-esm -D
18
18
 
19
19
  ## Rules
20
20
 
21
- - ✅ [add-index-to-import](#add-index-to-import);
22
21
  - ✅ [apply-default-import](#apply-default-import);
23
22
  - ✅ [apply-export-from](#apply-export-from);
24
23
  - ✅ [convert-assert-to-with](#convert-assert-to-with);
@@ -47,7 +46,6 @@ npm i putout @putout/plugin-esm -D
47
46
  ```json
48
47
  {
49
48
  "rules": {
50
- "esm/add-index-to-import": "on",
51
49
  "esm/apply-default-import": "on",
52
50
  "esm/apply-export-from": "on",
53
51
  "esm/declare-imports-first": "on",
@@ -17,7 +17,9 @@ const {
17
17
 
18
18
  const getMessage = (a) => a.message;
19
19
 
20
- export const report = (file, {from, to}) => `Apply privately imported source: '${from}' -> '${to}'`;
20
+ export const report = (file, {from, to, filename}) => {
21
+ return `Apply private import: '${from}' -> '${to}' in '${filename}'`;
22
+ };
21
23
  export const fix = (file, {content, ast, from, to}) => {
22
24
  transform(ast, content, {
23
25
  rules: {
@@ -75,6 +77,7 @@ export const scan = (rootPath, {push, trackFile}) => {
75
77
  push(file, {
76
78
  from,
77
79
  to: privateImports.get(to),
80
+ filename,
78
81
  content,
79
82
  ast,
80
83
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-esm",
3
- "version": "9.8.0",
3
+ "version": "9.9.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout plugin improves ability to transform ESM code",