Skip to content

Commit

Permalink
[JS-SDK] 再见 JS-SDK (#1072)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xdavinchee authored Sep 6, 2022
1 parent e675dbc commit 836b2d9
Show file tree
Hide file tree
Showing 73 changed files with 248 additions and 7,066 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cd.feature.create-pr-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
prNumber=${{ github.event.number }}
dirName="bin/${prNumber}"
mkdir -p $dirName
for d in packages/ethereum-contracts packages/js-sdk packages/sdk-core packages/sdk-redux; do (
for d in packages/ethereum-contracts packages/sdk-core packages/sdk-redux; do (
cd "$d"
tgz=$(npm pack)
cp $tgz "../../$dirName/"
Expand Down
60 changes: 0 additions & 60 deletions .github/workflows/cd.js-sdk-lts-v0_6.create-release-drafts.yml

This file was deleted.

60 changes: 0 additions & 60 deletions .github/workflows/cd.js-sdk-stable.create-release-drafts.yml

This file was deleted.

45 changes: 2 additions & 43 deletions .github/workflows/ci.canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,33 +108,6 @@ jobs:
path: |
packages/ethereum-contracts/coverage/
js-sdk-coverage:
name: Run coverage test of js-sdk on dev branch

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: "yarn"

- name: Run coverage test
run: |
yarn install --frozen-lockfile
yarn build
yarn workspace @superfluid-finance/js-sdk test-coverage
- name: Create coverage artifact
uses: actions/upload-artifact@v3
with:
name: js-sdk-coverage
path: |
packages/js-sdk/coverage/
sdk-core-coverage:
name: Run coverage test of sdk-core on dev branch

Expand Down Expand Up @@ -167,7 +140,7 @@ jobs:
publish-coverage-reports:
name: Publish coverage reports
needs: [ethereum-contracts-coverage, js-sdk-coverage, sdk-core-coverage]
needs: [ethereum-contracts-coverage, sdk-core-coverage]

runs-on: ubuntu-latest
env:
Expand All @@ -189,19 +162,6 @@ jobs:
flags: ethereum-contracts
fail_ci_if_error: true

- name: Download js-sdk-coverage
uses: actions/download-artifact@v3
with:
name: js-sdk-coverage
path: packages/js-sdk/coverage
- name: Upload js-sdk-coverage to codecov
uses: codecov/codecov-action@v2
with:
files: packages/js-sdk/coverage/lcov.info
name: js-sdk-coverage
flags: js-sdk
fail_ci_if_error: true

- name: Download sdk-core-coverage
uses: actions/download-artifact@v3
with:
Expand All @@ -218,7 +178,7 @@ jobs:
publish-npm-packages:
name: Publish canary packages to registries

needs: [essential-build-and-test, test-subgraph, test-spec-haskell, ethereum-contracts-coverage, js-sdk-coverage, sdk-core-coverage]
needs: [essential-build-and-test, test-subgraph, test-spec-haskell, ethereum-contracts-coverage, sdk-core-coverage]

runs-on: ubuntu-latest

Expand Down Expand Up @@ -257,7 +217,6 @@ jobs:
- name: Publish to npm
run: |
tasks/npm-publish.sh packages/ethereum-contracts/ dev --verbose
tasks/npm-publish.sh packages/js-sdk/ dev --verbose
tasks/npm-publish.sh packages/sdk-core/ dev --verbose
tasks/npm-publish.sh packages/sdk-redux/ dev --verbose
env:
Expand Down
38 changes: 1 addition & 37 deletions .github/workflows/ci.feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:

outputs:
build_ethereum_contracts: ${{ env.BUILD_ETHEREUM_CONTRACTS }}
build_js_sdk: ${{ env.BUILD_JS_SDK }}
build_subgraph: ${{ env.BUILD_SUBGRAPH }}
build_sdk_core: ${{ env.BUILD_SDK_CORE }}
build_spec_haskell: ${{ env.BUILD_SPEC_HASKELL }}
Expand Down Expand Up @@ -109,40 +108,6 @@ jobs:
run: |
yarn workspace @superfluid-finance/ethereum-contracts test-coverage
test-js-sdk:
name: Build and test js-sdk (Feature Branch)

runs-on: ubuntu-latest

needs: [check]
if: needs.check.outputs.build_js_sdk

strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"


- name: Install, lint and build
run: |
yarn install --frozen-lockfile
yarn lint
yarn build
- name: Test js-sdk
run: |
yarn workspace @superfluid-finance/js-sdk test
env:
POLYGON_MAINNET_PROVIDER_URL: ${{ secrets.POLYGON_MAINNET_PROVIDER_URL }}

# subgraph integration test
test-subgraph:
uses: ./.github/workflows/call.setup-deploy-and-test-local-subgraph.yml
Expand Down Expand Up @@ -193,7 +158,7 @@ jobs:
runs-on: ubuntu-latest

if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'superfluid-finance/protocol-monorepo') && always()
needs: [test-ethereum-contracts, coverage-ethereum-contracts, test-js-sdk, test-subgraph, test-sdk-core, test-spec-haskell, test-subgraph-on-previous-sdk-core-versions, test-query-schema-against-deployed-feature-subgraphs]
needs: [test-ethereum-contracts, coverage-ethereum-contracts, test-subgraph, test-sdk-core, test-spec-haskell, test-subgraph-on-previous-sdk-core-versions, test-query-schema-against-deployed-feature-subgraphs]

steps:
- name: Test Results
Expand All @@ -210,7 +175,6 @@ jobs:
fi
}
check_result ethereum-contracts ${{ needs.test-ethereum-contracts.result }}
check_result js-sdk ${{ needs.test-js-sdk.result }}
check_result subgraph ${{ needs.test-subgraph.result }}
check_result sdk-core ${{ needs.test-sdk-core.result }}
check_result spec-haskell ${{ needs.test-spec-haskell.result }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/handler.publish-pr-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ jobs:
Install this PR (you need to setup Github packages):
```bash
yarn add @superfluid-finance/js-sdk@PR${{ steps.pr.outputs.pr_number }}
yarn add @superfluid-finance/ethereum-contracts@PR${{ steps.pr.outputs.pr_number }}
yarn add @superfluid-finance/sdk-core@PR${{ steps.pr.outputs.pr_number }}
yarn add @superfluid-finance/sdk-redux@PR${{ steps.pr.outputs.pr_number }}
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/handler.publish-release-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ jobs:
if echo -n "${{ github.ref }}" | grep -qE "refs/tags/ethereum-contracts@";then
echo "PUBLISH_ETHEREUM_CONTRACTS=1" >> $GITHUB_ENV
fi
if echo -n "${{ github.ref }}" | grep -qE "refs/tags/js-sdk@";then
echo "PUBLISH_JS_SDK=1" >> $GITHUB_ENV
fi
if echo -n "${{ github.ref }}" | grep -qE "refs/tags/sdk-core@";then
echo "PUBLISH_SDK_CORE=1" >> $GITHUB_ENV
fi
Expand All @@ -52,16 +49,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPMJS_TOKEN: ${{ secrets.NPMJS_TOKEN }}

- name: Publish js-sdk@latest package
if: env.PUBLISH_JS_SDK == 1
run: |
yarn --cwd packages/ethereum-contracts build
yarn --cwd packages/js-sdk build
tasks/npm-publish.sh packages/js-sdk/ latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPMJS_TOKEN: ${{ secrets.NPMJS_TOKEN }}

- name: Publish sdk-core package
id: publish-sdk-core
if: env.PUBLISH_SDK_CORE == 1
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ You'll also want to upgrade your Superfluid App to the canary, so you have the m

```bash
cd superfluid-app # wherever your superfluid-app happens to be
yarn upgrade @superfluid-finance/ethereum-contracts@dev @superfluid-finance/js-sdk@dev
yarn upgrade @superfluid-finance/ethereum-contracts@dev @superfluid-finance/sdk-core@dev
```

### Copy and Watch
Expand Down
58 changes: 30 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,34 +66,6 @@ EVM contracts implementation for the Superfluid Protocol.

If you're interest in peeking under the hood, then check out the contracts package.

#### [`@superfluid-finance/subgraph`](https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/subgraph)

<p>
<a href="#" target="_blank">
<img alt="License: AGPLv3" src="https://img.shields.io/badge/License-AGPL%20v3-blue.svg" />
</a>
</p>

Official subgraph for the Superfluid Protocol.

#### [`@superfluid-finance/js-sdk`](https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/js-sdk)

<p>
<a href="https://www.npmjs.com/package/@superfluid-finance/js-sdk" target="_blank">
<img alt="Version" src="https://img.shields.io/npm/v/@superfluid-finance/js-sdk.svg">
</a>
<a href="https://codecov.io/gh/superfluid-finance/protocol-monorepo/tree/dev/packages/js-sdk">
<img src="https://codecov.io/gh/superfluid-finance/protocol-monorepo/branch/dev/graph/badge.svg?token=LJW5NDGEJ9&flag=js-sdk"/>
</a>
<a href="#" target="_blank">
<img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" />
</a>
</p>

:warning: This repo is deprecated, use sdk-core instead :warning:

Javascript SDK for building with Superfluid Protocol.

#### [`@superfluid-finance/sdk-core`](https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/sdk-core)

<p>
Expand Down Expand Up @@ -134,6 +106,36 @@ SDK-Redux is an application framework for building front-end applications that i
Hot-fuzz is a wrapper of [Echidna](https://github.com/crytic/echidna/) with additional helper for fuzzing
your Superfluid smart contracts applications, including [Super Apps](https://docs.superfluid.finance/superfluid/protocol-developers/super-apps).

#### [`@superfluid-finance/subgraph`](https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/subgraph)

<p>
<a href="#" target="_blank">
<img alt="License: AGPLv3" src="https://img.shields.io/badge/License-AGPL%20v3-blue.svg" />
</a>
</p>

Official subgraph for the Superfluid Protocol.

#### [`@superfluid-finance/js-sdk`](https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/js-sdk)

<p>
<a href="https://www.npmjs.com/package/@superfluid-finance/js-sdk" target="_blank">
<img alt="Version" src="https://img.shields.io/npm/v/@superfluid-finance/js-sdk.svg">
</a>
<a href="https://codecov.io/gh/superfluid-finance/protocol-monorepo/tree/dev/packages/js-sdk">
<img src="https://codecov.io/gh/superfluid-finance/protocol-monorepo/branch/dev/graph/badge.svg?token=LJW5NDGEJ9&flag=js-sdk"/>
</a>
<a href="#" target="_blank">
<img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" />
</a>
</p>

:warning: This repo is fully deprecated, use sdk-core instead :warning:

You can get the last release of js-sdk at the branch [here](https://github.com/superfluid-finance/protocol-monorepo/tree/release-js-sdk-stable).

Javascript SDK for building with Superfluid Protocol.

## Bug Bounty
Click [here](https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/ethereum-contracts/bug-bounty.md) for more information regarding our Bug Bounty.

Expand Down
Loading

0 comments on commit 836b2d9

Please sign in to comment.