mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 15:24:52 +09:00
Add MajorMinorVersion type and dedupe the game version regex
Address review feedback: introduce a MajorMinorVersion type with isMajorMinorVersion, rename majorMinorVersion to normaliseMajorMinorVersion, and type ModInfo.factorioVersion as MajorMinorVersion so already-reduced values are not re-reduced (ModPackViewPage uses mod.info.factorioVersion directly). Reuse the single gameVersionRegExp in both GameVersionSchema and normaliseGameVersion instead of duplicating the pattern. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
97a6c32838
commit
7c2793752d
6 files changed
+47
-21
No files matched your search
@@ -114,7 +114,7 @@ modCommands.add(new lib.Command({
|
||||
}
|
||||
let response = await control.send(new lib.ModSearchRequest(
|
||||
args.query,
|
||||
lib.majorMinorVersion(searchVersion),
|
||||
lib.normaliseMajorMinorVersion(searchVersion),
|
||||
args.page,
|
||||
args.pageSize,
|
||||
args.sort,
|
||||
|
||||
Reference in new issue
Block a user