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
27 changes: 5 additions & 22 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Setup
description: Setup Node.js and install dependencies
description: Setup Node.js and Bun, then install dependencies

runs:
using: composite
Expand All @@ -9,28 +9,11 @@ runs:
with:
node-version-file: .nvmrc

- name: Restore dependencies
id: yarn-cache
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
path: |
**/node_modules
.yarn/install-state.gz
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
${{ runner.os }}-yarn-
bun-version: 1.3.1

- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable
run: bun install --frozen-lockfile
shell: bash

- name: Cache dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: |
**/node_modules
.yarn/install-state.gz
key: ${{ steps.yarn-cache.outputs.cache-primary-key }}
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
uses: ./.github/actions/setup

- name: Lint files
run: yarn lint
run: bun lint

- name: Typecheck files
run: yarn typecheck
run: bun typecheck

build-library:
runs-on: ubuntu-latest
Expand All @@ -42,7 +42,7 @@ jobs:
uses: ./.github/actions/setup

- name: Build package
run: yarn prepare
run: bun run prepare

build-web:
runs-on: ubuntu-latest
Expand All @@ -56,4 +56,4 @@ jobs:

- name: Build example for Web
run: |
yarn example expo export --platform web
bun example expo export --platform web
12 changes: 2 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,15 @@ example/vendor/
#
node_modules/
npm-debug.log
yarn-debug.log
yarn-error.log
bun-debug.log
bun-error.log

# BUCK
buck-out/
\.buckd/
android/app/libs
android/keystores/debug.keystore

# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Expo
.expo/

Expand Down
942 changes: 0 additions & 942 deletions .yarn/releases/yarn-4.11.0.cjs

This file was deleted.

4 changes: 0 additions & 4 deletions .yarnrc.yml

This file was deleted.

42 changes: 20 additions & 22 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,19 @@ We want this community to be friendly and respectful to each other. Please follo

## Development workflow

This project is a monorepo managed using [Yarn workspaces](https://yarnpkg.com/features/workspaces). It contains the following packages:
This project is a monorepo managed using [Bun workspaces](https://bun.sh/docs/install/workspaces). It contains the following packages:

- The library package in the root directory.
- An example app in the `example/` directory.

To get started with the project, make sure you have the correct version of [Node.js](https://nodejs.org/) installed. See the [`.nvmrc`](./.nvmrc) file for the version used in this project.
To get started, install Bun 1.3.1 and the version of [Node.js](https://nodejs.org/) specified in [`.nvmrc`](./.nvmrc).

Run `yarn` in the root directory to install the required dependencies for each package:
Run `bun install` in the root directory to install the required dependencies for each package:

```sh
yarn
bun install
```

> Since the project relies on Yarn workspaces, you cannot use [`npm`](https://github.com/npm/cli) for development without manually migrating.

The [example app](/example/) demonstrates usage of the library. You need to run it to test any changes you make.

It is configured to use the local version of the library, so any changes you make to the library's source code will be reflected in the example app. Changes to the library's JavaScript code will be reflected in the example app without a rebuild, but native code changes will require a rebuild of the example app.
Expand All @@ -30,19 +28,19 @@ You can use various commands from the root directory to work with the project.
To start the packager:

```sh
yarn example start
bun example start
```

To run the example app on Android:

```sh
yarn example android
bun example android
```

To run the example app on iOS:

```sh
yarn example ios
bun example ios
```

To confirm that the app is running with the new architecture, you can check the Metro logs for a message like this:
Expand All @@ -56,31 +54,31 @@ Note the `"fabric":true` and `"concurrentRoot":true` properties.
To run the example app on Web:

```sh
yarn example web
bun example web
```

Make sure your code passes TypeScript:

```sh
yarn typecheck
bun typecheck
```

To check for linting errors, run the following:

```sh
yarn lint
bun lint
```

To fix formatting errors, run the following:

```sh
yarn lint --fix
bun lint --fix
```

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

```sh
yarn test
bun run test
```


Expand All @@ -92,21 +90,21 @@ 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
bun release
```


### Scripts

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

- `yarn`: setup project by installing dependencies.
- `yarn typecheck`: type-check files with TypeScript.
- `yarn lint`: lint files with [ESLint](https://eslint.org/).
- `yarn test`: run unit tests with [Jest](https://jestjs.io/).
- `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.
- `bun install`: set up the project by installing dependencies.
- `bun typecheck`: type-check files with TypeScript.
- `bun lint`: lint files with [ESLint](https://eslint.org/).
- `bun run test`: run unit tests with [Jest](https://jestjs.io/).
- `bun example start`: start the Metro server for the example app.
- `bun example android`: run the example app on Android.
- `bun example ios`: run the example app on iOS.

### Sending a pull request

Expand Down
Loading
Loading