XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFESpaceNinjaServer

chore: update TypeScript to 5.5 (#458)

3c58979d
Sainan <sainan@calamity.gg>
提交于

代码差异

5 个文件 +61 -70
Modified package-lock.json +51 -58
@@ -18,18 +18,17 @@
18 18 "winston-daily-rotate-file": "^4.7.1"
19 19 },
20 20 "devDependencies": {
21 "@tsconfig/node20": "^1.0.0",
22 21 "@types/express": "^4.17.20",
23 22 "@types/morgan": "^1.9.7",
24 "@typescript-eslint/eslint-plugin": "^7.13.1",
25 "@typescript-eslint/parser": "^7.13.1",
23 "@typescript-eslint/eslint-plugin": "^7.14",
24 "@typescript-eslint/parser": "^7.14",
26 25 "eslint": "^8.56.0",
27 26 "eslint-plugin-prettier": "^5.1.3",
28 27 "morgan": "^1.10.0",
29 28 "prettier": "^3.2.4",
30 29 "ts-node-dev": "^2.0.0",
31 30 "tsconfig-paths": "^4.2.0",
32 "typescript": "^5.2.2"
31 "typescript": "^5.5"
33 32 },
34 33 "engines": {
35 34 "node": ">=18.15.0",
@@ -314,12 +313,6 @@
314 313 "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==",
315 314 "dev": true
316 315 },
317 "node_modules/@tsconfig/node20": {
318 "version": "1.0.0",
319 "resolved": "https://registry.npmjs.org/@tsconfig/node20/-/node20-1.0.0.tgz",
320 "integrity": "sha512-AwbXtpWEaRUjbGVwdlusNqwet+jeSk3Nnqf/8+77WJ1/9d6xnqs2QpE9Pdwv8RCoXxtMedWEtlmWY+/irBPcUw==",
321 "dev": true
322 },
323 316 "node_modules/@types/body-parser": {
324 317 "version": "1.19.2",
325 318 "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz",
@@ -447,16 +440,16 @@
447 440 }
448 441 },
449 442 "node_modules/@typescript-eslint/eslint-plugin": {
450 "version": "7.13.1",
451 "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.13.1.tgz",
452 "integrity": "sha512-kZqi+WZQaZfPKnsflLJQCz6Ze9FFSMfXrrIOcyargekQxG37ES7DJNpJUE9Q/X5n3yTIP/WPutVNzgknQ7biLg==",
443 "version": "7.15.0",
444 "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.15.0.tgz",
445 "integrity": "sha512-uiNHpyjZtFrLwLDpHnzaDlP3Tt6sGMqTCiqmxaN4n4RP0EfYZDODJyddiFDF44Hjwxr5xAcaYxVKm9QKQFJFLA==",
453 446 "dev": true,
454 447 "dependencies": {
455 448 "@eslint-community/regexpp": "^4.10.0",
456 "@typescript-eslint/scope-manager": "7.13.1",
457 "@typescript-eslint/type-utils": "7.13.1",
458 "@typescript-eslint/utils": "7.13.1",
459 "@typescript-eslint/visitor-keys": "7.13.1",
449 "@typescript-eslint/scope-manager": "7.15.0",
450 "@typescript-eslint/type-utils": "7.15.0",
451 "@typescript-eslint/utils": "7.15.0",
452 "@typescript-eslint/visitor-keys": "7.15.0",
460 453 "graphemer": "^1.4.0",
461 454 "ignore": "^5.3.1",
462 455 "natural-compare": "^1.4.0",
@@ -480,15 +473,15 @@
480 473 }
481 474 },
482 475 "node_modules/@typescript-eslint/parser": {
483 "version": "7.13.1",
484 "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.13.1.tgz",
485 "integrity": "sha512-1ELDPlnLvDQ5ybTSrMhRTFDfOQEOXNM+eP+3HT/Yq7ruWpciQw+Avi73pdEbA4SooCawEWo3dtYbF68gN7Ed1A==",
476 "version": "7.15.0",
477 "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.15.0.tgz",
478 "integrity": "sha512-k9fYuQNnypLFcqORNClRykkGOMOj+pV6V91R4GO/l1FDGwpqmSwoOQrOHo3cGaH63e+D3ZiCAOsuS/D2c99j/A==",
486 479 "dev": true,
487 480 "dependencies": {
488 "@typescript-eslint/scope-manager": "7.13.1",
489 "@typescript-eslint/types": "7.13.1",
490 "@typescript-eslint/typescript-estree": "7.13.1",
491 "@typescript-eslint/visitor-keys": "7.13.1",
481 "@typescript-eslint/scope-manager": "7.15.0",
482 "@typescript-eslint/types": "7.15.0",
483 "@typescript-eslint/typescript-estree": "7.15.0",
484 "@typescript-eslint/visitor-keys": "7.15.0",
492 485 "debug": "^4.3.4"
493 486 },
494 487 "engines": {
@@ -531,13 +524,13 @@
531 524 "dev": true
532 525 },
533 526 "node_modules/@typescript-eslint/scope-manager": {
534 "version": "7.13.1",
535 "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.13.1.tgz",
536 "integrity": "sha512-adbXNVEs6GmbzaCpymHQ0MB6E4TqoiVbC0iqG3uijR8ZYfpAXMGttouQzF4Oat3P2GxDVIrg7bMI/P65LiQZdg==",
527 "version": "7.15.0",
528 "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.15.0.tgz",
529 "integrity": "sha512-Q/1yrF/XbxOTvttNVPihxh1b9fxamjEoz2Os/Pe38OHwxC24CyCqXxGTOdpb4lt6HYtqw9HetA/Rf6gDGaMPlw==",
537 530 "dev": true,
538 531 "dependencies": {
539 "@typescript-eslint/types": "7.13.1",
540 "@typescript-eslint/visitor-keys": "7.13.1"
532 "@typescript-eslint/types": "7.15.0",
533 "@typescript-eslint/visitor-keys": "7.15.0"
541 534 },
542 535 "engines": {
543 536 "node": "^18.18.0 || >=20.0.0"
@@ -548,13 +541,13 @@
548 541 }
549 542 },
550 543 "node_modules/@typescript-eslint/type-utils": {
551 "version": "7.13.1",
552 "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.13.1.tgz",
553 "integrity": "sha512-aWDbLu1s9bmgPGXSzNCxELu+0+HQOapV/y+60gPXafR8e2g1Bifxzevaa+4L2ytCWm+CHqpELq4CSoN9ELiwCg==",
544 "version": "7.15.0",
545 "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.15.0.tgz",
546 "integrity": "sha512-SkgriaeV6PDvpA6253PDVep0qCqgbO1IOBiycjnXsszNTVQe5flN5wR5jiczoEoDEnAqYFSFFc9al9BSGVltkg==",
554 547 "dev": true,
555 548 "dependencies": {
556 "@typescript-eslint/typescript-estree": "7.13.1",
557 "@typescript-eslint/utils": "7.13.1",
549 "@typescript-eslint/typescript-estree": "7.15.0",
550 "@typescript-eslint/utils": "7.15.0",
558 551 "debug": "^4.3.4",
559 552 "ts-api-utils": "^1.3.0"
560 553 },
@@ -598,9 +591,9 @@
598 591 "dev": true
599 592 },
600 593 "node_modules/@typescript-eslint/types": {
601 "version": "7.13.1",
602 "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.13.1.tgz",
603 "integrity": "sha512-7K7HMcSQIAND6RBL4kDl24sG/xKM13cA85dc7JnmQXw2cBDngg7c19B++JzvJHRG3zG36n9j1i451GBzRuHchw==",
594 "version": "7.15.0",
595 "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.15.0.tgz",
596 "integrity": "sha512-aV1+B1+ySXbQH0pLK0rx66I3IkiZNidYobyfn0WFsdGhSXw+P3YOqeTq5GED458SfB24tg+ux3S+9g118hjlTw==",
604 597 "dev": true,
605 598 "engines": {
606 599 "node": "^18.18.0 || >=20.0.0"
@@ -611,13 +604,13 @@
611 604 }
612 605 },
613 606 "node_modules/@typescript-eslint/typescript-estree": {
614 "version": "7.13.1",
615 "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.13.1.tgz",
616 "integrity": "sha512-uxNr51CMV7npU1BxZzYjoVz9iyjckBduFBP0S5sLlh1tXYzHzgZ3BR9SVsNed+LmwKrmnqN3Kdl5t7eZ5TS1Yw==",
607 "version": "7.15.0",
608 "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.15.0.tgz",
609 "integrity": "sha512-gjyB/rHAopL/XxfmYThQbXbzRMGhZzGw6KpcMbfe8Q3nNQKStpxnUKeXb0KiN/fFDR42Z43szs6rY7eHk0zdGQ==",
617 610 "dev": true,
618 611 "dependencies": {
619 "@typescript-eslint/types": "7.13.1",
620 "@typescript-eslint/visitor-keys": "7.13.1",
612 "@typescript-eslint/types": "7.15.0",
613 "@typescript-eslint/visitor-keys": "7.15.0",
621 614 "debug": "^4.3.4",
622 615 "globby": "^11.1.0",
623 616 "is-glob": "^4.0.3",
@@ -665,9 +658,9 @@
665 658 }
666 659 },
667 660 "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {
668 "version": "9.0.4",
669 "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz",
670 "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==",
661 "version": "9.0.5",
662 "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
663 "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
671 664 "dev": true,
672 665 "dependencies": {
673 666 "brace-expansion": "^2.0.1"
@@ -686,15 +679,15 @@
686 679 "dev": true
687 680 },
688 681 "node_modules/@typescript-eslint/utils": {
689 "version": "7.13.1",
690 "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.13.1.tgz",
691 "integrity": "sha512-h5MzFBD5a/Gh/fvNdp9pTfqJAbuQC4sCN2WzuXme71lqFJsZtLbjxfSk4r3p02WIArOF9N94pdsLiGutpDbrXQ==",
682 "version": "7.15.0",
683 "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.15.0.tgz",
684 "integrity": "sha512-hfDMDqaqOqsUVGiEPSMLR/AjTSCsmJwjpKkYQRo1FNbmW4tBwBspYDwO9eh7sKSTwMQgBw9/T4DHudPaqshRWA==",
692 685 "dev": true,
693 686 "dependencies": {
694 687 "@eslint-community/eslint-utils": "^4.4.0",
695 "@typescript-eslint/scope-manager": "7.13.1",
696 "@typescript-eslint/types": "7.13.1",
697 "@typescript-eslint/typescript-estree": "7.13.1"
688 "@typescript-eslint/scope-manager": "7.15.0",
689 "@typescript-eslint/types": "7.15.0",
690 "@typescript-eslint/typescript-estree": "7.15.0"
698 691 },
699 692 "engines": {
700 693 "node": "^18.18.0 || >=20.0.0"
@@ -708,12 +701,12 @@
708 701 }
709 702 },
710 703 "node_modules/@typescript-eslint/visitor-keys": {
711 "version": "7.13.1",
712 "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.13.1.tgz",
713 "integrity": "sha512-k/Bfne7lrP7hcb7m9zSsgcBmo+8eicqqfNAJ7uUY+jkTFpKeH2FSkWpFRtimBxgkyvqfu9jTPRbYOvud6isdXA==",
704 "version": "7.15.0",
705 "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.15.0.tgz",
706 "integrity": "sha512-Hqgy/ETgpt2L5xueA/zHHIl4fJI2O4XUE9l4+OIfbJIRSnTJb/QscncdqqZzofQegIJugRIF57OJea1khw2SDw==",
714 707 "dev": true,
715 708 "dependencies": {
716 "@typescript-eslint/types": "7.13.1",
709 "@typescript-eslint/types": "7.15.0",
717 710 "eslint-visitor-keys": "^3.4.3"
718 711 },
719 712 "engines": {
@@ -3604,9 +3597,9 @@
3604 3597 }
3605 3598 },
3606 3599 "node_modules/typescript": {
3607 "version": "5.2.2",
3608 "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz",
3609 "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==",
3600 "version": "5.5.3",
3601 "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz",
3602 "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==",
3610 3603 "dev": true,
3611 3604 "bin": {
3612 3605 "tsc": "bin/tsc",
Modified package.json +3 -4
@@ -22,18 +22,17 @@
22 22 "winston-daily-rotate-file": "^4.7.1"
23 23 },
24 24 "devDependencies": {
25 "@tsconfig/node20": "^1.0.0",
26 25 "@types/express": "^4.17.20",
27 26 "@types/morgan": "^1.9.7",
28 "@typescript-eslint/eslint-plugin": "^7.13.1",
29 "@typescript-eslint/parser": "^7.13.1",
27 "@typescript-eslint/eslint-plugin": "^7.14",
28 "@typescript-eslint/parser": "^7.14",
30 29 "eslint": "^8.56.0",
31 30 "eslint-plugin-prettier": "^5.1.3",
32 31 "morgan": "^1.10.0",
33 32 "prettier": "^3.2.4",
34 33 "ts-node-dev": "^2.0.0",
35 34 "tsconfig-paths": "^4.2.0",
36 "typescript": "^5.2.2"
35 "typescript": "^5.5"
37 36 },
38 37 "engines": {
39 38 "node": ">=18.15.0",
Modified src/services/inventoryService.ts +2 -2
@@ -72,14 +72,14 @@ export const combineInventoryChanges = (InventoryChanges: IInventoryChanges, del
72 72 InventoryChanges[key] = delta[key];
73 73 } else if (Array.isArray(delta[key])) {
74 74 const left = InventoryChanges[key] as object[];
75 const right = delta[key] as object[];
75 const right: object[] = delta[key];
76 76 for (const item of right) {
77 77 left.push(item);
78 78 }
79 79 } else {
80 80 console.assert(key.substring(-3) == "Bin");
81 81 const left = InventoryChanges[key] as IBinChanges;
82 const right = delta[key] as IBinChanges;
82 const right: IBinChanges = delta[key];
83 83 left.count += right.count;
84 84 left.platinum += right.platinum;
85 85 left.Slots += right.Slots;
Modified src/services/missionInventoryUpdateService.ts +2 -2
@@ -187,7 +187,7 @@ const addRewardResponse = (
187 187 InventoryChanges[InventoryCategory] = [];
188 188 }
189 189
190 const existReward = InventoryChanges[InventoryCategory]!.find(item => item.ItemType === ItemType);
190 const existReward = InventoryChanges[InventoryCategory].find(item => item.ItemType === ItemType);
191 191 if (existReward) {
192 192 existReward.ItemCount += ItemCount;
193 193 const missionReward = MissionRewards.find(missionReward => missionReward.TypeName === ItemType);
@@ -195,7 +195,7 @@ const addRewardResponse = (
195 195 missionReward.ItemCount += ItemCount;
196 196 }
197 197 } else {
198 InventoryChanges[InventoryCategory]!.push({ ItemType, ItemCount });
198 InventoryChanges[InventoryCategory].push({ ItemType, ItemCount });
199 199 MissionRewards.push({
200 200 ItemCount,
201 201 TweetText: ItemType, // ensure if/how this even still used, or if it's needed at all
Modified tsconfig.json +3 -4
@@ -1,5 +1,4 @@
1 1 {
2 "extends": "@tsconfig/node20/tsconfig.json",
3 2 "compilerOptions": {
4 3 /* Visit https://aka.ms/tsconfig to read more about this file */
5 4
@@ -12,8 +11,8 @@
12 11 // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
13 12
14 13 /* Language and Environment */
15 //"target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
16 // "lib": ["es2023"], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
14 "target": "es2022" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
15 "lib": ["es2023"] /* Specify a set of bundled library declaration files that describe the target runtime environment. */,
17 16 // "jsx": "preserve", /* Specify what JSX code is generated. */
18 17 // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
19 18 // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
@@ -26,7 +25,7 @@
26 25 // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
27 26
28 27 /* Modules */
29 //"module": "commonjs" /* Specify what module code is generated. */,
28 "module": "node16" /* Specify what module code is generated. */,
30 29 // "rootDir": "./", /* Specify the root folder within your source files. */
31 30 // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
32 31 // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */