react-native-lingua 0.1.2 → 0.2.0

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.
Files changed (2) hide show
  1. package/Lingua.podspec +16 -12
  2. package/package.json +13 -11
package/Lingua.podspec CHANGED
@@ -20,30 +20,34 @@ Pod::Spec.new do |s|
20
20
  # Build Rust library from source during pod install
21
21
  s.prepare_command = <<-CMD
22
22
  set -e
23
-
23
+
24
24
  # Check if Rust is installed
25
25
  if ! command -v cargo &> /dev/null; then
26
- echo " Error: Rust is not installed."
26
+ echo "[ERROR] Rust is not installed."
27
27
  echo "Please install Rust: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"
28
28
  exit 1
29
29
  fi
30
-
30
+
31
31
  # Check if iOS targets are installed
32
32
  if ! rustup target list --installed | grep -q "aarch64-apple-ios"; then
33
- echo " Error: iOS Rust targets not installed."
33
+ echo "[ERROR] iOS Rust targets not installed."
34
34
  echo "Please run: rustup target add aarch64-apple-ios aarch64-apple-ios-sim"
35
35
  exit 1
36
36
  fi
37
-
37
+
38
+ # Clean previous builds
39
+ rm -rf rust/generated/liblingua_native.xcframework
40
+ rm -rf ios/liblingua_native.xcframework
41
+
38
42
  # Build the xcframework
39
43
  cd rust
40
44
  make header
41
-
45
+
42
46
  # Build for iOS targets
43
- echo "Building Rust library for iOS..."
47
+ echo "[INFO] Building Rust library for iOS..."
44
48
  cargo build --release --target aarch64-apple-ios
45
49
  cargo build --release --target aarch64-apple-ios-sim
46
-
50
+
47
51
  # Create xcframework
48
52
  mkdir -p generated/include
49
53
  xcodebuild -create-xcframework \
@@ -52,12 +56,12 @@ Pod::Spec.new do |s|
52
56
  -library target/aarch64-apple-ios-sim/release/liblingua_native.a \
53
57
  -headers generated/include \
54
58
  -output generated/liblingua_native.xcframework
55
-
59
+
56
60
  # Copy to ios directory
57
- cp -rf generated/*.xcframework ../ios/
61
+ cp -rf generated/liblingua_native.xcframework ../ios/
58
62
  cp -f generated/include/liblingua.h ../cpp/
59
-
60
- echo " Rust library built successfully"
63
+
64
+ echo "[SUCCESS] Rust library built successfully"
61
65
  CMD
62
66
 
63
67
  install_modules_dependencies(s)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-lingua",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "A lingua-rs wrapper for React Native",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -39,6 +39,16 @@
39
39
  "README.md",
40
40
  "LICENSE"
41
41
  ],
42
+ "scripts": {
43
+ "example": "pnpm --filter react-native-lingua-example",
44
+ "test": "jest",
45
+ "typecheck": "tsc",
46
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
47
+ "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
48
+ "build:rust": "cd rust && make all",
49
+ "prepare": "bob build",
50
+ "release": "release-it --only-version"
51
+ },
42
52
  "workspaces": [
43
53
  "example"
44
54
  ],
@@ -87,6 +97,7 @@
87
97
  "react": "*",
88
98
  "react-native": "*"
89
99
  },
100
+ "packageManager": "pnpm@10.14.0",
90
101
  "jest": {
91
102
  "preset": "react-native",
92
103
  "modulePathIgnorePatterns": [
@@ -158,14 +169,5 @@
158
169
  },
159
170
  "dependencies": {
160
171
  "@babel/runtime": "^7.28.4"
161
- },
162
- "scripts": {
163
- "example": "pnpm --filter react-native-lingua-example",
164
- "test": "jest",
165
- "typecheck": "tsc",
166
- "lint": "eslint \"**/*.{js,ts,tsx}\"",
167
- "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
168
- "build:rust": "cd rust && make all",
169
- "release": "release-it --only-version"
170
172
  }
171
- }
173
+ }