Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Roadmap for v3 #85

Open
5 tasks
dragon-fish opened this issue Nov 30, 2021 · 0 comments
Open
5 tasks

[RFC] Roadmap for v3 #85

dragon-fish opened this issue Nov 30, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@dragon-fish
Copy link
Member

GenshinKit v2 是用 TypeScript 基于 v1 的屎山代码重构的,虽然有了 types 支持,但是很多代码的逻辑因为技术债务事实上非常魔幻。

因此计划在近期进行一些逻辑重构和规范化。

本次更新将会是 major 更新,意味着大部分接口很可能不向前兼容。

拆分

  • getDS 拆分为独立包 @genshin-kit/dynamic-secret,版本号与米游社 App 同步(该包将作为官方 DS 生成器,这意味着将会支持用户自定义 DS 生成器以应对 mhy 突发更新)

命名规范

  • 将模块文件夹重命名为复数形式(utilutils
  • 使用 ES6 setter getter 取代 setCookie 等方法,这样校验数据更方便,逻辑也更清晰
  • 抛弃 getXxx setXxx 的命名方法, getUserRolesuserRoles (事实上 util.CharactersFilter 就遵守该命名规范)
  • 使用 # 字面量重命名私有变量,规范原有的 _ 开头的变量与方法
@dragon-fish dragon-fish added the enhancement New feature or request label Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant