@react-native-oh/react-native-harmony-cli 0.72.143 → 0.72.145

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/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # @react-native-oh/react-native-harmony-cli
2
2
 
3
- Please refer to: [RNOH repo](https://gitee.com/openharmony-sig/ohos_react_native) for more detail.
3
+ Please refer to: [RNOH repo](https://gitcode.com/CPF-RN/ohos_react_native) for more detail.
4
4
 
5
5
  # Documentation
6
6
 
7
- - [中文](https://gitee.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/README.md)
8
- - [English](https://gitee.com/openharmony-sig/ohos_react_native/blob/master/docs/en/README.md)
7
+ - [中文](https://gitcode.com/CPF-RN/ohos_react_native/tree/main/docs/zh-cn)
8
+ - [English](https://gitcode.com/CPF-RN/ohos_react_native/tree/main/docs/en)
9
9
 
10
10
  # License
11
11
 
12
- This library is licensed under The [MIT License (MIT)](https://gitee.com/openharmony-sig/ohos_react_native)
12
+ This library is licensed under The [MIT License (MIT)](https://gitcode.com/CPF-RN/ohos_react_native)
@@ -36,7 +36,11 @@ class JSON5Writer {
36
36
  // Return the modified source with JSON5-style formatting
37
37
  // Use double quotes for both keys and values, and trailing commas
38
38
  // quoteKeys: true ensures keys with special characters (like @, /, -) are properly quoted
39
- return writer.toSource({ quote: 'double', quoteKeys: true, trailingComma: true }) + '\n';
39
+ // NOTE: toSource() preserves the original trailing newlines, so strip them
40
+ // before appending exactly one — otherwise every rewrite appends an extra
41
+ // blank line and they accumulate across builds (idempotency fix).
42
+ const source = writer.toSource({ quote: 'double', quoteKeys: true, trailingComma: true });
43
+ return source.replace(/(\r?\n)+$/, '') + '\n';
40
44
  }
41
45
  /**
42
46
  * Updates dependencies with fallback to standard JSON5 stringify if preservation fails.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-oh/react-native-harmony-cli",
3
- "version": "0.72.143",
3
+ "version": "0.72.145",
4
4
  "description": "",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",