Merge branch 'hotfix/v2.0.13'

This commit is contained in:
zkldi
2021-12-17 00:56:48 +00:00
5 changed files with 41 additions and 8 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "tachi-server",
"version": "2.0.10",
"version": "2.0.13",
"description": "A score tracking server.",
"main": "js/index.js",
"private": true,
@@ -83,7 +83,7 @@
"rimraf": "3.0.2",
"safe-json-stringify": "1.2.0",
"seq-logging": "^1.1.1",
"tachi-common": "0.3.21",
"tachi-common": "0.3.22",
"ts-node": "10.0.0",
"typescript": "4.3.4",
"winston": "3.3.3",
+4 -4
View File
@@ -63,7 +63,7 @@ specifiers:
safe-json-stringify: 1.2.0
seq-logging: ^1.1.1
supertest: 6.1.3
tachi-common: 0.3.21
tachi-common: 0.3.22
tap: 15.0.9
ts-node: 10.0.0
tsconfig-paths: 3.10.1
@@ -107,7 +107,7 @@ dependencies:
rimraf: 3.0.2
safe-json-stringify: 1.2.0
seq-logging: 1.1.1
tachi-common: 0.3.21
tachi-common: 0.3.22
ts-node: 10.0.0_83f53b0a0c5616d3fa00ed4e30b9ce1b
typescript: 4.3.4
winston: 3.3.3
@@ -5387,8 +5387,8 @@ packages:
strip-ansi: 6.0.0
dev: true
/tachi-common/0.3.21:
resolution: {integrity: sha512-gOaqyEMLrDr0xpmtVqjAYqdY+NgbpaVHZlt0g0v+nmKDMG9gyrqd99alUApUb/o0zzLd8o2uediajgWGcDTCFw==}
/tachi-common/0.3.22:
resolution: {integrity: sha512-nLt1wv65wY5WdB/QXuVNeOOgA8r2c8OrohGEKyylE5wRyWIA8wOVsZJGPxi9Uxm0TqeVDXwBRV8CyV97czZAMA==}
dependencies:
monk: 7.3.4
transitivePeerDependencies:
@@ -9,7 +9,7 @@ const logger = CreateLogCtx(__filename);
if (require.main === module) {
let i = 0;
db.scores
.find({ game: "chunithm", "scoreData.grade": "SS" })
.find({ game: "chunithm", "scoreData.grade": null })
// @ts-expect-error dumb
.each(async (oldScore, { pause, resume }) => {
pause();
+1 -1
View File
@@ -4,7 +4,7 @@
const MAJOR = 2;
const MINOR = 0;
const PATCH = 10;
const PATCH = 13;
// As is with all front-facing zkldi projects, the version names for tachi-server
// are from an album I like. In this case, the album is Portishead - Dummy.
@@ -0,0 +1,33 @@
import t from "tap";
import { GetGradeFromPercent } from "./score-utils";
t.test("#GetGradeForPercent", (t) => {
t.equal(
GetGradeFromPercent("chunithm", "Single", 101),
"SSS",
"Should return SSS for the edge case of chunithms 101% == SS."
);
t.equal(
GetGradeFromPercent("iidx", "SP", 100),
"MAX",
"Should return SSS for the edge case of 100% == MAX (iidx SP)."
);
t.equal(
GetGradeFromPercent("iidx", "DP", 100),
"MAX",
"Should return SSS for the edge case of 100% == MAX (iidx DP)."
);
t.equal(
GetGradeFromPercent("iidx", "SP", 0),
"F",
"Should return SSS for the edge case of 0% == F (iidx SP)."
);
t.equal(
GetGradeFromPercent("iidx", "DP", 0),
"F",
"Should return SSS for the edge case of 0% == F (iidx DP)."
);
t.end();
});