mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: remove deprecation
This commit is contained in:
1 parent
833b960a48
commit
9971967fd1
11 files changed
+47
-20
No files matched your search
@@ -161,10 +161,23 @@ export namespace Time {
|
||||
|
||||
export function errorMessage(err: Error | string) {
|
||||
const t = typeof err === 'string' ? err : err.stack;
|
||||
const parsed = t
|
||||
.split('\n')
|
||||
.filter((i) => !i.includes(' (node:'))
|
||||
.join('\n')
|
||||
const lines = t.split('\n')
|
||||
.filter((i) => !i.includes(' (node:') && !i.includes('(internal'));
|
||||
let cursor = 1;
|
||||
let count = 0;
|
||||
while (cursor < lines.length) {
|
||||
if (lines[cursor] !== lines[cursor - 1]) {
|
||||
if (count) {
|
||||
lines[cursor - 1] += ` [+${count}]`;
|
||||
count = 0;
|
||||
}
|
||||
cursor++;
|
||||
} else {
|
||||
count++;
|
||||
lines.splice(cursor, 1);
|
||||
}
|
||||
}
|
||||
const parsed = lines.join('\n')
|
||||
.replace(/[A-Z]:\\.+\\@hydrooj\\/g, '@hydrooj\\')
|
||||
.replace(/\/.+\/@hydrooj\//g, '\\')
|
||||
.replace(/[A-Z]:\\.+\\hydrooj\\/g, 'hydrooj\\')
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"js-yaml": "^4.1.0",
|
||||
"moment-timezone": "^0.5.37",
|
||||
"mongodb": "^3.7.3",
|
||||
"reggol": "^1.2.1",
|
||||
"reggol": "^1.3.0",
|
||||
"source-map-support": "^0.5.21",
|
||||
"systeminformation": "^5.12.6"
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user