Skip to content

Commit

Permalink
chore: update project to pnpm and biome (#96)
Browse files Browse the repository at this point in the history
Signed-off-by: Berend Sliedrecht <sliedrecht@berend.io>
  • Loading branch information
berendsliedrecht authored Sep 24, 2024
1 parent 68e14ef commit 870385f
Show file tree
Hide file tree
Showing 155 changed files with 10,954 additions and 15,958 deletions.
64 changes: 22 additions & 42 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,32 +24,25 @@ jobs:
name: Validate
steps:
- name: Checkout react-native-ble-didcomm
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
- name: Setup node v20
uses: actions/setup-node@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Setup node v16
uses: actions/setup-node@v2
node-version: 20

- uses: pnpm/action-setup@v4
with:
node-version: 16
version: 9

- name: Install dependencies
run: yarn install
run: pnpm install

- name: Prettier
run: yarn check-format
- name: lint
run: pnpm check

- name: Check typescript
run: yarn check-types
run: pnpm check:types
release:
runs-on: ubuntu-20.04
name: Release
Expand All @@ -58,53 +51,40 @@ jobs:
if: github.ref == 'refs/heads/main' && github.repository == 'animo/react-native-ble-didcomm' && github.event_name == 'workflow_dispatch'
steps:
- name: Checkout react-native-ble-didcomm
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: git config
run: |
git config user.name "@github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
- name: Setup node v20
uses: actions/setup-node@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Setup node v16
uses: actions/setup-node@v2
node-version: 20

- uses: pnpm/action-setup@v4
with:
node-version: 16
version: 9

- name: Install dependencies
run: yarn install

# https://github.com/yarnpkg/yarn/issues/6617#issuecomment-436222106
- name: Prepend Node path
run: npm config set scripts-prepend-node-path true

- name: Set Verbose Logging
run: npm config set loglevel verbose --global
run: pnpm install

- name: Set NPM config
run: |
echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN }}" >> .npmrc
echo "registry=https://registry.npmjs.org/" >> .npmrc
echo "always-auth=true" >> .npmrc
- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Build the library
run: yarn build
run: pnpm build

# On manual workflow dispatch release stable version
- name: Release version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn release ${{ github.event.inputs.releaseType }}
run: pnpm release ${{ github.event.inputs.releaseType }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ android/keystores/debug.keystore

# Tarballs
*.tgz

example/ios
example/android
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node-linker=hoisted
5 changes: 0 additions & 5 deletions .prettierrc

This file was deleted.

10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ can listen to incoming messages and send messages to the other participant.
First, you need to add the dependency to your project:

```sh
yarn add @animo-id/react-native-ble-didcomm
pnpm add @animo-id/react-native-ble-didcomm
```

### Android
Expand Down Expand Up @@ -246,14 +246,14 @@ When developing new features, you can use the application inside the `example/`
To get started you can run the following commands from the root of the project:

```sh
yarn example
pnpm example

yarn example start
pnpm example start

yarn example android
pnpm example android

pod install --project-directory=example/ios
yarn example ios
pnpm example ios
```

## Contributing
Expand Down
144 changes: 0 additions & 144 deletions android/build.gradle

This file was deleted.

Binary file removed android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 0 additions & 5 deletions android/gradle/wrapper/gradle-wrapper.properties

This file was deleted.

Loading

0 comments on commit 870385f

Please sign in to comment.