Skip to content

Commit

Permalink
chore: move to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
chybisov committed Oct 7, 2024
1 parent de0f820 commit 1a95a22
Show file tree
Hide file tree
Showing 27 changed files with 15,215 additions and 14,317 deletions.
19 changes: 0 additions & 19 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,5 @@ end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.php]
indent_style = tab
indent_size = 4

[*.py]
charset = utf-8
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[Makefile]
indent_style = tab
indent_size = 4

[*.sln]
indent_style = tab

[*.{md,mdx}]
trim_trailing_whitespace = false
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

17 changes: 17 additions & 0 deletions .github/actions/pnpm-install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: 'PNPM install'
description: 'Run pnpm install with node_modules and cache enabled'

runs:
using: 'composite'
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm' # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-dependencies
- name: Install dependencies
env:
HUSKY: '0' # By default do not run HUSKY install
shell: bash
run: pnpm install --frozen-lockfile
48 changes: 0 additions & 48 deletions .github/actions/yarn-install/action.yml

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Create release
id: create_release
uses: actions/create-release@v1
Expand All @@ -33,14 +33,14 @@ jobs:
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/yarn-install
uses: ./.github/actions/pnpm-install
- name: Build
run: yarn build
run: pnpm build
- name: Publish to npm
run: |
npm publish --access public \
pnpm publish --access public \
${{ contains(github.ref_name, 'alpha') && '--tag alpha' || contains(github.ref_name, 'beta') && '--tag beta' || '' }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
- ubuntu-latest
- windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/yarn-install
uses: ./.github/actions/pnpm-install
- name: Run tests
run: yarn test
run: pnpm test
- name: Test build
run: yarn build
run: pnpm build
12 changes: 0 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ _types
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
Expand Down Expand Up @@ -73,9 +70,6 @@ web_modules/
# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test
Expand Down Expand Up @@ -116,9 +110,3 @@ dist
# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
yarn commitlint --edit $1
pnpm commitlint --edit $1
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
yarn pre-commit
pnpm pre-commit
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1 +1 @@
yarn pre-push
pnpm pre-push
4 changes: 4 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
auto-install-peers=false
enable-pre-post-scripts=true
provenance=true
strict-peer-dependencies=false
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

925 changes: 0 additions & 925 deletions .yarn/releases/yarn-4.5.0.cjs

This file was deleted.

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

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
## Installation

```bash
yarn add @lifi/sdk
pnpm add @lifi/sdk
```

or
Expand All @@ -38,7 +38,7 @@ npm install --save @lifi/sdk

### Set up the SDK

Firstly, create SDK config with your integrator string.
Firstly, create SDK config with your integrator string.

```ts
import { createConfig } from '@lifi/sdk'
Expand Down
12 changes: 0 additions & 12 deletions examples/node/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
Expand Down Expand Up @@ -68,9 +66,6 @@ web_modules/
# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test
Expand Down Expand Up @@ -110,10 +105,3 @@ dist

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
1 change: 0 additions & 1 deletion examples/node/.nvmrc

This file was deleted.

16 changes: 6 additions & 10 deletions examples/node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,16 @@ NOTE: it's important to keep your private key safe and secure. Don't share it wi
First install the dependencies

```
yarn install
pnpm i
```

Each of the scripts is referenced in the scripts section of the package.json file.
To run each example you can use the following commands

- `yarn example:swap` will run `examples/swap.ts`
- `yarn example:bridge` will run `examples/bridge.ts`
- `yarn example:multihop` will run `examples/multihop.ts`
- `yarn example:klima` will run `examples/klimaRetireExactCarbon.ts`
- `yarn example:polynomial` will run `examples/polynomialDeposit.ts`
- `pnpm example:swap` will run `examples/swap.ts`
- `pnpm example:bridge` will run `examples/bridge.ts`
- `pnpm example:multihop` will run `examples/multihop.ts`
- `pnpm example:klima` will run `examples/klimaRetireExactCarbon.ts`
- `pnpm example:polynomial` will run `examples/polynomialDeposit.ts`

Be sure to take a look inside the scripts to find out what they do.




7 changes: 3 additions & 4 deletions examples/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
"type": "module",
"description": "Sample project to showcase the usage of @lifi/sdk",
"main": "examples/swap.ts",
"author": "Max Klenk <max@li.finance>",
"author": "LI.FI <github@li.finance>",
"license": "MIT",
"dependencies": {
"@lifi/data-types": "^4.2.1",
"@lifi/data-types": "^5.13.1",
"@lifi/rpc-wrapper": "^0.0.27",
"@lifi/sdk": "^3.0.0-alpha.63",
"@types/dotenv": "^8.2.0",
"@wagmi/connectors": "^4.3.9",
"@wagmi/core": "^2.9.7",
"dotenv": "^16.4.5",
Expand All @@ -26,7 +25,7 @@
"example:yearn": "tsx examples/yearnDeposit.ts"
},
"devDependencies": {
"@types/node": "^20.12.12",
"@types/node": "^22.7.4",
"tsx": "^4.10.2",
"typescript": "^5.4.5"
}
Expand Down
Loading

0 comments on commit 1a95a22

Please sign in to comment.