Skip to content

Commit

Permalink
[FE] Use pnpm diffs instead of file-based diffs (MystenLabs#4401)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan-Mysten authored Aug 31, 2022
1 parent 002a105 commit 804c433
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 29 deletions.
19 changes: 0 additions & 19 deletions .github/actions/diffs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@ outputs:
isRust:
description: True when changes happened to the rust code
value: "${{ steps.diff.outputs.isRust }}"
isExplorerClient:
description: True when there are changes to files related to explorer client
value: "${{ steps.diff.outputs.isExplorerClient }}"
isTypescriptSDK:
description: True when there are changes to files related to TypeScript SDK
value: "${{ steps.diff.outputs.isTypescriptSDK }}"
isWalletExt:
description: True when there are changes to files related to Wallet Extension
value: "${{ steps.diff.outputs.isWalletExt }}"
runs:
using: composite
steps:
Expand All @@ -30,17 +21,7 @@ runs:
- '.github/workflows/bench.yml'
- '.github/workflows/codecov.yml'
- '.github/workflows/rust.yml'
isExplorerClient:
- 'explorer/client/**'
- '.github/workflows/explorer-client-prs.yml'
isTypescriptSDK:
- 'sdk/typescript/**'
- 'crates/sui-open-rpc/samples/**'
- '.github/workflows/ts-sdk.yml'
isDoc:
- 'doc/**'
- '*.md'
- '.github/workflows/docs.yml'
isWalletExt:
- 'wallet/**'
- '.github/workflows/wallet-ext-prs.yml'
4 changes: 4 additions & 0 deletions .github/actions/pnpm-diffs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ outputs:
isTypeScriptSDK:
description: True when there are changes to files related to TypeScript SDK
value: "${{ steps.changes.outputs.sdk }}"
isWalletExt:
description: True when there are changes to files related to Wallet Extension
value: "${{ steps.changes.outputs.wallet }}"
isWalletAdapter:
description: True when there are changes to files related to wallet adapter
value: "${{ steps.changes.outputs.walletAdapter }}"
Expand All @@ -30,4 +33,5 @@ runs:
run: |
echo "::set-output name=explorer::$(jq 'any(.[]; .name == "sui-explorer")' changes.json)"
echo "::set-output name=sdk::$(jq 'any(.[]; .name == "@mysten/sui.js")' changes.json)"
echo "::set-output name=wallet::$(jq 'any(.[]; .name == "sui-wallet")' changes.json)"
echo "::set-output name=walletAdapter::$(jq 'any(.[]; .name | startswith("@mysten/wallet-adapter"))' changes.json)"
2 changes: 1 addition & 1 deletion .github/workflows/ts-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Detect Changes
uses: "./.github/actions/diffs"
uses: "./.github/actions/pnpm-diffs"
id: diff
client_checks:
name: Test & Build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wallet-ext-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Detect Changes
uses: "./.github/actions/diffs"
uses: "./.github/actions/pnpm-diffs"
id: diff
run_checks:
name: Lint, Test & Build
Expand Down
4 changes: 4 additions & 0 deletions crates/sui-open-rpc/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "@mysten/sui-open-rpc",
"private": true
}
1 change: 1 addition & 0 deletions crates/sui-open-rpc/samples/objects.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
"id": {
"id": "0x1f45933e11d09fa15e65ba6735ce4205c3deec24"
},

"sword": {
"type": "0xeaa96afeecd3cf700ca68d6cad4af93f05b59bcd::hero::Sword",
"fields": {
Expand Down
5 changes: 5 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
packages:
- 'wallet-adapter/**'
- 'sdk/**'
- 'explorer/**'
- 'wallet/**'
- "wallet-adapter/**"
- "sdk/**"
- "explorer/**"
- "wallet/**"
- "crates/sui-open-rpc"
1 change: 1 addition & 0 deletions sdk/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
}
],
"devDependencies": {
"@mysten/sui-open-rpc": "workspace:*",
"@size-limit/preset-small-lib": "^7.0.8",
"@types/bn.js": "^5.1.0",
"@types/lossless-json": "^1.0.1",
Expand Down
5 changes: 4 additions & 1 deletion sdk/typescript/test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"extends": "../tsconfig.json",
"include": ["./"]
"include": ["./"],
"compilerOptions": {
"resolveJsonModule": true
}
}
2 changes: 1 addition & 1 deletion sdk/typescript/test/types/framework.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

import { describe, it, expect } from 'vitest';
import mockObjectData from '../../../../crates/sui-open-rpc/samples/objects.json';
import mockObjectData from '@mysten/sui-open-rpc/samples/objects.json';
import { Coin, GetObjectDataResponse } from '../../src';

import BN from 'bn.js';
Expand Down
2 changes: 1 addition & 1 deletion sdk/typescript/test/types/objects.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

import { describe, it, expect } from 'vitest';
import mockObjectData from '../../../../crates/sui-open-rpc/samples/objects.json';
import mockObjectData from '@mysten/sui-open-rpc/samples/objects.json';

import { isGetObjectDataResponse } from '../../src/index.guard';

Expand Down
2 changes: 1 addition & 1 deletion sdk/typescript/test/types/transactions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

import { describe, it, expect } from 'vitest';
import mockTransactionData from '../../../../crates/sui-open-rpc/samples/transactions.json';
import mockTransactionData from '@mysten/sui-open-rpc/samples/transactions.json';

import { isSuiTransactionResponse } from '../../src/index.guard';

Expand Down

0 comments on commit 804c433

Please sign in to comment.