Skip to content

Commit 39d652e

Browse files
bferenchiimoliverwangdhrubabasudfenstermakerkanatliemre
committed
feat: release v4 [skip ci] (#811)
BREAKING CHANGE: switch to v4 API --------- Co-Authored-By: Oliver Wang <oliver.wang4@gmail.com> Co-Authored-By: Dhruba Basu <7675102+dhrubabasu@users.noreply.github.com> Co-Authored-By: Danny Fenstermaker <dannyfenstermaker@gmail.com> Co-Authored-By: Emre Kanatli <14934754+kanatliemre@users.noreply.github.com> Co-Authored-By: rictorlome <33004639+rictorlome@users.noreply.github.com> Co-Authored-By: nahoc <19141346+nahoc@users.noreply.github.com> Co-Authored-By: Fumiko Richards <6504659+frichards@users.noreply.github.com> Co-Authored-By: Ray Lin <137183702+ruijialin-avalabs@users.noreply.github.com> Co-Authored-By: Neocyber <14209806+neocybereth@users.noreply.github.com> Co-Authored-By: Gabriel Cardona <cgcardona@gmail.com> Co-Authored-By: Gergely Lovas <36536513+gergelylovas@users.noreply.github.com>
1 parent 2435d87 commit 39d652e

File tree

679 files changed

+19981
-55172
lines changed

Some content is hidden

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

679 files changed

+19981
-55172
lines changed

.env.example

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
AVAX_PUBLIC_URL="https://api.avax-test.network"
2+
3+
PRIVATE_KEY=...
4+
C_CHAIN_ADDRESS=0x...
5+
X_CHAIN_ADDRESS=X-fuji...
6+
P_CHAIN_ADDRESS=P-fuji...
7+
CORETH_ADDRESS=C-fuji...

.eslintignore

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
/**/*.js
2-
/typings/*
3-
/tests/*
4-
/examples/*
5-
/web/*
1+
dist

.eslintrc.cjs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2021: true,
5+
node: true,
6+
},
7+
extends: [
8+
'eslint:recommended',
9+
'plugin:@typescript-eslint/recommended',
10+
'prettier',
11+
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
12+
],
13+
parser: '@typescript-eslint/parser',
14+
settings: {},
15+
parserOptions: {
16+
ecmaFeatures: {
17+
jsx: true,
18+
},
19+
ecmaVersion: 12,
20+
sourceType: 'module',
21+
// TODO: Why does uncommenting this remove the type imports?
22+
// project: ['./tsconfig.json'],
23+
},
24+
plugins: ['@typescript-eslint'],
25+
rules: {
26+
'@typescript-eslint/consistent-type-imports': 'error',
27+
'@typescript-eslint/explicit-module-boundary-types': 'off',
28+
'@typescript-eslint/no-explicit-any': 'off',
29+
'@typescript-eslint/no-var-requires': 'error',
30+
// Uncomment prefer-readonly and parserOptions.project to apply the rule.
31+
// TODO: Uncomment both permanently after fixing the type import issue.
32+
// '@typescript-eslint/prefer-readonly': 'error',
33+
},
34+
};

.eslintrc.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
version: 2
22
updates:
3-
- package-ecosystem: "npm"
3+
- package-ecosystem: github-actions
44
directory: "/"
55
schedule:
6-
interval: "weekly"
7-
target-branch: "development"
6+
interval: weekly
7+
- package-ecosystem: npm
8+
directory: "/"
9+
schedule:
10+
interval: weekly

.github/workflows/ci.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
1-
name: CI
1+
name: PR checks
22

33
on:
44
push:
55
branches:
66
- master
77
pull_request:
88

9-
env:
10-
CI: true
11-
129
jobs:
13-
Test:
10+
Lint-build-test:
11+
name: Lint, build and test
1412
runs-on: ubuntu-latest
15-
strategy:
16-
matrix:
17-
node-version: [16]
1813
steps:
19-
- uses: actions/checkout@v2
20-
- uses: actions/setup-node@v2
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
2118
with:
19+
node-version: 20.x
2220
cache: yarn
23-
node-version: ${{ matrix.node-version }}
24-
- run: yarn install --frozen-lockfile
25-
- run: yarn test
21+
- name: Install dependencies
22+
run: yarn install --frozen-lockfile
23+
- name: Lint
24+
run: yarn lint:check
25+
- name: Typecheck
26+
run: yarn typecheck
27+
- name: Test
28+
run: yarn test
29+
- name: Build
30+
run: yarn build

.github/workflows/codeql-analysis.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
# the `language` matrix defined below to confirm you have the correct set of
1010
# supported CodeQL languages.
1111
#
12-
name: "CodeQL"
12+
name: 'CodeQL'
1313

1414
on:
1515
push:
16-
branches: [development]
16+
branches: [master]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [development]
19+
branches: [master]
2020
schedule:
21-
- cron: "39 22 * * 5"
21+
- cron: '22 1 * * 6'
2222

2323
jobs:
2424
analyze:
@@ -32,32 +32,31 @@ jobs:
3232
strategy:
3333
fail-fast: false
3434
matrix:
35-
language: ["javascript"]
36-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
37-
# Learn more:
38-
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
35+
language: ['javascript']
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
3938

4039
steps:
4140
- name: Checkout repository
42-
uses: actions/checkout@v2
41+
uses: actions/checkout@v3
4342

4443
# Initializes the CodeQL tools for scanning.
4544
- name: Initialize CodeQL
46-
uses: github/codeql-action/init@v1
45+
uses: github/codeql-action/init@v2
4746
with:
4847
languages: ${{ matrix.language }}
4948
# If you wish to specify custom queries, you can do so here or in a config file.
5049
# By default, queries listed here will override any specified in a config file.
5150
# Prefix the list here with "+" to use these queries and those in the config file.
52-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
51+
queries: security-extended
5352

5453
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5554
# If this step fails, then you should remove it and run the build manually (see below)
5655
- name: Autobuild
57-
uses: github/codeql-action/autobuild@v1
56+
uses: github/codeql-action/autobuild@v2
5857

5958
# ℹ️ Command-line programs to run using the OS shell.
60-
# https://git.io/JvXDl
59+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
6160

6261
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
6362
# and modify them (or add more) to build your code if your project
@@ -68,4 +67,4 @@ jobs:
6867
# make release
6968

7069
- name: Perform CodeQL Analysis
71-
uses: github/codeql-action/analyze@v1
70+
uses: github/codeql-action/analyze@v2

.github/workflows/njsscan-analysis.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/prerelease.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Prerelease
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
release:
8+
name: Prerelease
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 20.x
19+
- name: Install dependencies
20+
run: yarn
21+
- name: Build library
22+
run: yarn build:prod
23+
- name: Release
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
27+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
28+
run: yarn run semantic-release

.github/workflows/release.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
1-
name: Push to release branch
2-
1+
name: Release
32
on:
43
push:
54
branches:
65
- release
7-
- master
86
jobs:
97
release:
108
name: Release
119
runs-on: ubuntu-latest
12-
environment: production
1310
steps:
1411
- name: Checkout
15-
uses: actions/checkout@v2
12+
uses: actions/checkout@v4
1613
with:
1714
fetch-depth: 0
1815
- name: Setup Node.js
19-
uses: actions/setup-node@v1
16+
uses: actions/setup-node@v4
2017
with:
21-
node-version: 16.x
22-
- name: Create .npmrc
23-
run: echo '//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}' >> .npmrc
18+
node-version: 20.x
2419
- name: Install dependencies
25-
run: yarn install
20+
run: yarn
2621
- name: Build library
27-
run: yarn build
22+
run: yarn build:prod
2823
- name: Release
2924
env:
3025
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31-
RELEASE_BRANCH: release
26+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
27+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
3228
run: yarn run semantic-release
29+
- name: Rebase master
30+
run: |
31+
git checkout master &&
32+
git rebase release &&
33+
git push origin master

0 commit comments

Comments
 (0)