Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ on:
- 'src/**'
- 'example/android/**'
- 'example/src/**'
- 'example/package.json'
- 'example/metro.config.js'
- 'package.json'
- 'bun.lock'
- 'bunfig.toml'
- 'e2e/**'
push:
branches:
Expand All @@ -34,11 +39,6 @@ jobs:
shell: bash
run: bun install

- name: Install example dependencies
shell: bash
run: bun install
working-directory: example

- uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: 'zulu'
Expand Down Expand Up @@ -88,10 +88,6 @@ jobs:
disable-animations: false
script: echo "Generated AVD snapshot for caching."

- name: Install e2e dependencies
run: bun install
working-directory: e2e

- name: Run e2e tests
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed # v2.34.0
env:
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ on:
- 'src/**'
- 'example/ios/**'
- 'example/src/**'
- 'example/package.json'
- 'example/metro.config.js'
- 'package.json'
- 'bun.lock'
- 'bunfig.toml'
- 'e2e/**'
push:
branches:
Expand All @@ -34,11 +39,6 @@ jobs:
shell: bash
run: bun install

- name: Install example dependencies
shell: bash
run: bun install
working-directory: example

- name: Cache Pods
id: cache-pods
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
Expand All @@ -61,10 +61,6 @@ jobs:
run: |
bun example:ios:release

- name: Install e2e dependencies
run: bun install
working-directory: e2e

- name: Run e2e tests
run: bun run test:ios
working-directory: e2e
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ jobs:
shell: bash
run: bun install

- name: Install example dependencies
shell: bash
run: bun install
working-directory: example

- name: Check formatting
run: bun run format:check

Expand All @@ -46,10 +41,6 @@ jobs:
run: bun run typescript
working-directory: example

- name: Install e2e dependencies
run: bun install
working-directory: e2e

- name: Typecheck e2e
run: bun run typecheck
working-directory: e2e
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ We want this community to be friendly and respectful to each other. Please follo

## Development workflow

To get started with the project, run `bun install` in the root directory to install the required dependencies for each package:
To get started with the project, run `bun install` in the root directory to install dependencies for the library, the example app and the e2e tests:

```sh
bun install
```

> While it's possible to use [`npm`](https://github.com/npm/cli) or [`yarn`](https://yarnpkg.com/cli), the tooling is built around [`bun`](https://bun.sh/), so you'll have an easier time if you use `bun` for development.
> This project requires [`bun`](https://bun.sh/) for development. It uses Bun workspaces and a `link:` override that points `react-native-pager-view` (a peer dependency of the example app's navigation libraries) at the local source, and the scripts invoke `bun` directly, so installing with `npm` or `yarn` is not supported.

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.

Expand Down
492 changes: 479 additions & 13 deletions bun.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions bunfig.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[install]
linker = "hoisted"
4 changes: 2 additions & 2 deletions e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ tree, so the same file runs on both platforms.
## Setup

```bash
cd e2e && bun install
npx agent-device doctor
bun install # from the repository root
cd e2e && npx agent-device doctor
```

`agent-device doctor` checks for Xcode with a simulator runtime, or the Android
Expand Down
223 changes: 0 additions & 223 deletions e2e/bun.lock

This file was deleted.

15 changes: 8 additions & 7 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ react {
/* Folders */
// The root of your project, i.e. where "package.json" lives. Default is '../..'
// root = file("../../")
// The folder where the react-native NPM package is. Default is ../../node_modules/react-native
// reactNativeDir = file("../../node_modules/react-native")
// The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
// codegenDir = file("../../node_modules/@react-native/codegen")
// The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js
// cliFile = file("../../node_modules/react-native/cli.js")
// The folder where the react-native NPM package is. Hoisted to the workspace root.
reactNativeDir = file("../../../node_modules/react-native")
// The folder where the react-native Codegen package is. Hoisted to the workspace root.
codegenDir = file("../../../node_modules/@react-native/codegen")
// The cli.js file which is the React Native CLI entrypoint. Hoisted to the workspace root.
cliFile = file("../../../node_modules/react-native/cli.js")

/* Variants */
// The list of variants to that are debuggable. For those we're going to
Expand Down Expand Up @@ -45,7 +45,8 @@ react {

/* Hermes Commands */
// The hermes compiler command to run. By default it is 'hermesc'
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
// hermes-compiler is hoisted to the workspace root.
hermesCommand = "$rootDir/../../node_modules/hermes-compiler/hermesc/%OS-BIN%/hermesc"
//
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]
Expand Down
4 changes: 2 additions & 2 deletions example/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
pluginManagement { includeBuild("../../node_modules/@react-native/gradle-plugin") }
plugins { id("com.facebook.react.settings") }
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
rootProject.name = 'PagerViewExample'
include ':app'
includeBuild('../node_modules/@react-native/gradle-plugin')
includeBuild('../../node_modules/@react-native/gradle-plugin')
Loading
Loading