Skip to content

Commit 291d576

Browse files
authored
chore: upgrade TS deps and stabilizing TS code (metaplex-foundation#248)
* deps: upgrade solana and metaplex-foundation deps As part of this moved solita dep out of main `package.json` and added to each package proper as updating across packages is easy via `yarn up`. Updated deps: - "@solana/web3.js": "^1.35.1" - "@metaplex-foundation/beet": "^0.0.8", - "@metaplex-foundation/beet-solana": "^0.0.6", - "@metaplex-foundation/solita": "^0.1.0", - "@metaplex-foundation/amman": "^0.1.0", * token-metadata: add create mint method previously exposed by amman * fixed-price: adding create mint account action * chore: temporarily disabled flaky fixed-price test * chore: removing member ordering eslint rule * metaplex: fix typescript warnings * auction: fix typescript issues * token-vault: fixing typescript issues * chore: update yarn.lock * ts: stricter base tsconfig * ts-core: fix strict violations * ts-auction: fix TS strict violations * tsconfig: allow err:any * deps: upgrade to latest typescript * ts-token-metadata: fix TS strict violations partially - disabled strict mode for this package since the SDK is already re-generated on a separate branch and thus fixing this is lost time * deps: upgrade tape * token-metadata: fix test util organization to avoid circ refs * deps: fix for token-metadata and candy-machine * candy-machine: using program id exported by solita * deps: updated yarn.lock after merge * chore: fix TS strict violations in fixed-price * metaplex: fix TS strict violations * chore: change if statements for conditional builds - the current syntax did not work as it was looking for _existence_ of the variables instead of their actual truethiness * chore: fixed_price SDK action skips test since it needs validator * token-metadata: fix lint errors * auction: ignore eslint warnings for use of any for core struct return * fixed-price: fix eslint warnings * metaplex: ignore eslint warnings for use of any for core struct return * token-vault: turning off strict temporarily as sdk redone via thlorenz/sdk/token-vault * ci: metaplex tests need amman and thus are integration tests * ci: fix path filters for integration test workflows * fixed-price: fixed tests * metaplex: adapt ammanrc to reuse base like done in other packages * ci: fix path filter outputs for integration tests * metaplex: fix CI integration tests by building missing programs * ci: fix fixed-price integration workflow indentation issue * ci: fix build-auction workflow typo
1 parent 9aada56 commit 291d576

File tree

87 files changed

+1285
-1328
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+1285
-1328
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Implicit dependencies
2+
# - actions/checkout@v2
3+
# - ./.github/actions/install-linux-build-deps
4+
# - ./.github/actions/install-solana
5+
# - ./.github/actions/install-rust
6+
7+
name: Build Auction
8+
runs:
9+
using: 'composite'
10+
steps:
11+
- name: build-auction-program
12+
working-directory: ./auction/program
13+
run: |
14+
cargo +${{ env.RUST_STABLE }} build-bpf --version
15+
cargo +${{ env.RUST_STABLE }} build-bpf --bpf-out-dir ../../target/deploy/
16+
shell: bash

.github/actions/yarn-install-and-build/action.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,33 +44,41 @@ runs:
4444
# token-vault and auction
4545

4646
- name: Install and Build core
47-
if: ${{ inputs.build_core }}
47+
if: inputs.build_core == 'true'
4848
run: |
49+
echo 'Install and Build core: yarn install'
4950
yarn install
51+
echo 'Install and Build core: yarn build'
5052
yarn build
5153
working-directory: ./core/js
5254
shell: bash
5355

5456
- name: Install and Build auction
55-
if: ${{ inputs.build_auction }}
57+
if: inputs.build_auction == 'true'
5658
run: |
59+
echo 'Install and Build auction: yarn install'
5760
yarn install
61+
echo 'Install and Build auction: yarn build'
5862
yarn build
5963
working-directory: ./auction/js
6064
shell: bash
6165

6266
- name: Install and Build token-metadata
63-
if: ${{ inputs.build_token_metadata }}
67+
if: inputs.build_token_metadata == 'true'
6468
run: |
69+
echo 'Install and Build token-metadata: yarn install'
6570
yarn install
71+
echo 'Install and Build token-metadata: yarn build'
6672
yarn build
6773
working-directory: ./token-metadata/js
6874
shell: bash
6975

7076
- name: Install and Build token-vault
71-
if: ${{ inputs.build_token_vault }}
77+
if: inputs.build_token_vault == 'true'
7278
run: |
79+
echo 'Install and Build token-vault: yarn install'
7380
yarn install
81+
echo 'Install and Build token-vault: yarn build'
7482
yarn build
7583
working-directory: ./token-vault/js
7684
shell: bash

.github/actions/yarn-install-and-verify/action.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,33 +48,41 @@ runs:
4848
# token-vault and auction
4949

5050
- name: Install and Build core
51-
if: ${{ inputs.build_core }}
51+
if: inputs.build_core == 'true'
5252
run: |
53+
echo 'Install and Build core: yarn install'
5354
yarn install
55+
echo 'Install and Build core: yarn build'
5456
yarn build
5557
working-directory: ./core/js
5658
shell: bash
5759

5860
- name: Install and Build auction
59-
if: ${{ inputs.build_auction }}
61+
if: inputs.build_auction == 'true'
6062
run: |
63+
echo 'Install and Build auction: yarn install'
6164
yarn install
65+
echo 'Install and Build auction: yarn build'
6266
yarn build
6367
working-directory: ./auction/js
6468
shell: bash
6569

6670
- name: Install and Build token-metadata
67-
if: ${{ inputs.build_token_metadata }}
71+
if: inputs.build_token_metadata == 'true'
6872
run: |
73+
echo 'Install and Build token-metadata: yarn install'
6974
yarn install
75+
echo 'Install and Build token-metadata: yarn build'
7076
yarn build
7177
working-directory: ./token-metadata/js
7278
shell: bash
7379

7480
- name: Install and Build token-vault
75-
if: ${{ inputs.build_token_vault }}
81+
if: inputs.build_token_vault == 'true'
7682
run: |
83+
echo 'Install and Build token-vault: yarn install'
7784
yarn install
85+
echo 'Install and Build token-vault: yarn build'
7886
yarn build
7987
working-directory: ./token-vault/js
8088
shell: bash
@@ -93,7 +101,7 @@ runs:
93101
shell: bash
94102

95103
- name: Test TypeScript
96-
if: ${{ !inputs.skip_test }}
104+
if: inputs.skip_test == 'false'
97105
run: yarn test
98106
working-directory: ${{ inputs.working_dir }}
99107
shell: bash

.github/workflows/integration-fixed-price-sale.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,25 @@ jobs:
1616
runs-on: ubuntu-latest
1717
# Set job outputs to values from filter step
1818
outputs:
19-
code: ${{ steps.filter.outputs.code }}
19+
core: ${{ steps.filter.outputs.core }}
20+
package: ${{ steps.filter.outputs.package }}
2021
steps:
2122
- uses: actions/checkout@v2
2223
# For pull requests it's not necessary to checkout the code
2324
- uses: dorny/paths-filter@v2
2425
id: filter
2526
with:
2627
filters: |
27-
code:
28-
- 'core/**'
29-
- 'fixed-price-sale/**'
28+
core:
29+
- 'core/**'
30+
package:
31+
- 'fixed-price-sale/**'
3032
build-and-integration-test-fixed-price-sale:
3133
runs-on: ubuntu-latest
3234
env:
3335
cache_id: program-fixed-price-sale
3436
needs: changes
35-
if: ${{ needs.changes.outputs.code == 'true' }}
37+
if: ${{ needs.changes.outputs.core == 'true' || needs.changes.outputs.package == 'true' }}
3638
steps:
3739
# Setup Deps
3840
- uses: actions/checkout@v2
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Integration Metaplex
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
SOLANA_VERSION: 1.8.5
12+
RUST_TOOLCHAIN: stable
13+
14+
jobs:
15+
changes:
16+
runs-on: ubuntu-latest
17+
# Set job outputs to values from filter step
18+
outputs:
19+
core: ${{ steps.filter.outputs.core }}
20+
package: ${{ steps.filter.outputs.package }}
21+
steps:
22+
- uses: actions/checkout@v2
23+
# For pull requests it's not necessary to checkout the code
24+
- uses: dorny/paths-filter@v2
25+
id: filter
26+
with:
27+
filters: |
28+
core:
29+
- 'core/**'
30+
package:
31+
- 'metaplex/**'
32+
build-and-integration-test-metaplex:
33+
runs-on: ubuntu-latest
34+
env:
35+
cache_id: program-metaplex
36+
needs: changes
37+
if: ${{ needs.changes.outputs.core == 'true' || needs.changes.outputs.package == 'true' }}
38+
steps:
39+
# Setup Deps
40+
- uses: actions/checkout@v2
41+
- uses: ./.github/actions/install-linux-build-deps
42+
- uses: ./.github/actions/install-solana
43+
with:
44+
solana_version: ${{ env.SOLANA_VERSION }}
45+
- uses: ./.github/actions/install-rust
46+
with:
47+
toolchain: ${{ env.RUST_TOOLCHAIN }}
48+
49+
# Restore Cache from previous build/test
50+
- uses: actions/cache@v2
51+
with:
52+
path: |
53+
~/.cargo/bin/
54+
~/.cargo/registry/index/
55+
~/.cargo/registry/cache/
56+
~/.cargo/git/db/
57+
./rust/target
58+
key: ${{ env.cache_id }}-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ env.RUSTC_HASH }}
59+
60+
# Build Rust Programs
61+
- uses: ./.github/actions/build-token-metadata
62+
- uses: ./.github/actions/build-token-vault
63+
- uses: ./.github/actions/build-auction
64+
- uses: ./.github/actions/build-metaplex
65+
66+
# Install JS SDK deps
67+
- uses: ./.github/actions/yarn-install-and-build
68+
with:
69+
cache_id: sdk-metaplex
70+
working_dir: ./metaplex/js
71+
build_token_metadata: true
72+
build_token_vault: true
73+
build_auction: true
74+
75+
# Run integration test
76+
- name: start-local-test-validator
77+
working-directory: ./metaplex/js
78+
run: DEBUG=amman* yarn amman:start
79+
80+
- name: integration-test-metaplex-program
81+
id: run_integration_test
82+
working-directory: ./metaplex/js
83+
run: DEBUG=mpl* yarn test

.github/workflows/integration-token-metadata.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,25 @@ jobs:
1616
runs-on: ubuntu-latest
1717
# Set job outputs to values from filter step
1818
outputs:
19-
code: ${{ steps.filter.outputs.code }}
19+
core: ${{ steps.filter.outputs.core }}
20+
package: ${{ steps.filter.outputs.package }}
2021
steps:
2122
- uses: actions/checkout@v2
2223
# For pull requests it's not necessary to checkout the code
2324
- uses: dorny/paths-filter@v2
2425
id: filter
2526
with:
2627
filters: |
27-
code:
28+
core:
2829
- 'core/**'
30+
package:
2931
- 'token-metadata/**'
3032
build-and-integration-test-token-metadata:
3133
runs-on: ubuntu-latest
3234
env:
3335
cache_id: program-token-metadata
3436
needs: changes
35-
if: ${{ needs.changes.outputs.code == 'true' }}
37+
if: ${{ needs.changes.outputs.core == 'true' || needs.changes.outputs.package == 'true' }}
3638
steps:
3739
# Setup Deps
3840
- uses: actions/checkout@v2

.github/workflows/sdk-fixed-price-sale.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ jobs:
3636
cache_id: sdk-fixed-price-sale
3737
working_dir: ./fixed-price-sale/js
3838
build_token_metadata: true
39+
skip_test: true

