Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated spellchecking with cspell [SLT-408] #3350

Merged
merged 7 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 71 additions & 68 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,72 +41,75 @@ jobs:
- name: Run tests # Run tests of all packages
run: npx lerna exec npm run ci:lint --parallel

- name: Run spellcheck # Run spellcheck of all packages
run: npx lerna exec npm run ci:spellcheck --parallel
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we feel about using --if-present flag for the ci:spellcheck script? This should allow to define the script only in the packages we care about the spellcheck and simply ignore the rest of the packages.

Suggested change
run: npx lerna exec npm run ci:spellcheck --parallel
run: npx lerna exec npm run ci:spellcheck --parallel -- --if-present


test:
runs-on: ubuntu-latest
env:
SDK_RPC_URL: ${{ secrets.SDK_RPC_URL }}

steps:
- name: 'Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 2
submodules: 'recursive'

- name: Setup NodeJS
uses: ./.github/actions/setup-nodejs

# Foundry is required for build
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Verify Changed files
uses: tj-actions/verify-changed-files@v11.1
id: verify-yarn-lock
with:
files: |
yarn.lock

- name: Add Label
if: ${{ steps.verify-yarn-lock.outputs.files_changed == 'true' && github.event_name != 'push' }}
uses: ./.github/actions/add-label
with:
label: 'needs-yarn-install'

- name: Remove Label
if: ${{ steps.verify-yarn-lock.outputs.files_changed != 'true' && github.event_name != 'push' }}
uses: ./.github/actions/remove-label
with:
label: 'needs-yarn-install'

- name: List all changed files tracked and untracked files
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
echo "Changed files: ${{ steps.verify-changed-files.outputs.changed_files }}"

- name: Run tests # Run tests of all packages
run: yarn test:coverage

- name: LCOV move
run: mv lcov/lcov.info lcov.info

- name: Send Coverage (Codecov)
uses: Wandalen/wretry.action@v1.0.36
with:
action: codecov/codecov-action@v3
with: |
token: ${{ secrets.CODECOV }}
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
flags: packages
files: lcov.info
attempt_limit: 5
attempt_delay: 30000

- name: Run build # Run tests of all packages
run: npx lerna exec npm run build --parallel || true # only for codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV }}
GH_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
runs-on: ubuntu-latest
env:
SDK_RPC_URL: ${{ secrets.SDK_RPC_URL }}

steps:
- name: 'Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 2
submodules: 'recursive'

- name: Setup NodeJS
uses: ./.github/actions/setup-nodejs

# Foundry is required for build
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Verify Changed files
uses: tj-actions/verify-changed-files@v11.1
id: verify-yarn-lock
with:
files: |
yarn.lock

- name: Add Label
if: ${{ steps.verify-yarn-lock.outputs.files_changed == 'true' && github.event_name != 'push' }}
uses: ./.github/actions/add-label
with:
label: 'needs-yarn-install'

- name: Remove Label
if: ${{ steps.verify-yarn-lock.outputs.files_changed != 'true' && github.event_name != 'push' }}
uses: ./.github/actions/remove-label
with:
label: 'needs-yarn-install'

- name: List all changed files tracked and untracked files
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
echo "Changed files: ${{ steps.verify-changed-files.outputs.changed_files }}"

abtestingalpha marked this conversation as resolved.
Show resolved Hide resolved
- name: Run tests # Run tests of all packages
run: yarn test:coverage

- name: LCOV move
run: mv lcov/lcov.info lcov.info

- name: Send Coverage (Codecov)
uses: Wandalen/wretry.action@v1.0.36
with:
action: codecov/codecov-action@v3
with: |
token: ${{ secrets.CODECOV }}
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
flags: packages
files: lcov.info
attempt_limit: 5
attempt_delay: 30000

