Skip to content

Commit

Permalink
TCS-1286 RN 0.73 Upgrade (#75)
Browse files Browse the repository at this point in the history
* TCS-1286 docs: update contributing doc to reflect use of npm instead of yarn

* TCS-1286 build: switch example app to use npm

* TCS-1286 build: add xcode env to gitignore

* TCS-1286 build: upgrade RN from 0.72 to 0.73

* TCS-1286 build: use new rn babel package

* TCS-1286 build: lock RN to 0.73.1
  • Loading branch information
jyann authored Jan 5, 2024
1 parent 18499b5 commit bffdf5a
Show file tree
Hide file tree
Showing 7 changed files with 20,904 additions and 7,818 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ DerivedData
*.ipa
*.xcuserstate
project.xcworkspace
example/ios/.xcode.env.local

# Android/IJ
#
Expand Down
38 changes: 17 additions & 21 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,47 @@ We want this community to be friendly and respectful to each other. Please follo

## Development workflow

To get started with the project, run `yarn` in the root directory to install the required dependencies for each package:
To get started with the project, run `npm install` in the root directory to install the required dependencies for each package:

```sh
yarn
npm install
```

> While it's possible to use [`npm`](https://github.com/npm/cli), the tooling is built around [`yarn`](https://classic.yarnpkg.com/), so you'll have an easier time if you use `yarn` for development.
While developing, you can run the [example app](/example/) to test your changes. Any changes you make in your library's JavaScript code will be reflected in the example app without a rebuild. If you change any native code, then you'll need to rebuild the example app.

To start the packager:

```sh
yarn example start
npm run example:start
```

To run the example app on Android:

```sh
yarn example android
npm run example:android
```

To run the example app on iOS:

```sh
yarn example ios
npm run example:ios
```

Make sure your code passes TypeScript and ESLint. Run the following to verify:

```sh
yarn typescript
yarn lint
npm run typescript
npm run lint
```

To fix formatting errors, run the following:

```sh
yarn lint --fix
npm run lint --fix
```

Remember to add tests for your change if possible. Run the unit tests by:

```sh
yarn test
npm run test
```

To edit the Objective-C files, open `example/ios/IdscanSdkExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-idscan-sdk`.
Expand Down Expand Up @@ -83,20 +79,20 @@ We use [release-it](https://github.com/release-it/release-it) to make it easier
To publish new versions, run the following:

```sh
yarn release
npm run release
```

### Scripts

The `package.json` file contains various scripts for common tasks:

- `yarn bootstrap`: setup project by installing all dependencies and pods.
- `yarn typescript`: type-check files with TypeScript.
- `yarn lint`: lint files with ESLint.
- `yarn test`: run unit tests with Jest.
- `yarn example start`: start the Metro server for the example app.
- `yarn example android`: run the example app on Android.
- `yarn example ios`: run the example app on iOS.
- `npm run bootstrap`: setup project by installing all dependencies and pods.
- `npm run typescript`: type-check files with TypeScript.
- `npm run lint`: lint files with ESLint.
- `npm run test`: run unit tests with Jest.
- `npm run example:start`: start the Metro server for the example app.
- `npm run example:android`: run the example app on Android.
- `npm run example:ios`: run the example app on iOS.

### Sending a pull request

Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
presets: ['module:@react-native/babel-preset'],
};
Loading

0 comments on commit bffdf5a

Please sign in to comment.