@otohime-site/parser 22.5.3 → 24.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dx_intl/player.js CHANGED
@@ -64,7 +64,7 @@ const parsePlayer = (content) => {
64
64
  const courseRank = parseInt(rawCourseRank, 10);
65
65
  const classRank = parseInt(rawClassRank, 10);
66
66
  assertBetween(rating, 0, 17000, "rating");
67
- assertBetween(courseRank, 0, 22, "courseRank");
67
+ assertBetween(courseRank, 0, 23, "courseRank");
68
68
  assertBetween(classRank, 0, 25, "classRank");
69
69
  if (courseRank === 11) {
70
70
  throw new Error("11 is not a expected course rank value");
@@ -4,13 +4,13 @@ export interface ScoresParseEntryWithoutScore {
4
4
  title: string;
5
5
  deluxe: boolean;
6
6
  difficulty: number;
7
- level: typeof LEVELS[number];
7
+ level: (typeof LEVELS)[number];
8
8
  }
9
9
  export interface ScoresParseEntryWithScore extends ScoresParseEntryWithoutScore {
10
10
  score: number;
11
11
  combo_flag: "" | "fc" | "fc+" | "ap" | "ap+";
12
- sync_flag: "" | "fs" | "fs+" | "fdx" | "fdx+";
12
+ sync_flag: "" | "s" | "fs" | "fs+" | "fdx" | "fdx+";
13
13
  }
14
- export declare type ScoresParseEntry = ScoresParseEntryWithoutScore | ScoresParseEntryWithScore;
14
+ export type ScoresParseEntry = ScoresParseEntryWithoutScore | ScoresParseEntryWithScore;
15
15
  declare const parseScores: (content: string | Document, categoryTo?: number, withNoScore?: boolean) => ScoresParseEntry[];
16
16
  export default parseScores;
package/dx_intl/scores.js CHANGED
@@ -104,9 +104,11 @@ const parseScores = (content, categoryTo = 6, withNoScore = false) => {
104
104
  return Object.assign(Object.assign({}, prevFlags), { combo_flag: "ap+" });
105
105
  }
106
106
  }
107
- const syncMatches = ((_b = currFlagImg.getAttribute("src")) !== null && _b !== void 0 ? _b : "").match(/(fs|fsp|fsd|fsdp)\.png/);
107
+ const syncMatches = ((_b = currFlagImg.getAttribute("src")) !== null && _b !== void 0 ? _b : "").match(/(sync|fs|fsp|fsd|fsdp)\.png/);
108
108
  if (syncMatches !== null) {
109
109
  switch (syncMatches[1]) {
110
+ case "sync":
111
+ return Object.assign(Object.assign({}, prevFlags), { sync_flag: "s" });
110
112
  case "fs":
111
113
  return Object.assign(Object.assign({}, prevFlags), { sync_flag: "fs" });
112
114
  case "fsp":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@otohime-site/parser",
3
- "version": "22.5.3",
3
+ "version": "24.1.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "types": "index.d.ts",
@@ -16,22 +16,20 @@
16
16
  "build": "rm -rf dist/ && tsc && cp README.md dist/ && jq 'del(.scripts.prepare)' package.json > dist/package.json"
17
17
  },
18
18
  "devDependencies": {
19
- "@typescript-eslint/eslint-plugin": "^5.25.0",
20
- "@typescript-eslint/parser": "^5.25.0",
19
+ "@typescript-eslint/eslint-plugin": "^6.19.0",
20
+ "@typescript-eslint/parser": "^6.19.0",
21
21
  "eslint": "^8.16.0",
22
- "eslint-config-prettier": "^8.3.0",
23
- "eslint-import-resolver-typescript": "^2.7.1",
24
- "eslint-plugin-import": "^2.26.0",
25
- "eslint-plugin-jest": "^26.2.2",
26
- "eslint-plugin-react": "^7.30.0",
27
- "eslint-plugin-react-hooks": "^4.5.0",
22
+ "eslint-config-prettier": "^9.0.0",
23
+ "eslint-import-resolver-typescript": "^3.6.1",
24
+ "eslint-plugin-import": "^2.29.1",
25
+ "eslint-plugin-jest": "^27.6.3",
28
26
  "husky": "^8.0.1",
29
- "jest": "^28.1.0",
30
- "jest-environment-jsdom": "^28.1.0",
31
- "lint-staged": "^12.4.1",
32
- "prettier": "^2.6.2",
33
- "ts-jest": "^28.0.2",
34
- "typescript": "^4.7.2"
27
+ "jest": "^29.7.0",
28
+ "jest-environment-jsdom": "^29.7.0",
29
+ "lint-staged": "^15.2.0",
30
+ "prettier": "^3.2.2",
31
+ "ts-jest": "^29.1.1",
32
+ "typescript": "^5.3.3"
35
33
  },
36
34
  "lint-staged": {
37
35
  "*.js,*.ts": "eslint --cache --fix",