mm_config 2.1.4 → 2.1.5

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/index.js CHANGED
@@ -65,7 +65,7 @@ Config.prototype.setConfig = function (config) {
65
65
  * @param {Object} options - 配置对象
66
66
  */
67
67
  Config.prototype.setOptions = function (options) {
68
- Object.assign(this.options, options);
68
+ $.push(this.options, options, true);
69
69
  }
70
70
 
71
71
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_config",
3
- "version": "2.1.4",
3
+ "version": "2.1.5",
4
4
  "description": "这是超级美眉配置同步器,用于更改配置同步保存为JSON文件",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/test.js CHANGED
@@ -129,6 +129,13 @@ async function testMethods() {
129
129
 
130
130
  const state = await cg.get('state');
131
131
  $.log.debug('获取到的状态:', state);
132
+
133
+ // 测试设置选项
134
+ await cg.setOptions({
135
+ sort: 200,
136
+ state: "2"
137
+ });
138
+ $.log.debug('设置后的选项:', await cg.options);
132
139
  }
133
140
 
134
141
  // 测试缓存清理功能
package/cache_test1.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "test": "cache1_new"
3
- }
package/cache_test2.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "test": "cache2_new"
3
- }
package/cache_test3.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "test": "cache3_new"
3
- }
package/config1.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "name": "test1",
3
- "state": 1,
4
- "sort": 1,
5
- "age": 26
6
- }
package/config2.json DELETED
@@ -1,4 +0,0 @@
1
- {
2
- "name": "test2",
3
- "sort": 2
4
- }
package/config_async.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "name": "asyncTest2",
3
- "state": 3,
4
- "timestamp": "2025-12-07T09:25:55.408Z"
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "name": "debounceDemo",
3
- "value": 4,
4
- "timestamp": "2025-12-07T09:25:55.414Z"
5
- }
package/config_json5.json DELETED
@@ -1,4 +0,0 @@
1
- {
2
- "name": "json5Demo",
3
- "description": "This uses JSON5 format"
4
- }