Require Node.js 22+
Needs a temporary env var for the tasks, until a larger dependency update
This commit is contained in:
@@ -22,7 +22,7 @@ jobs:
|
||||
- name: Install Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: 22
|
||||
|
||||
- name: Install Dependencies
|
||||
run: npm ci
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
name: "Test"
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: cypress/browsers:node16.18.0-chrome107-ff106-edge
|
||||
image: cypress/browsers:node-22.21.0-chrome-141.0.7390.107-1-ff-144.0-edge-141.0.3537.92-1
|
||||
timeout-minutes: 10
|
||||
|
||||
steps:
|
||||
|
||||
@@ -14,7 +14,7 @@ Unhosted Ember.js Web UI for [Kosmos Kredits](https://wiki.kosmos.org/Kredits)
|
||||
- **ethers 5** + **@kredits/contracts** for on-chain reads/writes
|
||||
- **ember-concurrency** for async sync tasks; **Ember Services** for state (no Redux, no Ember Data)
|
||||
- **QUnit** + qunit-dom + fetch-mock for tests
|
||||
- **Node 16** (`.nvmrc`); `>= 14` in engines
|
||||
- **Node 22** (`.nvmrc`); `>= 22` in engines
|
||||
|
||||
## Commands
|
||||
|
||||
@@ -22,8 +22,7 @@ Unhosted Ember.js Web UI for [Kosmos Kredits](https://wiki.kosmos.org/Kredits)
|
||||
|---|---|
|
||||
| Dev server (RSK testnet) | `npm start` |
|
||||
| Dev against local Hardhat devchain | `npm run start:local` |
|
||||
| Full lint + test pipeline (CI) | `npm test` |
|
||||
| Ember/QUnit suite only | `npm run test:ember` |
|
||||
| Ember/QUnit suite (all tests) | `ember test` |
|
||||
| Interactive test runner | `ember test --server` |
|
||||
| All linters | `npm run lint` |
|
||||
| Lint JS (autofix) | `npm run lint:js -- --fix` |
|
||||
@@ -91,7 +90,7 @@ Read in `config/environment.js` (lines ~102–110). No `.env.example` (`.gitigno
|
||||
|
||||
- **Framework**: QUnit via `ember-qunit` + `qunit-dom`; `@ember/test-helpers` (`render`, `click`, `fillIn`).
|
||||
- **HTTP mocking**: `fetch-mock` — `tests/test-helper.js` mocks Bitstamp ticker endpoints globally.
|
||||
- **Runner**: headless Chrome (`testem.js`); CI uses Node 16 via `.github/workflows/ci.yml`.
|
||||
- **Runner**: headless Chrome (`testem.js`); CI uses Node 22 via `.gitea/workflows/ci.yaml`.
|
||||
- **File patterns**:
|
||||
- `tests/unit/<type>/<name>-test.js` — unit tests for services, controllers, routes, models, helpers, utils.
|
||||
- `tests/integration/components/<name>/component-test.js` — component rendering tests (PODS layout).
|
||||
@@ -102,6 +101,7 @@ Read in `config/environment.js` (lines ~102–110). No `.env.example` (`.gitigno
|
||||
## Gotchas
|
||||
|
||||
- **Mid-migration codebase**: classic and Octane component styles coexist. Linters warn (not error) on legacy patterns; `.template-lintrc.js` keeps a `pending` list of templates still using `{{action}}`.
|
||||
- **OpenSSL on Node 17+**: `ember-auto-import@1` bundles webpack 4, which hashes with MD4 — dropped by OpenSSL 3 in Node 17+. The `npm` scripts (`start`, `test`, `build`, `build-prod`, `start:local`) prepend `NODE_OPTIONS=--openssl-legacy-provider` to work around this. Direct `npx ember ...` invocations must set the flag manually. Remove once ember-auto-import is upgraded to v2+.
|
||||
- **`release/` is committed build output** — don't hand-edit; regenerated by `npm run build-prod` (auto-staged on `npm version`).
|
||||
- **Deployment is `git push 5apps master`** (5apps static hosting) — pushing to `master` triggers a deploy. Be deliberate about commits/pushes.
|
||||
- **No `.env.example`** — set `WEB3_*` vars inline (see `npm run start:local` for the pattern).
|
||||
|
||||
+6
-6
@@ -14,11 +14,11 @@
|
||||
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*",
|
||||
"lint:hbs": "ember-template-lint .",
|
||||
"lint:js": "eslint .",
|
||||
"start": "ember serve",
|
||||
"test": "ember test",
|
||||
"start:local": "WEB3_PROVIDER_URL=http://localhost:8545 WEB3_CHAIN_ID=1337 WEB3_NETWORK_NAME='Hardhat Devchain' ember serve",
|
||||
"build": "ember build --environment=production",
|
||||
"build-prod": "rm -rf release/* && ember build -prod --output-path release",
|
||||
"start": "NODE_OPTIONS=--openssl-legacy-provider ember serve",
|
||||
"test": "NODE_OPTIONS=--openssl-legacy-provider ember test",
|
||||
"start:local": "WEB3_PROVIDER_URL=http://localhost:8545 WEB3_CHAIN_ID=1337 WEB3_NETWORK_NAME='Hardhat Devchain' NODE_OPTIONS=--openssl-legacy-provider ember serve",
|
||||
"build": "NODE_OPTIONS=--openssl-legacy-provider ember build --environment=production",
|
||||
"build-prod": "rm -rf release/* && NODE_OPTIONS=--openssl-legacy-provider ember build -prod --output-path release",
|
||||
"preversion": "npm test",
|
||||
"version": "npm run build-prod && git add release/",
|
||||
"deploy": "git push 5apps master"
|
||||
@@ -76,7 +76,7 @@
|
||||
"web3-utils": "^1.7.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14"
|
||||
"node": ">= 22"
|
||||
},
|
||||
"ember": {
|
||||
"edition": "octane"
|
||||
|
||||
Reference in New Issue
Block a user