standard-log 10.2.1 → 10.3.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/cjs/console.js.map +1 -1
- package/cjs/console.spec.js.map +1 -1
- package/cjs/logStore.js.map +1 -1
- package/cjs/memory.d.ts +1 -0
- package/cjs/memory.d.ts.map +1 -1
- package/cjs/memory.js +4 -0
- package/cjs/memory.js.map +1 -1
- package/cjs/memory.spec.js +13 -2
- package/cjs/memory.spec.js.map +1 -1
- package/cjs/package.json +1 -1
- package/cjs/standardLog.js.map +1 -1
- package/cjs/testUtil.d.ts +1 -1
- package/cjs/testUtil.d.ts.map +1 -1
- package/cjs/testUtil.js.map +1 -1
- package/dist/standard-log.es5.js +400 -1229
- package/dist/standard-log.es5.js.gz +0 -0
- package/dist/standard-log.es5.js.map +1 -1
- package/dist/standard-log.es5.js.map.gz +0 -0
- package/dist/standard-log.esm.js +56 -730
- package/dist/standard-log.esm.js.gz +0 -0
- package/dist/standard-log.esm.js.map +1 -1
- package/dist/standard-log.esm.js.map.gz +0 -0
- package/esm/memory.d.ts +1 -0
- package/esm/memory.d.ts.map +1 -1
- package/esm/memory.js +4 -0
- package/esm/memory.js.map +1 -1
- package/esm/memory.spec.js +13 -2
- package/esm/memory.spec.js.map +1 -1
- package/esm/testUtil.d.ts +1 -1
- package/esm/testUtil.d.ts.map +1 -1
- package/esm/testUtil.js.map +1 -1
- package/package.json +45 -35
- package/ts/memory.ts +6 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "standard-log",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.3.0",
|
|
4
4
|
"description": "The standard log library",
|
|
5
5
|
"homepage": "https://github.com/unional/standard-log/tree/master/packages/log",
|
|
6
6
|
"bugs": {
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"browser": {
|
|
26
26
|
"./cjs/platform.js": "./cjs/platform.browser.js",
|
|
27
27
|
"./esm/platform.js": "./esm/platform.browser.js",
|
|
28
|
-
"./
|
|
28
|
+
"./tslib/platform.js": "./tslib/platform.browser.js",
|
|
29
|
+
"./ts/platform.ts": "./ts/platform.browser.ts"
|
|
29
30
|
},
|
|
30
31
|
"typings": "./cjs/index.d.ts",
|
|
31
32
|
"files": [
|
|
@@ -36,53 +37,42 @@
|
|
|
36
37
|
"!ts/**/*.spec.ts",
|
|
37
38
|
"!ts/testUtil.ts"
|
|
38
39
|
],
|
|
39
|
-
"scripts": {
|
|
40
|
-
"build": "npm-run-all build:clean -p build:cjs build:esm build:tslib bundle:es5 bundle:esm",
|
|
41
|
-
"build:clean": "rimraf .tsbuildinfo || true",
|
|
42
|
-
"build:cjs": "tsc -p ./tsconfig.cjs.json",
|
|
43
|
-
"build:esm": "tsc -p ./tsconfig.esm.json",
|
|
44
|
-
"build:tslib": "tsc -p ./tsconfig.tslib.json",
|
|
45
|
-
"bundle": "run-p bundle:es5 bundle:esm",
|
|
46
|
-
"bundle:es5": "webpack -c ./webpack.es5.cjs",
|
|
47
|
-
"bundle:esm": "webpack -c ./webpack.esm.cjs",
|
|
48
|
-
"clean": "rimraf cjs coverage dist esm lib libm tslib .tsbuildinfo && mkdir cjs && echo '{\"type\":\"commonjs\"}' > cjs/package.json || true",
|
|
49
|
-
"coverage": "jest --coverage",
|
|
50
|
-
"depcheck": "depcheck",
|
|
51
|
-
"lint": "cross-env TIMING=1 eslint --ext=ts,js,cjs,mjs .",
|
|
52
|
-
"size": "size-limit",
|
|
53
|
-
"test": "jest",
|
|
54
|
-
"verify": "npm-run-all clean -p build depcheck lint coverage -s size",
|
|
55
|
-
"watch": "jest --watch"
|
|
56
|
-
},
|
|
57
40
|
"dependencies": {
|
|
58
|
-
"@just-func/types": "^0.2.
|
|
59
|
-
"iso-error": "^4.
|
|
41
|
+
"@just-func/types": "^0.2.1",
|
|
42
|
+
"iso-error": "^4.4.0",
|
|
60
43
|
"ms": "^2.1.3",
|
|
61
|
-
"type-plus": "^4.
|
|
44
|
+
"type-plus": "^4.13.1",
|
|
62
45
|
"upper-case": "^2.0.2"
|
|
63
46
|
},
|
|
64
47
|
"devDependencies": {
|
|
65
|
-
"@size-limit/preset-small-lib": "^8.
|
|
48
|
+
"@size-limit/preset-small-lib": "^8.1.0",
|
|
49
|
+
"@types/jest": "^29.1.1",
|
|
66
50
|
"@types/ms": "^0.7.31",
|
|
67
|
-
"@types/
|
|
51
|
+
"@types/node": "^14.18.31",
|
|
52
|
+
"@types/ramda": "^0.28.15",
|
|
68
53
|
"assertron": "^10.0.0",
|
|
69
54
|
"compression-webpack-plugin": "^10.0.0",
|
|
70
55
|
"cross-env": "^7.0.3",
|
|
71
56
|
"depcheck": "^1.4.3",
|
|
72
|
-
"eslint": "^8.
|
|
73
|
-
"jest": "^29.
|
|
57
|
+
"eslint": "^8.24.0",
|
|
58
|
+
"jest": "^29.1.2",
|
|
59
|
+
"jest-validate": "^29.1.2",
|
|
60
|
+
"jest-watch-suspend": "^1.1.2",
|
|
61
|
+
"jest-watch-toggle-config": "^2.0.1",
|
|
62
|
+
"jest-watch-typeahead": "^2.2.0",
|
|
63
|
+
"ncp": "^2.0.0",
|
|
74
64
|
"npm-run-all": "^4.1.5",
|
|
75
65
|
"param-case": "^3.0.4",
|
|
76
66
|
"pascal-case": "^3.1.2",
|
|
77
67
|
"ramda": "^0.28.0",
|
|
78
68
|
"rimraf": "^3.0.2",
|
|
79
|
-
"size-limit": "^8.
|
|
80
|
-
"ts-jest": "^
|
|
81
|
-
"ts-loader": "^9.
|
|
69
|
+
"size-limit": "^8.1.0",
|
|
70
|
+
"ts-jest": "^29.0.3",
|
|
71
|
+
"ts-loader": "^9.4.1",
|
|
82
72
|
"tslib": "^2.4.0",
|
|
83
|
-
"typescript": "^4.
|
|
84
|
-
"webpack": "^5.
|
|
85
|
-
"webpack-bundle-analyzer": "^4.
|
|
73
|
+
"typescript": "^4.8.4",
|
|
74
|
+
"webpack": "^5.74.0",
|
|
75
|
+
"webpack-bundle-analyzer": "^4.6.1",
|
|
86
76
|
"webpack-cli": "^4.10.0"
|
|
87
77
|
},
|
|
88
78
|
"size-limit": [
|
|
@@ -98,5 +88,25 @@
|
|
|
98
88
|
"path": "./tslib/index.js",
|
|
99
89
|
"limit": "20 kB"
|
|
100
90
|
}
|
|
101
|
-
]
|
|
102
|
-
|
|
91
|
+
],
|
|
92
|
+
"scripts": {
|
|
93
|
+
"build": "run-p build:cjs build:esm build:tslib bundle:es5 bundle:esm",
|
|
94
|
+
"build:clean": "rimraf *.tsbuildinfo",
|
|
95
|
+
"build:cjs": "tsc -p ./tsconfig.cjs.json && ncp package.cjs.json cjs/package.json",
|
|
96
|
+
"build:esm": "tsc -p ./tsconfig.esm.json",
|
|
97
|
+
"build:tslib": "tsc -p ./tsconfig.tslib.json",
|
|
98
|
+
"bundle": "run-p bundle:es5 bundle:esm",
|
|
99
|
+
"bundle:es5": "webpack -c ./webpack.es5.cjs",
|
|
100
|
+
"bundle:esm": "webpack -c ./webpack.esm.cjs",
|
|
101
|
+
"clean": "rimraf cjs coverage dist esm lib libm tslib *.tsbuildinfo",
|
|
102
|
+
"coverage": "jest --coverage",
|
|
103
|
+
"depcheck": "depcheck",
|
|
104
|
+
"lint": "cross-env TIMING=1 eslint --ext=ts,js,cjs,mjs .",
|
|
105
|
+
"nuke": "run-s clean nuke:local",
|
|
106
|
+
"nuke:local": "rimraf node_modules",
|
|
107
|
+
"size": "size-limit",
|
|
108
|
+
"test": "jest",
|
|
109
|
+
"verify": "npm-run-all -p build depcheck lint coverage -p size",
|
|
110
|
+
"watch": "jest --watch"
|
|
111
|
+
}
|
|
112
|
+
}
|
package/ts/memory.ts
CHANGED
|
@@ -11,7 +11,8 @@ export type MemoryLogReporter = LogReporter<LogEntry> & {
|
|
|
11
11
|
*/
|
|
12
12
|
getLogMessage(): string,
|
|
13
13
|
getLogMessages(): string[],
|
|
14
|
-
getLogMessageWithLevel(): string
|
|
14
|
+
getLogMessageWithLevel(): string,
|
|
15
|
+
getLogMessagesWithIdAndLevel(): string[]
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
export type MemoryLogFormatter = LogFormatter<LogEntry>
|
|
@@ -45,6 +46,10 @@ export function createMemoryLogReporter(options?: LogReporterOptions<LogEntry>):
|
|
|
45
46
|
return logs.map(toInspectLogEntry)
|
|
46
47
|
.map(log => log.args.join(' '))
|
|
47
48
|
},
|
|
49
|
+
getLogMessagesWithIdAndLevel() {
|
|
50
|
+
return logs.map(toInspectLogEntry)
|
|
51
|
+
.map(log => `${log.id} ${formatLogLevel(log.level)} ${log.args.join(' ')}`)
|
|
52
|
+
},
|
|
48
53
|
getLogMessageWithLevel() { return toMessageWithLevel(logs) }
|
|
49
54
|
})
|
|
50
55
|
}
|