Skip to content

Commit

Permalink
[typescript-sdk] Add TypeScript SDK to pnpm workspace (MystenLabs#4027)
Browse files Browse the repository at this point in the history
* Add TypeScript SDK to workspace

* Port over node notifier resolution

* Add tsconfig for tests

* Swap from yarn to pnpm for CI

* Fix bad references for non-workspace packages

* Revert wallet workspace pointer

* Update readme for new workspaces

* Improve reliability of type guard generation

* Don't target installation

* Fix tests and PR checks
  • Loading branch information
Jordan-Mysten authored Aug 17, 2022
1 parent f1a7aed commit 8074213
Show file tree
Hide file tree
Showing 24 changed files with 3,327 additions and 19,860 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/explorer-client-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,19 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: pnpm/[email protected]
with:
version: 7
- name: Install Nodejs
uses: actions/setup-node@v3
with:
node-version: "16"
cache: "yarn"
cache-dependency-path: ./explorer/client/yarn.lock
- name: Build TS sdk
working-directory: ./sdk/typescript
run: yarn install; yarn build
- name: Install sdk dependencies
run: pnpm install --frozen-lockfile
- name: Build SDK
run: pnpm --filter @mysten/sui.js build
- name: Install yarn dependencies
working-directory: ./explorer/client
run: yarn install --force
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/ts-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,17 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: pnpm/[email protected]
with:
version: 7
- name: Install Nodejs
uses: actions/setup-node@v3
with:
node-version: "16"
cache: "yarn"
cache-dependency-path: ./sdk/typescript/yarn.lock
cache: "pnpm"
- name: Install dependencies
working-directory: ./sdk/typescript
run: yarn install
run: pnpm install --frozen-lockfile
- name: Test
working-directory: ./sdk/typescript
run: yarn test
run: pnpm --filter @mysten/sui.js test
- name: Build
working-directory: ./sdk/typescript
run: yarn build
run: pnpm --filter @mysten/sui.js build
10 changes: 7 additions & 3 deletions .github/workflows/wallet-ext-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,19 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: pnpm/[email protected]
with:
version: 7
- name: Install Nodejs
uses: actions/setup-node@v3
with:
node-version: "16"
cache: 'npm'
cache-dependency-path: ./wallet/package-lock.json
- name: Build sdk
working-directory: ./sdk/typescript
run: yarn
- name: Install sdk dependencies
run: pnpm install --frozen-lockfile
- name: Build SDK
run: pnpm --filter @mysten/sui.js build
- name: Install dependencies
working-directory: ${{env.working-directory}}
run: npm ci
Expand Down
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"name": "sui-monorepo",
"private": true,
"license": "Apache-2.0"
"license": "Apache-2.0",
"pnpm": {
"overrides": {
"node-notifier": "10.0.0",
"jest": "27",
"ts-jest": "27"
}
}
}
Loading

0 comments on commit 8074213

Please sign in to comment.