react-native-bootsplash
react-native-bootsplash copied to clipboard
Unexpected XML comments removal and code prettification
Before submitting a new issue
- [X] I tested using the latest version of the library, as the bug might be already fixed.
- [X] I tested using a supported version of react native.
- [X] I checked for possible duplicate issues, with possible answers.
Bug summary
Hi, first of all, thanks for all the hard work on this package! ๐
I'm currently upgrading from version 4 to version 6 and noticed a few issues that might be worth addressing:
-
XML Comments Removal:
After the upgrade, I saw that comments in my XML files are being removed. This feels like a breaking change as it modifies the code beyond the expected scope of this package. It can potentially cause issues, especially for builds that rely on tools like Plop or custom scripts, which use comments as anchors to auto-generate content in specific parts of the code. -
Code Prettification:
The code is being automatically prettified, which generates unnecessary and often unwanted diffs. This is a bit unexpected since the package should ideally only modify the parts of the code it needs to. -
Question about Assets:
One thing I'm still trying to understand is, when generating for iOS and Android, whatโs the reason for generating theassets/bootsplash
files? Maybe Iโm missing something obvious here! ๐
Thanks again for your time and help! Would love to get some clarity or improvements around this. ๐
Library version
6.1.x
Environment info
System:
OS: macOS 14.6.1
CPU: (12) arm64 Apple M2 Pro
Memory: 358.36 MB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.17.0
path: /var/folders/03/y0ddfp013tng9zsw9_vbv15m0000gn/T/yarn--1727080227664-0.5818209195347468/node
Yarn:
version: 1.22.21
path: /var/folders/03/y0ddfp013tng9zsw9_vbv15m0000gn/T/yarn--1727080227664-0.5818209195347468/yarn
npm:
version: 10.8.2
path: ~/.nvm/versions/node/v20.17.0/bin/npm
Watchman:
version: 2024.08.19.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.14.3
path: /Users/<username>/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.2
- iOS 17.2
- macOS 14.2
- tvOS 17.2
- watchOS 10.2
Android SDK: Not Found
IDEs:
Android Studio: 2023.1 AI-231.9392.1.2311.11076708
Xcode:
version: 15.1/15C65
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.9
path: /usr/bin/javac
Ruby:
version: 3.2.1
path: /Users/<username>/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.73.9
wanted: 0.73.9
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Steps to reproduce
Steps to reproduce:
-
Before the upgrade (v4.5.2):
- XML comments were retained in the files, preserving any annotations.
- The package only modified the exact portions of the code it needed to, without affecting formatting.
- No extra
assets/bootsplash
files were generated.
-
After the upgrade (v6.1.x):
- XML comments are now removed, which can break workflows relying on comments as anchors.
- The code is being prettified automatically, causing unwanted diffs, in sections of code that werenโt modified by the package.
- Extra
assets/bootsplash
files are generated for both iOS and Android.
Reproducible sample code
react-native generate-bootsplash image.jpg