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

refactor(ui/conf): better handling of mutable config #722

Merged
merged 5 commits into from
Dec 26, 2023

Conversation

qwqcode
Copy link
Member

@qwqcode qwqcode commented Dec 25, 2023

  • 增加 artalk.initartalk.updateConf 等操作的单元测试
  • 修改 mergeDeep 函数为创建新对象(immutable), 而不再是 in-place 作用于原始对象(不再修改调用函数时传入的对象)
  • 增加 getConfgetEl 函数,同时弃用 artalk.confartalk.$root

Close #720
Close #719
Close #718

@syfxlin
Copy link
Member

syfxlin commented Dec 26, 2023

已经验证过,可以正常使用🎉

@qwqcode
Copy link
Member Author

qwqcode commented Dec 26, 2023

已经验证过,可以正常使用🎉

ヾ(≧∇≦*)ゝ

@qwqcode qwqcode merged commit 4c2646e into master Dec 26, 2023
12 checks passed
@qwqcode qwqcode deleted the refactor/ui/conf branch December 26, 2023 14:06
qwqcode added a commit that referenced this pull request Dec 26, 2023
* fix(ui): mergeDeep causes some configurations to be overridden by the default configuration

* fix: config always get override by defaults

Signed-off-by: Frost Ming <[email protected]>

* refactor(ui/conf): better handling of mutable config

* chore: fix path issue on win env

* fix: mergeDeep avoid prototype pollution

BREAKING CHANGE: Directly referencing `artalk.conf` and `artalk.$root` is deprecated. Please use functions instead: `artalk.getConf()` and `artalk.getEl()`.

---------

Signed-off-by: Frost Ming <[email protected]>
Co-authored-by: syfxlin <[email protected]>
Co-authored-by: Frost Ming <[email protected]>
@frostming
Copy link
Contributor

太感谢了,下个版本发布时间有大概计划吗

@qwqcode
Copy link
Member Author

qwqcode commented Dec 28, 2023

刚刚修完一些其他的 BUG,新版 v2.7.3 已发布 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In version 2.7.x, mergeDeep causes some configurations to be overridden by the default configuration.
3 participants