Skip to content

Commit 8ac5d81

Browse files
RezaulRezaul
authored andcommitted
fix: package name
1 parent 1b51f2f commit 8ac5d81

9 files changed

Lines changed: 48 additions & 46 deletions

File tree

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ A professional-grade React Native module providing seamless USB serial communica
4848
> **Android Only:** This package only works on Android devices. It will not function on iOS.
4949
5050
```bash
51-
npm install react-native-usb-serial
51+
npm install @rejaul/react-native-usb-serial
5252
# or
53-
yarn add react-native-usb-serial
53+
yarn add @rejaul/react-native-usb-serial
5454
```
5555

5656
### Android Configuration
@@ -70,7 +70,7 @@ Add USB permissions to your `AndroidManifest.xml`:
7070
import {
7171
getDeviceList,
7272
type UsbDevice,
73-
} from 'react-native-usb-serial';
73+
} from '@rejaul/react-native-usb-serial';
7474

7575
// Get all connected USB devices
7676
const devices: UsbDevice[] = getDeviceList();
@@ -90,7 +90,7 @@ import {
9090
requestUsbPermission,
9191
connect,
9292
disconnect,
93-
} from 'react-native-usb-serial';
93+
} from '@rejaul/react-native-usb-serial';
9494

9595
async function connectToDevice(device: UsbDevice): Promise<void> {
9696
try {
@@ -128,7 +128,7 @@ import {
128128
offReadInterval,
129129
type RawReadConfig,
130130
NativeEventEmitter,
131-
} from 'react-native-usb-serial';
131+
} from '@rejaul/react-native-usb-serial';
132132

133133
// Configure reading parameters
134134
const readConfig: RawReadConfig = {
@@ -158,7 +158,7 @@ subscription.remove();
158158
### Writing Data to Serial Port
159159

160160
```typescript
161-
import { write, isConnected } from 'react-native-usb-serial';
161+
import { write, isConnected } from '@rejaul/react-native-usb-serial';
162162

163163
async function sendCommand(command: string): Promise<void> {
164164
try {
@@ -181,7 +181,7 @@ await sendCommand('AT+RST\r\n');
181181
### Manual Serial Reading
182182

183183
```typescript
184-
import { read } from 'react-native-usb-serial';
184+
import { read } from '@rejaul/react-native-usb-serial';
185185

186186
async function readSerialData(): Promise<void> {
187187
try {
@@ -210,7 +210,7 @@ import {
210210
type SoilSensorConfig,
211211
type SoilData,
212212
NativeEventEmitter,
213-
} from 'react-native-usb-serial';
213+
} from '@rejaul/react-native-usb-serial';
214214

215215
// Configure modbus soil sensor
216216
const soilConfig: SoilSensorConfig = {
@@ -251,7 +251,7 @@ subscription.remove();
251251
### Get Currently Connected Device
252252

253253
```typescript
254-
import { getConnectedDevice } from 'react-native-usb-serial';
254+
import { getConnectedDevice } from '@rejaul/react-native-usb-serial';
255255

256256
const device = await getConnectedDevice();
257257
if (device) {
@@ -289,7 +289,7 @@ soilSub.remove();
289289
## Error Handling
290290

291291
```typescript
292-
import { connect, type UsbDevice } from 'react-native-usb-serial';
292+
import { connect, type UsbDevice } from '@rejaul/react-native-usb-serial';
293293

294294
async function safeConnect(device: UsbDevice): Promise<void> {
295295
try {

example/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"build:ios": "react-native build-ios --mode Debug"
1111
},
1212
"dependencies": {
13+
"@rejaul/react-native-usb-serial": "workspace:*",
1314
"react": "19.2.0",
1415
"react-native": "0.83.0"
1516
},

example/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
offReadInterval,
2121
write,
2222
type UsbDevice,
23-
} from 'react-native-usb-serial';
23+
} from '@rejaul/react-native-usb-serial';
2424

2525
interface DeviceItemProps {
2626
device: UsbDevice;

example/src/examples/DeviceManagementExample.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
requestUsbPermission,
2222
getConnectedDevice,
2323
type UsbDevice,
24-
} from 'react-native-usb-serial';
24+
} from '@rejaul/react-native-usb-serial';
2525

2626
interface DeviceState {
2727
allDevices: UsbDevice[];

example/src/examples/SerialCommunicationExample.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {
1919
write,
2020
isConnected,
2121
type RawReadConfig,
22-
} from 'react-native-usb-serial';
22+
} from '@rejaul/react-native-usb-serial';
2323

2424
interface SerialData {
2525
timestamp: number;

example/src/examples/SoilSensorExample.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
offReadSoilDataInterval,
1919
type SoilSensorConfig,
2020
type SoilData,
21-
} from 'react-native-usb-serial';
21+
} from '@rejaul/react-native-usb-serial';
2222

2323
interface SensorReading {
2424
timestamp: number;

example/src/hooks/useUsbSerial.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
requestUsbPermission,
88
isConnected,
99
type UsbDevice,
10-
} from 'react-native-usb-serial';
10+
} from '@rejaul/react-native-usb-serial';
1111