.github/workflows/sdk-metaplex.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ jobs:
3838
build_auction: true
3939
build_token_vault: true
4040
build_token_metadata: true
41+
skip_test: true

auction-house/js/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,18 @@
3939
"author": "Metaplex Maintainers <[email protected]>",
4040
"license": "Apache-2.0",
4141
"dependencies": {
42-
"@metaplex-foundation/beet": "0.0.8",
43-
"@metaplex-foundation/beet-solana": "0.0.6",
42+
"@metaplex-foundation/beet": "^0.0.8",
43+
"@metaplex-foundation/beet-solana": "^0.0.6",
4444
"@metaplex-foundation/mpl-core": "0.0.4",
45-
"@solana/web3.js": "^1.33.0"
45+
"@solana/web3.js": "^1.35.1"
4646
},
4747
"devDependencies": {
48+
"@metaplex-foundation/solita": "^0.1.0",
4849
"@types/tape": "^4.13.2",
4950
"eslint": "^8.3.0",
5051
"prettier": "^2.5.1",
5152
"rimraf": "^3.0.2",
5253
"spok": "^1.4.3",
53-
"tape": "^5.3.2"
54+
"tape": "^5.5.2"
5455
}
5556
}

auction/js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"dependencies": {
4040
"@metaplex-foundation/mpl-core": "^0.0.2",
4141
"@solana/spl-token": "^0.1.8",
42-
"@solana/web3.js": "^1.31.0"
42+
"@solana/web3.js": "^1.35.1"
4343
},
4444
"devDependencies": {
4545
"eslint": "^8.3.0",

0 commit comments

Comments
 (0)