@putout/formatter-memory 1.4.0 → 2.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.
- package/README.md +4 -8
- package/lib/memory.js +10 -12
- package/package.json +11 -10
package/README.md
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
# @putout/putout-formatter-memory [![NPM version][NPMIMGURL]][NPMURL]
|
|
1
|
+
# @putout/putout-formatter-memory [![NPM version][NPMIMGURL]][NPMURL]
|
|
2
2
|
|
|
3
|
-
[NPMIMGURL]:
|
|
4
|
-
[NPMURL]:
|
|
3
|
+
[NPMIMGURL]: https://img.shields.io/npm/v/@putout/formatter-memory.svg?style=flat&longCache=true
|
|
4
|
+
[NPMURL]: https://npmjs.org/package/@putout/formatter-memory "npm"
|
|
5
5
|
|
|
6
|
-
[
|
|
7
|
-
[DependencyStatusIMGURL]: https://david-dm.org/coderaiser/putout.svg?path=packages/formatter-memory
|
|
8
|
-
|
|
9
|
-
`putout` formatter shows memory used.
|
|
6
|
+
🐊[`Putout`](https://github.com/coderaiser/putout) formatter shows memory used.
|
|
10
7
|
|
|
11
8
|
## Install
|
|
12
9
|
|
|
@@ -42,4 +39,3 @@ Formatters takes options, that can be set in `.putout.json` with:
|
|
|
42
39
|
## License
|
|
43
40
|
|
|
44
41
|
MIT
|
|
45
|
-
|
package/lib/memory.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import {Writable} from 'stream';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const format = require('format-io');
|
|
10
|
-
const montag = require('montag');
|
|
3
|
+
import dump from '@putout/formatter-dump';
|
|
4
|
+
import cliProgress from 'cli-progress';
|
|
5
|
+
import chalk from 'chalk';
|
|
6
|
+
import once from 'once';
|
|
7
|
+
import format from 'format-io';
|
|
8
|
+
import montag from 'montag';
|
|
11
9
|
|
|
12
10
|
const OK = '👌';
|
|
13
11
|
const {
|
|
@@ -23,7 +21,7 @@ const {
|
|
|
23
21
|
TEST = 0,
|
|
24
22
|
} = process.env;
|
|
25
23
|
|
|
26
|
-
|
|
24
|
+
export default ({name, options, places, index, count, filesCount, errorsCount}) => {
|
|
27
25
|
const {
|
|
28
26
|
color = '#ea4336',
|
|
29
27
|
minCount = 0,
|
|
@@ -79,7 +77,7 @@ const getColorFn = (color) => {
|
|
|
79
77
|
};
|
|
80
78
|
|
|
81
79
|
const getStream = () => PUTOUT_PROGRESS_BAR !== '1' ? new Writable() : stderr;
|
|
82
|
-
|
|
80
|
+
export const _getStream = getStream;
|
|
83
81
|
|
|
84
82
|
const createProgress = once(({count, color, rss}) => {
|
|
85
83
|
const colorFn = getColorFn(color);
|
|
@@ -112,7 +110,7 @@ const parseMemory = (memory) => {
|
|
|
112
110
|
return memory;
|
|
113
111
|
};
|
|
114
112
|
|
|
115
|
-
|
|
113
|
+
export const _parseMemory = parseMemory;
|
|
116
114
|
|
|
117
115
|
function getInfo(memory) {
|
|
118
116
|
const {
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/formatter-memory",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
5
5
|
"description": "putout formatter shows memry usage",
|
|
6
|
-
"homepage": "
|
|
6
|
+
"homepage": "https://github.com/coderaiser/putout/tree/master/packages/formatter-memory",
|
|
7
7
|
"main": "lib/memory.js",
|
|
8
8
|
"release": false,
|
|
9
9
|
"tag": false,
|
|
10
10
|
"changelog": false,
|
|
11
|
+
"type": "module",
|
|
11
12
|
"repository": {
|
|
12
13
|
"type": "git",
|
|
13
14
|
"url": "git://github.com/coderaiser/putout.git"
|
|
@@ -25,7 +26,7 @@
|
|
|
25
26
|
"report": "madrun report"
|
|
26
27
|
},
|
|
27
28
|
"dependencies": {
|
|
28
|
-
"@putout/formatter-dump": "^
|
|
29
|
+
"@putout/formatter-dump": "^3.0.0",
|
|
29
30
|
"chalk": "^4.1.0",
|
|
30
31
|
"cli-progress": "^3.8.2",
|
|
31
32
|
"format-io": "^2.0.0",
|
|
@@ -40,21 +41,21 @@
|
|
|
40
41
|
],
|
|
41
42
|
"devDependencies": {
|
|
42
43
|
"@putout/plugin-remove-unused-variables": "*",
|
|
43
|
-
"@putout/test": "^
|
|
44
|
-
"
|
|
45
|
-
"eslint": "^
|
|
44
|
+
"@putout/test": "^4.0.0",
|
|
45
|
+
"c8": "^7.5.0",
|
|
46
|
+
"eslint": "^8.0.1",
|
|
46
47
|
"eslint-plugin-node": "^11.0.0",
|
|
47
|
-
"eslint-plugin-putout": "^
|
|
48
|
+
"eslint-plugin-putout": "^12.0.0",
|
|
48
49
|
"madrun": "^8.0.1",
|
|
49
50
|
"mock-require": "^3.0.3",
|
|
50
|
-
"
|
|
51
|
+
"simport": "^1.2.0"
|
|
51
52
|
},
|
|
52
53
|
"peerDependencies": {
|
|
53
|
-
"putout": ">=
|
|
54
|
+
"putout": ">=22.5"
|
|
54
55
|
},
|
|
55
56
|
"license": "MIT",
|
|
56
57
|
"engines": {
|
|
57
|
-
"node": ">=
|
|
58
|
+
"node": ">=14"
|
|
58
59
|
},
|
|
59
60
|
"publishConfig": {
|
|
60
61
|
"access": "public"
|