Skip to content

Commit

Permalink
chore: setup for modern yarn and pipelines to check building phase
Browse files Browse the repository at this point in the history
  • Loading branch information
wainola committed Sep 15, 2023
1 parent c41a2bc commit 3ffdae4
Show file tree
Hide file tree
Showing 12 changed files with 9,915 additions and 1,538 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build-react.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "Lint and build React"

on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- 'packages/react/**'
- '!packages/widget/**'
- '!packages/sdk-manager/**'
- '!packages/wallet-manager/**'

jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
node: [18]
fail-fast: true
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: 'yarn' # cache node modules
node-version: ${{ matrix.node }}
- run: corepack enable
- run: yarn set version stable
- run: yarn install --immutable # install dependencies
- run: yarn run lint:react-widget # lint code
- run: yarn run build:all # build react
31 changes: 31 additions & 0 deletions .github/workflows/build-sdk-manager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Lint and build SDK Manager"

on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- 'packages/sdk-manager/**'
- '!packages/widget/**'
- '!packages/wallet-manager/**'
- '!packages/react/**'

jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
node: [18]
fail-fast: true
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: 'yarn' # cache node modules
node-version: ${{ matrix.node }}
- run: corepack enable
- run: yarn set version stable
- run: yarn
- run: yarn run lint:sdk-manager # lint code
- run: yarn run build:wallet-manager # build wallet-manager
- run: yarn run build:sdk-manager # build widget
30 changes: 30 additions & 0 deletions .github/workflows/build-wallet-manager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "Lint and build Wallet Manager"

on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- 'packages/wallet-manager/**'
- '!packages/sdk-manager/**'
- '!packages/widget/**'
- '!packages/react/**'

jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
node: [18]
fail-fast: true
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: 'yarn' # cache node modules
node-version: ${{ matrix.node }}
- run: corepack enable
- run: yarn set version stable
- run: yarn
- run: yarn run lint:wallet-manager # lint code
- run: yarn run build:wallet-manager # build widget
30 changes: 30 additions & 0 deletions .github/workflows/build-widget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "Lint and build Widget"

on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- 'packages/widget/**'
- '!packages/sdk-manager/**'
- '!packages/wallet-manager/**'
- '!packages/react/**'

jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
node: [18]
fail-fast: true
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: 'yarn' # cache node modules
node-version: ${{ matrix.node }}
- run: corepack enable
- run: yarn set version stable
- run: yarn install --immutable
- run: yarn run lint:widget # lint code
- run: yarn run build:all # build widget
874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.3.cjs

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.6.3.cjs

compressionLevel: 0

enableGlobalCache: true
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@
"eslint-plugin-import": "^2.28.1",
"prettier": "^3.0.3",
"typescript": "^5.2.2"
}
},
"packageManager": "[email protected]"
}
7 changes: 7 additions & 0 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
"module": "build/index.js",
"license": "LGPL-3.0-or-later",
"type": "module",
"dependencies": {
"@lit-labs/react": "2.0.3"
},
"peerDependencies": {
"react": ">=17",
"react-dom": ">=17"
},
"scripts": {
"build": "tsc --build --clean && tsc --build ./tsconfig.json",
"dev": "tsc --build --clean && tsc --build ./tsconfig.json --watch",
Expand Down
12 changes: 11 additions & 1 deletion packages/sdk-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,15 @@
"lint": "eslint 'src/**/*.ts'",
"lint:fix": "yarn run lint --fix"
},
"author": "Sygmaprotocol Product Team"
"author": "Sygmaprotocol Product Team",
"dependencies": {
"@buildwithsygma/sygma-sdk-core": "^2.2.0",
"@ethersproject/contracts": "^5.7.0",
"@ethersproject/transactions": "^5.7.0",
"@polkadot/api": "10.7.2"
},
"devDependencies": {
"@polkadot/types": "10.7.2",
"typescript": "^5.2.2"
}
}
11 changes: 10 additions & 1 deletion packages/wallet-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,14 @@
"lint": "eslint 'src/**/*.ts'",
"lint:fix": "yarn run lint --fix"
},
"author": "Sygmaprotocol Product Team"
"author": "Sygmaprotocol Product Team",
"devDependencies": {
"@polkadot/types": "10.7.2",
"typescript": "^5.2.2"
},
"dependencies": {
"@polkadot/api": "10.7.2",
"@polkadot/extension-dapp": "^0.46.5",
"ethers": "5.7.2"
}
}
7 changes: 6 additions & 1 deletion packages/widget/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,10 @@
"lint": "eslint 'src/**/*.ts'",
"lint:fix": "yarn run lint --fix"
},
"author": "Sygmaprotocol Product Team"
"author": "Sygmaprotocol Product Team",
"dependencies": {
"@buildwithsygma/sygma-sdk-core": "^2.2.0",
"ethers": "5.7.2",
"lit": "^2.8.0"
}
}
Loading

0 comments on commit 3ffdae4

Please sign in to comment.