Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
64 changes: 24 additions & 40 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI
name: Explorer CI

on:
push:
branches: [main, staging]
pull_request:
workflow_dispatch:

env:
NODE_VERSION: 22.x

jobs:
lint:
runs-on: ubuntu-latest

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

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: ${{ env.NODE_VERSION }}

- name: Cache node modules
id: cache-nodemodules
Expand All @@ -32,10 +28,10 @@ jobs:
with:
# caching node_modules
path: node_modules
key: ${{ matrix.node-version }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ matrix.node-version }}-build-${{ env.cache-name }}-
${{ matrix.node-version }}-build-
${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-
${{ env.NODE_VERSION }}-build-

- name: Install Dependencies
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
Expand All @@ -46,16 +42,12 @@ jobs:
test:
runs-on: ubuntu-latest

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

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: ${{ env.NODE_VERSION }}

- name: Cache node modules
id: cache-nodemodules
Expand All @@ -65,10 +57,10 @@ jobs:
with:
# caching node_modules
path: node_modules
key: ${{ matrix.node-version }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ matrix.node-version }}-build-${{ env.cache-name }}-
${{ matrix.node-version }}-build-
${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-
${{ env.NODE_VERSION }}-build-

- name: Install Dependencies
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
Expand All @@ -86,16 +78,12 @@ jobs:
build:
runs-on: ubuntu-latest

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

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: ${{ env.NODE_VERSION }}

- name: Cache node modules
id: cache-nodemodules
Expand All @@ -105,10 +93,10 @@ jobs:
with:
# caching node_modules
path: node_modules
key: ${{ matrix.node-version }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ matrix.node-version }}-build-${{ env.cache-name }}-
${{ matrix.node-version }}-build-
${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-
${{ env.NODE_VERSION }}-build-

- name: Install Dependencies
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
Expand All @@ -119,16 +107,12 @@ jobs:
typescript-check:
runs-on: ubuntu-latest

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

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: ${{ env.NODE_VERSION }}

- name: Cache node modules
id: cache-nodemodules
Expand All @@ -138,10 +122,10 @@ jobs:
with:
# caching node_modules
path: node_modules
key: ${{ matrix.node-version }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ matrix.node-version }}-build-${{ env.cache-name }}-
${{ matrix.node-version }}-build-
${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-
${{ env.NODE_VERSION }}-build-

- name: Install Dependencies
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.12.1
v22.14.0
32 changes: 18 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,22 @@ This project uses [Vite](https://vitejs.dev/). You can find information about ho

### Install Node and NPM

The project requires node@18.12.x. Follow installation instructions on [nodejs.org](https://nodejs.org/en/).
The project requires node@22. Follow installation instructions on [nodejs.org](https://nodejs.org/en/).

(Recommended) Install using [nvm](https://github.com/nvm-sh/nvm).

Make sure to use npm version 8+ by running `npm install -g npm@latest` after you install Node.

### Google BigQuery Setup

This setup is required for the Tokens page of the explorer to function:

1. [Select or create a Cloud Platform project][projects].
1. [Enable the Google BigQuery API][enable_api].
1. [Set up authentication with a service account][auth]

Once you have completed these steps and generated the JSON key file, you must populate the following environment variables in the .env file with their corresponding values from the JSON key file:

```
GOOGLE_APP_PROJECT_ID=your-project-id
GOOGLE_APP_PRIVATE_KEY=-----BEGIN PRIVATE KEY-----\n...
Expand All @@ -34,11 +36,12 @@ GOOGLE_APP_CLIENT_EMAIL=your-client-email

## Install, compile, and run

* `npm install` then
* `npm start` for development mode, or
* `npm run build` then `npm run prod-server` for production mode
- `npm install` then
- `npm start` for development mode, or
- `npm run build` then `npm run prod-server` for production mode

### Installing on Apple Silicon

Since `canvas` does not provide pre-built binaries for Apple chips during `npm install` it will try to compile it manually. To get this to succeed you need to install several dependencies by following the instructions [here](https://github.com/Automattic/node-canvas#compiling).

## Running on Parallel Networks
Expand All @@ -57,9 +60,9 @@ Since `canvas` does not provide pre-built binaries for Apple chips during `npm i

### Run unit tests

* Run tests in watch mode `npm test`
* Run test to produce coverage `npm run test:coverage`
* To open coverage HTML report in app root do `open coverage/index.html`
- Run tests in watch mode `npm test`
- Run test to produce coverage `npm run test:coverage`
- To open coverage HTML report in app root do `open coverage/index.html`

### Debugging Unit Tests in Chrome

Expand All @@ -84,20 +87,21 @@ Since `canvas` does not provide pre-built binaries for Apple chips during `npm i
1. US English (default)
1. Spanish
1. French
1. Japanese
1. Korean
1. Japanese
1. Korean

When updating translation entires or adding new languages consult the guide [Translating](./docs/translating.md).

## Additional Documentation
* [How to define transactions](./src/containers/shared/components/Transaction/README.md)
* [Routing](./docs/routing.md)

- [How to define transactions](./src/containers/shared/components/Transaction/README.md)
- [Routing](./docs/routing.md)

## React Documentation

* Latest news in [react blog](https://reactjs.org/blog)
* [React documentation](https://reactjs.org/docs)
* [How to think in react](https://reactjs.org/docs/thinking-in-react.html) and break down components
- Latest news in [react blog](https://reactjs.org/blog)
- [React documentation](https://reactjs.org/docs)
- [How to think in react](https://reactjs.org/docs/thinking-in-react.html) and break down components

[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=bigquery.googleapis.com
[projects]: https://console.cloud.google.com/project
Expand Down
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"@types/enzyme": "^3.10.12",
"@types/jest": "^26.0.24",
"@types/lodash": "^4.17.6",
"@types/node": "^18.19.33",
"@types/node": "^22.14.0",
"@types/react": "^17.0.39",
"@types/react-dom": "^17.0.9",
"@typescript-eslint/eslint-plugin": "^7.0.0",
Expand Down Expand Up @@ -139,7 +139,7 @@
],
"prettier": "@xrplf/prettier-config",
"engines": {
"node": ">=18.0.0 <19",
"node": ">=22.0.0 <23",
"npm": ">=9.0.0 <11.0.0"
}
}