util: remove node_modules/ in errMsg

This commit is contained in:
undefined committed 2021-05-21 18:14:38 +08:00
1 parent 561c4d4175
commit cc6e623413
4 files changed
+11 -5

No files matched your search

+2
View File
@@ -270,6 +270,8 @@ export function errorMessage(err: Error | string) {
.replace(/\/.+\/@hydrooj\//g, '\\')
.replace(/[A-Z]:\\.+\\hydrooj\\/g, 'hydrooj\\')
.replace(/\/.+\/hydrooj\//g, 'hydrooj/')
.replace(/[A-Z]:\\.+\\node_modules\\/g, '')
.replace(/\/.+\/node_modules\//g, '')
.replace(/\\/g, '/');
if (typeof err === 'string') return parsed;
err.stack = parsed;
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/utils",
"version": "1.0.16",
"version": "1.0.17",
"description": "hydrooj utils",
"main": "package.json",
"repository": "https://github.com/hydro-dev/Hydro.git",