Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update project to pnpm and biome #96

Merged
merged 7 commits into from
Sep 24, 2024
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
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