@putout/formatter-dump 4.0.0 → 5.0.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.
Files changed (2) hide show
  1. package/lib/dump.js +9 -9
  2. package/package.json +11 -11
package/lib/dump.js CHANGED
@@ -2,8 +2,8 @@ import {
2
2
  table,
3
3
  getBorderCharacters,
4
4
  } from 'table';
5
-
6
5
  import chalk from 'chalk';
6
+ import {jsonFormatter} from '@putout/formatter-json';
7
7
 
8
8
  const {
9
9
  underline,
@@ -13,11 +13,14 @@ const {
13
13
  redBright,
14
14
  } = chalk;
15
15
 
16
- import {jsonFormatter} from '@putout/formatter-json';
17
-
18
16
  export default ({name, places, index, count, filesCount, errorsCount}) => {
19
17
  const json = jsonFormatter({
20
- name, places, index, count, filesCount, errorsCount,
18
+ name,
19
+ places,
20
+ index,
21
+ count,
22
+ filesCount,
23
+ errorsCount,
21
24
  });
22
25
 
23
26
  if (!json)
@@ -27,6 +30,7 @@ export default ({name, places, index, count, filesCount, errorsCount}) => {
27
30
  return '';
28
31
 
29
32
  const output = [];
33
+
30
34
  for (const {name, places} of json.errors) {
31
35
  const line = buildLine(places);
32
36
 
@@ -49,10 +53,7 @@ function buildLine(places) {
49
53
  const data = [];
50
54
 
51
55
  for (const {message, position, rule} of places) {
52
- const {
53
- line,
54
- column,
55
- } = position;
56
+ const {line, column} = position;
56
57
 
57
58
  data.push([
58
59
  grey(`${line}:${column}`),
@@ -63,4 +64,3 @@ function buildLine(places) {
63
64
 
64
65
  return data;
65
66
  }
66
-
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@putout/formatter-dump",
3
- "version": "4.0.0",
3
+ "version": "5.0.0",
4
4
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
5
- "description": "putout formatter stores output and dump it on end",
5
+ "description": "🐊Putout formatter stores output and dump it on end",
6
6
  "homepage": "https://github.com/coderaiser/putout/tree/master/packages/formatter-dump#readme",
7
7
  "main": "lib/dump.js",
8
8
  "release": false,
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@putout/formatter-json": "^2.0.0",
28
- "chalk": "^5.0.1",
28
+ "chalk": "^5.3.0",
29
29
  "table": "^6.0.1"
30
30
  },
31
31
  "keywords": [
@@ -36,19 +36,19 @@
36
36
  ],
37
37
  "devDependencies": {
38
38
  "@putout/plugin-remove-unused-variables": "*",
39
- "@putout/test": "^5.0.0",
40
- "c8": "^7.5.0",
41
- "eslint": "^8.0.1",
42
- "eslint-plugin-node": "^11.0.0",
43
- "eslint-plugin-putout": "^14.0.0",
44
- "madrun": "^9.0.0"
39
+ "@putout/test": "^9.0.0",
40
+ "c8": "^9.0.0",
41
+ "eslint": "^9.0.0-alpha.0",
42
+ "eslint-plugin-n": "^17.0.0-0",
43
+ "eslint-plugin-putout": "^22.0.0",
44
+ "madrun": "^10.0.0"
45
45
  },
46
46
  "peerDependencies": {
47
- "putout": ">=25"
47
+ "putout": ">=35"
48
48
  },
49
49
  "license": "MIT",
50
50
  "engines": {
51
- "node": ">=16"
51
+ "node": ">=18"
52
52
  },
53
53
  "publishConfig": {
54
54
  "access": "public"