Skip to content

Commit

Permalink
chore: develop -> main (#281)
Browse files Browse the repository at this point in the history
* Main (#276)

* chore: develop -> main (#275)

* feat(feat): develop/main

* fix(fix): fix

* fix(test): fix

* fix(nibijs): examples up-to-date + more docs + test examples in CI (#254)

* fix(fix): markdown (#256)

* fix(nibijs): NibiruQueryClient must expose methods from the Tendermint client (#257)

* refactor: custom chain for mainnet (#262)

* refactor: custom chain for mainnet

* test: increase open handle timeout

* test: adding --watchAll --no-cache

* ci: removing --watchall and --no-cache

* feat(nibijs): functions for humans + getTxByHash (exchange integration) (#260)

* fix(nibijs): NibiruQueryClient must expose methods from the Tendermint client

* feat(nibijs): functions for humans + getTxByHash

* chore(nibijs): build docs

* test(nibijs): fix import

* refactor(nibijs): remove unused fn, 'go', and use Result instead

* docs(nibijs-result): function docs

* test: fix by removing usage of go in test

* test: fix inactive chaint est

* test: fix inactive chaint est

* test: address PR comments

* chore(nibijs): rebuild docs

* Update packages/nibijs/src/result.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix: initChainId couldn't handle number == 0 case

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix: yarn merge

* fix: align chain id (#263)

* fix: align chain id

* fix: merge

* fix: merge

* fix: test

* fix: fix

* fix: fix

* fix: rem readme

* fix: point tests at devnet

* refactor(nibijs)!: NibiruSigningClient -> NibiruTxClient, NibiruQueryClient -> NibiruQuerier (#265)

* refactor(nibijs)!: NibiruSigningClient -> NibiruTxClient, NibiruQueryClient -> NibiruQuerier

* chore: rebuild docs + txClient file name

* fix(release): publish please

* chore: rebuild docs with v0.21.43 (main)

* feat(nibijs): mainnet custom chain function (#268)

* feat(nibijs): mainnet custom chain function

* PR comments

* coderabbit: Update packages/nibijs/docs/modules.md

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* refactor: adding hm & ws to custom chain (#269)

* test: faucet fix

* test: empty chain in faucet test

* refactor: endpt hm & ws typo

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Karim El Shenawy <[email protected]>
Co-authored-by: elshenak <[email protected]>

* feat(triggering release): now

* fix: install error

* fix: fix

names

* fix: fix update

* fix: fix build issue

* fix: fix

issue

* fix: fix

issue

* fix: fix

issue

* fix(fi): fix

* fix: fix

* fix: fix

* fix: fix

module resolution

* fix: fix

issues

* fix: revert

* fix: more reverts

* fix: rev

* fix: fix

* fix: git push

* fix: fix

* fix: fix

issues

* fix: fix

---------

Co-authored-by: Unique Divine <[email protected]>
Co-authored-by: Karim El Shenawy <[email protected]>
Co-authored-by: elshenak <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Unique-Divine <[email protected]>

* chore(release): 0.21.34

## [@nibiruchain/indexer-nibi-v0.21.34](https://github.com/NibiruChain/ts-sdk/compare/@nibiruchain/indexer-nibi-v0.21.33...@nibiruchain/indexer-nibi-v0.21.34) (2024-01-05)

### Miscellaneous Chores

* develop -> main ([#275](#275)) ([c5e4f87](c5e4f87)), closes [#254](#254) [#256](#256) [#257](#257) [#262](#262) [#260](#260)

 [skip ci]

---------

Co-authored-by: Unique Divine <[email protected]>
Co-authored-by: Karim El Shenawy <[email protected]>
Co-authored-by: elshenak <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Unique-Divine <[email protected]>
Co-authored-by: semantic-release-bot <[email protected]>

* fix: fix

merge

* fix: readme code examples adjusted (#278)

* fix: readme code examples adjusted

* chore: removed unused examples folder

* chore: removed testing examples from gh workflow

* fix: removed examples from install:packages

* refactor: re-arch (#279)

* refactor: re-arch

* fix: update ci

* fix: fox

* fix: fix

* fix: test

* fix: test

* fix: tests

* fix: fix

* fix: dont run tests against dist

* fix: cov

* fix: fix

* fix: fix

* fix: sonar

* fix: fixes

* fix: fix

* fix: fox

* fix: fix

* fix: again

* fix: fix

* fix: fix

* fix: fix

* fix: fix

* fix: fix

* fix: fix

* fix: fix

* fix: test

* fix: test

* fix: test

* fix: test

* fix: fix

* fix: test

* fix: test

* fix: test

* fix: test

* fix: test

* fix: fix

* fix: fix

* feat: gql wasm (#280)

* feat: gql wasm

* test: gql wasm

* fix: rename const

---------

Co-authored-by: Unique Divine <[email protected]>
Co-authored-by: Karim El Shenawy <[email protected]>
Co-authored-by: elshenak <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Unique-Divine <[email protected]>
Co-authored-by: semantic-release-bot <[email protected]>
Co-authored-by: Oleg Nikonychev <[email protected]>
Co-authored-by: Ruslan Shakirov <[email protected]>
  • Loading branch information
9 people authored Jan 19, 2024
1 parent 47c5677 commit 24fa8fa
Show file tree
Hide file tree
Showing 225 changed files with 1,675 additions and 100,602 deletions.
93 changes: 9 additions & 84 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,96 +1,21 @@
const common = {
module.exports = {
env: {
node: true,
es6: true,
browser: true,
es6: true,
node: true,
"jest/globals": true,
},
plugins: ["prettier", "jest"],
extends: ["airbnb-base", "prettier", "plugin:jest/recommended"],
rules: {
"@typescript-eslint/no-redeclare": ["error"],
"@typescript-eslint/no-useless-constructor": "error",
camelcase: "off",
"consistent-return": "off",
eqeqeq: "off",
"no-unreachable-loop": ["off"],
"import/extensions": "off",
"lines-between-class-members": "off",
"no-underscore-dangle": "off",
"import/no-extraneous-dependencies": ["error", { devDependencies: true }],
"import/no-named-as-default": "off",
"import/prefer-default-export": "off",
"jest/consistent-test-it": [
"error",
{ fn: "test", withinDescribe: "test" },
],
"jest/disallow-commented-out-tests": "off",
"jest/expect-expect": "off",
"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/no-conditional-expect": "off",
"jest/no-test-return-statement": "off",
"jest/prefer-expect-assertions": "off",
"jest/prefer-to-have-length": "warn",
"jest/require-hook": "off",
"jest/valid-expect": ["error", { maxArgs: 2 }],
"guard-for-in": "off",
"max-classes-per-file": ["off", {}],
"no-await-in-loop": "off",
"no-console": "off",
"no-iterator": "off",
"no-else-return": "off",
"no-param-reassign": "off",
"no-redeclare": "off",
"no-restricted-syntax": "off",
"no-shadow": "off",
"no-unused-vars": [
"off",
{ args: "none", argsIgnorePattern: "^_", vars: "local" },
],
"no-use-before-define": "off",
"no-useless-constructor": "off",
quotes: ["off"],
"quote-props": ["warn", "as-needed"],
radix: "off",
},
}

module.exports = {
root: true,
overrides: [
{
/*
eslint-plugin-markdown only finds javascript code block snippet.
For specific spec, refer to https://github.com/eslint/eslint-plugin-markdown
*/
files: ["**/*.js", "**/*.md"],
...common,
},
{
files: ["**/*.ts"],
parser: "@typescript-eslint/parser",
env: common.env,
plugins: [...common.plugins, "@typescript-eslint"],
extends: [
...common.extends,
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
],
rules: {
...common.rules,
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-unused-vars": "off",
},
settings: {
"import/resolver": {
// node: ['.js', '.ts'],
typescript: {},
},
},
},
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "jest", "prettier"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:prettier/recommended",
],
}
46 changes: 30 additions & 16 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Semantic Release 🚀
on:
push:
branches: ["main", "release/*"]
branches: ["main"]

permissions:
contents: read
Expand All @@ -16,27 +16,41 @@ jobs:
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v3
- name: Checkout ts-sdk Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Setup NodeJS and npm
uses: actions/setup-node@v3
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
path: "ts-sdk"

- name: Checkout nibiru Repository
uses: actions/checkout@v4
with:
node-version: "lts/hydrogen"
- name: Install yarn using npm
run: npm install -g yarn
- name: Setup NodeJS with yarn caching
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
repository: NibiruChain/nibiru
ref: releases/v0.21.x
path: "nibiru"
token: ${{ secrets.NIBIBOT_GIT_TOKEN }}

- name: Setup NodeJS and npm
uses: actions/setup-node@v3
with:
node-version: "lts/hydrogen"
cache: "yarn"
- name: Install dependencies
run: yarn --prefer-offline --check-files
- name: Packages Build
run: yarn build
- name: Semantic Release

- name: yarn install
uses: borales/actions-yarn@v4
with:
cmd: install

- name: yarn build
uses: borales/actions-yarn@v4
with:
cmd: build

- name: yarn semantic-release
uses: borales/actions-yarn@v4
env:
GITHUB_TOKEN: ${{ secrets.NIBIBOT_GIT_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn semantic-release
with:
cmd: semantic-release
79 changes: 25 additions & 54 deletions .github/workflows/test-ts-sdk.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ⛓️ Tests @nibiruchain/ts-sdk
name: ⛓️ Builds and Tests @nibiruchain/ts-sdk

on:
pull_request:
Expand All @@ -7,72 +7,49 @@ on:
branches: ["main"]

jobs:
checkout_cache_install:
checkout_cache_install_build_test:
runs-on: ubuntu-latest
env:
VALIDATOR_MNEMONIC: ${{ secrets.VALIDATOR_MNEMONIC }}
VALIDATOR_ADDRESS: ${{ secrets.VALIDATOR_ADDRESS }}
LCD_ENDPOINT: "http://127.0.0.1:1317"
GRPC_ENDPOINT: "127.0.0.1:9090"
TENDERMINT_RPC_ENDPOINT: "http://127.0.0.1:26657"
USE_LOCALNET: true
WEBSOCKET_ENDPOINT: "ws://127.0.0.1:26657/websocket"
CHAIN_ID: "nibiru-localnet-0"
steps:
- name: Checkout Repository
- name: Checkout ts-sdk Repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- name: Checkout nibiru Repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
repository: NibiruChain/nibiru
ref: releases/v0.21.x
path: "nibiru"
token: ${{ secrets.NIBIBOT_GIT_TOKEN }}

- name: Setup NodeJS with yarn caching
uses: actions/setup-node@v3
with:
node-version: "lts/hydrogen"
cache: "yarn"
cache-dependency-path: "**/yarn.lock"

- name: yarn install
uses: borales/actions-yarn@v4
with:
cmd: install:packages

- name: "Tar files"
run: tar -cf preview_image.tar ./

- name: Upload preview_image
uses: actions/upload-artifact@v4
with:
name: preview_image
path: ./preview_image.tar

build:
runs-on: ubuntu-latest
needs: [checkout_cache_install]
steps:
- name: Download preview_image
uses: actions/download-artifact@v4
with:
name: preview_image

- name: Untar files
run: tar -xf preview_image.tar
cmd: install

- name: yarn build
uses: borales/actions-yarn@v4
with:
cmd: build

test:
runs-on: ubuntu-latest
needs: [checkout_cache_install]
env:
VALIDATOR_MNEMONIC: ${{ secrets.VALIDATOR_MNEMONIC }}
VALIDATOR_ADDRESS: ${{ secrets.VALIDATOR_ADDRESS }}
LCD_ENDPOINT: "http://127.0.0.1:1317"
GRPC_ENDPOINT: "127.0.0.1:9090"
TENDERMINT_RPC_ENDPOINT: "http://127.0.0.1:26657"
USE_LOCALNET: true
WEBSOCKET_ENDPOINT: "ws://127.0.0.1:26657/websocket"
CHAIN_ID: "nibiru-localnet-0"
steps:
- name: Download preview_image
uses: actions/download-artifact@v4
with:
name: preview_image

- name: Untar files
run: tar -xf preview_image.tar

- name: Run Nibiru network in the background (scripts/localnet.sh)
run: |
# Install nibid CLI
Expand All @@ -88,16 +65,10 @@ jobs:
with:
cmd: test

- name: "Run examples"
run: |
cd examples
yarn run:examples
cd ..
# tsx is a TS script executor similar to ts-node, except it runs more
# consistently and has a more lightweight implementation.
- name: Jest Coverage Comment
uses: MishaKav/jest-coverage-comment@main
with:
coverage-summary-path: ./coverage/coverage-summary.json

- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ temp
# Created by https://www.gitignore.io/api/node,intellij+all,visualstudiocode
# Edit at https://www.gitignore.io/?templates=node,intellij+all,visualstudiocode

examples/foo.ts

docs/
src/protojs/
proto/
src/indexer-nibi/gql/

### Intellij+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
Expand Down
1 change: 1 addition & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module.exports = {
semi: false,
endOfLine: "lf",
}
Loading

0 comments on commit 24fa8fa

Please sign in to comment.