- name: Run build # Run tests of all packages
run: npx lerna exec npm run build --parallel || true # only for codecov
abtestingalpha marked this conversation as resolved.
Show resolved Hide resolved
env:
CODECOV_TOKEN: ${{ secrets.CODECOV }}
GH_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
abtestingalpha marked this conversation as resolved.
Show resolved Hide resolved
150 changes: 150 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
{
"version": "0.2",
"language": "en",
"words": [
"GÖRLI",
"aall",
"anonymization",
"arbitrability",
"artifacthub",
"atrue",
"auxilliary",
"avweth",
"basescan",
"bcbd",
"blastscan",
"bridgable",
"bridgeable",
"bridgesyn",
"bscscan",
"bvalue",
"capa",
"cctp",
"chainid",
"chainprice",
"circlecctp",
"coinbasewallet",
"commify",
"crono",
"cronos",
"cyberattack",
"defillama",
"dencun",
"depeg",
"dogechain",
"ellipsize",
"ethergo",
"ethersproject",
"ethtx",
"extralight",
"ftmscan",
"getids",
"gitbook",
"gorm",
"headlessui",
"incentivized",
"interchain",
"ipfs",
"ipns",
"klaytn",
"libp",
"lifi",
"linea",
"livefill",
"livefill",
"livefiller",
"livefilling",
"loadtest",
"logrocket",
"melrose",
"metisusdc",
"monke",
"moonriver",
"multichain",
"nodereal",
"noncestatus",
"npdhrc",
"nums",
"ofac",
"omnirpc",
"opaciyt",
"permissionlessly",
"persistor",
"popperjs",
"pyroscope",
"rainbowkit",
"rebalance",
"rebalancer",
"rebalancing",
"returntomonke",
"scrollscan",
"secg",
"signerconfig",
"signoz",
"snowscan",
"solana",
"stablecoins",
"stableswap",
"stakable",
"swapable",
"swapabletype",
"synape",
"synapsecns",
"synapseprotocol",
"synpfpborder",
"traderjoe",
"tsdx",
"tvls",
"txdb",
"txns",
"unbonded",
"unincentivized",
"unstake",
"unstaked",
"unstaking",
"upserted",
"viem",
"wagmi",
"wethe",
"worldchain",
"xngmi",
"xstep"
],
"dictionaries": [
"en_US",
"cryptocurrencies",
"golang",
"softwareTerms",
"typescript"
],
"ignorePaths": [
".docusaurus/**",
"build/**",
"node_modules/**",
"docusaurus.config.ts",
"CHANGELOG.md"
],
"ignoreRegExpList": [
"G-[A-Z0-9]{9,}",
"(?:const|let|var)\\s+[a-zA-Z_][a-zA-Z0-9_]*\\s*=\\s*(?:\\(|\\{|\\[|\"|\\'|\\d|`|=>)",
"id=\"[\\w-]+\"",
"[^a-zA-Z\\s].*"
],
"patterns": [
{
"name": "markdown_code_blocks",
"pattern": "/```[\\s\\S]*?```/g",
"description": "Ignore code blocks in markdown"
},
{
"name": "urls_and_domains",
"pattern": "(?:https?://)?(?:[\\w-]+\\.)+[\\w-]+(?:/[\\w-./?%&=]*)?",
"description": "Ignore URLs and domain names"
},
{
"name": "websocket_urls",
"pattern": "wss?://[^\\s]*",
"description": "Ignore WebSocket URLs"
}
]
}
2 changes: 1 addition & 1 deletion docs/bridge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This website is built using [Docusaurus](https://docusaurus.io/), a modern stati

## Generating API Docs

<!--TODO: needs to be done from ci to ensure regenration is done.-->
<!--TODO: needs to be done from ci to ensure regeneration is done.-->

`yarn docusaurus gen-api-docs all`.

Expand Down
2 changes: 1 addition & 1 deletion docs/bridge/docs/02-Bridge/01-SDK.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Requires either the `npm` or `yarn` package manager.

The SDK package relies on the `@ethersproject` and `ethers` dependencies, installed from `npm`.

To begin constructing bridge-related transactions, first set up your environment wiht your providers, and format them, along with the `chainIds` you will be using, to set up a `SynapseSDK` instance.
To begin constructing bridge-related transactions, first set up your environment with your providers, and format them, along with the `chainIds` you will be using, to set up a `SynapseSDK` instance.

#### Ethers v5

Expand Down
11 changes: 5 additions & 6 deletions docs/bridge/docs/02-Bridge/02-REST-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@ Get read-only data from on-chain Synapse contracts, and generate Bridge and Swap

## Previous versions

| Date | Description
|------------------------|-
| 2024&#8209;10&#8209;01 | [https://synapse-rest-api-v2.herokuapp.com/](https://synapse-rest-api-v2.herokuapp.com/) is no longer maintained and has been fully deprecated as of October 2024.
| Date | Description |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 2024&#8209;10&#8209;01 | [https://synapse-rest-api-v2.herokuapp.com/](https://synapse-rest-api-v2.herokuapp.com/) is no longer maintained and has been fully deprecated as of October 2024. |

## Support

Please read the documentation and examples carefully before reaching out on [Discord](https://discord.gg/synapseprotocol) for questions.


<!-- ## GET Endpoints

### `/swap`
Expand All @@ -39,7 +38,7 @@ Get a token swap quote.
* `routerAddress` (string): The address of the router contract
* `maxAmountOut {` (object): The maximum amount of tokens that can be swapped out.
* `type:` (string): The data type
* `hex:` (string): The amount encoded in hexidecimal
* `hex:` (string): The amount encoded in hexadecimal
* `query {` (object): Parameters for the swap query:
* `0:` (string): Router contract address
* `1:` (string): Address of `tokenIn`
Expand Down Expand Up @@ -197,7 +196,7 @@ Used to return which tokens you can bridge to, once an origin token is identifie
* Array of token objects the `fromToken` can be bridged to, containing:
* `symbol`: The token symbol of the destination token identified
* `chainId`: The `chainId` of the destination token identified
* `addres`: The token address of the destination token identified
* `address`: The token address of the destination token identified


#### Example
Expand Down
Loading
Loading