1212
export interface UseUsbSerialReturn {
1313
devices: UsbDevice[];

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "react-native-usb-serial",
2+
"name": "@rejaul/react-native-usb-serial",
33
"version": "0.0.1",
44
"description": "Production-ready React Native USB serial communication module for Android with Modbus RTU soil sensor support",
55
"main": "./lib/module/index.js",

yarn.lock

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3115,6 +3115,36 @@ __metadata:
31153115
languageName: node
31163116
linkType: hard
31173117

3118+
"@rejaul/react-native-usb-serial@workspace:*, @rejaul/react-native-usb-serial@workspace:.":
3119+
version: 0.0.0-use.local
3120+
resolution: "@rejaul/react-native-usb-serial@workspace:."
3121+
dependencies:
3122+
"@commitlint/config-conventional": "npm:^19.8.1"
3123+
"@eslint/compat": "npm:^1.3.2"
3124+
"@eslint/eslintrc": "npm:^3.3.1"
3125+
"@eslint/js": "npm:^9.35.0"
3126+
"@react-native/babel-preset": "npm:0.83.0"
3127+
"@react-native/eslint-config": "npm:0.83.0"
3128+
"@release-it/conventional-changelog": "npm:^10.0.1"
3129+
"@types/jest": "npm:^29.5.14"
3130+
"@types/react": "npm:^19.2.0"
3131+
commitlint: "npm:^19.8.1"
3132+
del-cli: "npm:^6.0.0"
3133+
eslint: "npm:^9.35.0"
3134+
jest: "npm:^29.7.0"
3135+
lefthook: "npm:^2.0.3"
3136+
react: "npm:19.2.0"
3137+
react-native: "npm:0.83.0"
3138+
react-native-builder-bob: "npm:^0.40.13"
3139+
release-it: "npm:^19.0.4"
3140+
turbo: "npm:^2.5.6"
3141+
typescript: "npm:^5.9.2"
3142+
peerDependencies:
3143+
react: "*"
3144+
react-native: "*"
3145+
languageName: unknown
3146+
linkType: soft
3147+
31183148
"@release-it/conventional-changelog@npm:^10.0.1":
31193149
version: 10.0.5
31203150
resolution: "@release-it/conventional-changelog@npm:10.0.5"
@@ -10031,6 +10061,7 @@ __metadata:
1003110061
"@react-native/babel-preset": "npm:0.83.0"
1003210062
"@react-native/metro-config": "npm:0.83.0"
1003310063
"@react-native/typescript-config": "npm:0.83.0"
10064+
"@rejaul/react-native-usb-serial": "workspace:*"
1003410065
"@types/react": "npm:^19.2.0"
1003510066
react: "npm:19.2.0"
1003610067
react-native: "npm:0.83.0"
@@ -10039,36 +10070,6 @@ __metadata:
1003910070
languageName: unknown
1004010071
linkType: soft
1004110072

10042-
"react-native-usb-serial@workspace:.":
10043-
version: 0.0.0-use.local
10044-
resolution: "react-native-usb-serial@workspace:."
10045-
dependencies:
10046-
"@commitlint/config-conventional": "npm:^19.8.1"
10047-
"@eslint/compat": "npm:^1.3.2"
10048-
"@eslint/eslintrc": "npm:^3.3.1"
10049-
"@eslint/js": "npm:^9.35.0"
10050-
"@react-native/babel-preset": "npm:0.83.0"
10051-
"@react-native/eslint-config": "npm:0.83.0"
10052-
"@release-it/conventional-changelog": "npm:^10.0.1"
10053-
"@types/jest": "npm:^29.5.14"
10054-
"@types/react": "npm:^19.2.0"
10055-
commitlint: "npm:^19.8.1"
10056-
del-cli: "npm:^6.0.0"
10057-
eslint: "npm:^9.35.0"
10058-
jest: "npm:^29.7.0"
10059-
lefthook: "npm:^2.0.3"
10060-
react: "npm:19.2.0"
10061-
react-native: "npm:0.83.0"
10062-
react-native-builder-bob: "npm:^0.40.13"
10063-
release-it: "npm:^19.0.4"
10064-
turbo: "npm:^2.5.6"
10065-
typescript: "npm:^5.9.2"
10066-
peerDependencies:
10067-
react: "*"
10068-
react-native: "*"
10069-
languageName: unknown
10070-
linkType: soft
10071-
1007210073
"react-native@npm:0.83.0":
1007310074
version: 0.83.0
1007410075
resolution: "react-native@npm:0.83.0"

0 commit comments

Comments
 (0)