refactor: remove unused pretty-print-error dependency (#2992)

This commit is contained in:
Meier Lukas
2025-05-01 10:08:52 +02:00
committed by GitHub
parent 48aef9e862
commit 4dfde2ba05
7 changed files with 1 additions and 48 deletions

View File

@@ -72,9 +72,6 @@
"overrides": {
"proxmox-api>undici": "7.8.0"
},
"patchedDependencies": {
"pretty-print-error": "patches/pretty-print-error.patch"
},
"allowUnusedPatches": true,
"ignoredBuiltDependencies": [
"@scarf/scarf",

View File

@@ -46,7 +46,6 @@
"@trpc/server": "^11.1.2",
"lodash.clonedeep": "^4.5.0",
"next": "15.3.1",
"pretty-print-error": "^1.1.2",
"react": "19.1.0",
"react-dom": "19.1.0",
"superjson": "2.2.2",

View File

@@ -37,7 +37,6 @@
"ldapts": "7.4.0",
"next": "15.3.1",
"next-auth": "5.0.0-beta.27",
"pretty-print-error": "^1.1.2",
"react": "19.1.0",
"react-dom": "19.1.0",
"zod": "^3.24.3"

View File

@@ -24,8 +24,7 @@
"dependencies": {
"@homarr/certificates": "workspace:^0.1.0",
"@homarr/common": "workspace:^0.1.0",
"@homarr/log": "workspace:^0.1.0",
"pretty-print-error": "^1.1.2"
"@homarr/log": "workspace:^0.1.0"
},
"devDependencies": {
"@homarr/eslint-config": "workspace:^0.2.0",

View File

@@ -31,7 +31,6 @@
"@homarr/redis": "workspace:^0.1.0",
"dayjs": "^1.11.13",
"octokit": "^4.1.3",
"pretty-print-error": "^1.1.2",
"superjson": "2.2.2"
},
"devDependencies": {

View File

@@ -1,16 +0,0 @@
diff --git a/src/index.ts b/src/index.ts
index c8f62a743b89040c1d10a8ae3795bec8afcbc134..7cd7c1e98c1c9516b40f678627f51fd1adfa18c7 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -109,9 +109,9 @@ export function formatError(
(name) => name !== "stack" && name !== "message"
);
if (propNames.length > 0) {
- const props = {};
+ const props: Record<string, unknown> = {};
propNames.forEach((name) => {
- props[name] = err[name];
+ props[name] = (err as Record<string, object>)[name];
});
let propertiesString;

24
pnpm-lock.yaml generated
View File

@@ -7,11 +7,6 @@ settings:
overrides:
proxmox-api>undici: 7.8.0
patchedDependencies:
pretty-print-error:
hash: d1432e02330bdaf8359eb0e54528a74ed6b7e5cce6bb65c13310c82e34fd1e4d
path: patches/pretty-print-error.patch
importers:
.:
@@ -596,9 +591,6 @@ importers:
next:
specifier: 15.3.1
version: 15.3.1(@babel/core@7.26.10)(@playwright/test@1.49.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.87.0)
pretty-print-error:
specifier: ^1.1.2
version: 1.1.2(patch_hash=d1432e02330bdaf8359eb0e54528a74ed6b7e5cce6bb65c13310c82e34fd1e4d)
react:
specifier: 19.1.0
version: 19.1.0
@@ -678,9 +670,6 @@ importers:
next-auth:
specifier: 5.0.0-beta.27
version: 5.0.0-beta.27(next@15.3.1(@babel/core@7.26.10)(@playwright/test@1.49.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.87.0))(react@19.1.0)
pretty-print-error:
specifier: ^1.1.2
version: 1.1.2(patch_hash=d1432e02330bdaf8359eb0e54528a74ed6b7e5cce6bb65c13310c82e34fd1e4d)
react:
specifier: 19.1.0
version: 19.1.0
@@ -1640,9 +1629,6 @@ importers:
'@homarr/log':
specifier: workspace:^0.1.0
version: link:../log
pretty-print-error:
specifier: ^1.1.2
version: 1.1.2(patch_hash=d1432e02330bdaf8359eb0e54528a74ed6b7e5cce6bb65c13310c82e34fd1e4d)
devDependencies:
'@homarr/eslint-config':
specifier: workspace:^0.2.0
@@ -1726,9 +1712,6 @@ importers:
octokit:
specifier: ^4.1.3
version: 4.1.3
pretty-print-error:
specifier: ^1.1.2
version: 1.1.2(patch_hash=d1432e02330bdaf8359eb0e54528a74ed6b7e5cce6bb65c13310c82e34fd1e4d)
superjson:
specifier: 2.2.2
version: 2.2.2
@@ -8689,9 +8672,6 @@ packages:
resolution: {integrity: sha512-4yf0QO/sllf/1zbZWYnvWw3NxCQwLXKzIj0G849LSufP15BXKM0rbD2Z3wVnkMfjdn/CB0Dpp444gYAACdsplg==}
engines: {node: '>=18'}
pretty-print-error@1.1.2:
resolution: {integrity: sha512-XkKN3W8aeRYApO17WpzuaJZmqH3WNSFeqR4Sxt7vu+C7pcWB+3+JDJ2dnnhzSCqvC1IaYR36CVh4VsFZyBicQA==}
prismjs@1.27.0:
resolution: {integrity: sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA==}
engines: {node: '>=6'}
@@ -17852,10 +17832,6 @@ snapshots:
dependencies:
parse-ms: 4.0.0
pretty-print-error@1.1.2(patch_hash=d1432e02330bdaf8359eb0e54528a74ed6b7e5cce6bb65c13310c82e34fd1e4d):
dependencies:
kleur: 4.1.5
prismjs@1.27.0: {}
prismjs@1.30.0: {}