feat: upgrade to node 18 (#6606)

* feat: upgrade to node 18

* use 18.x

* try removing npx from fetch schema fn

* use yarn

* setup github build on 18

* no yarn

* use yarn and sanitize output

* yarn silent

* update workflows

* fully remove unused step

---------

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
This commit is contained in:
Charles Bachmeier 2023-06-06 11:59:03 -07:00 committed by GitHub
parent f2a3b66357
commit 0baa8a1fff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 4 additions and 18 deletions

@ -8,7 +8,7 @@ runs:
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: 14 node-version: 18
registry-url: https://registry.npmjs.org registry-url: https://registry.npmjs.org
cache: 'yarn' cache: 'yarn'

@ -27,10 +27,6 @@ jobs:
- run: yarn build - run: yarn build
env: env:
REACT_APP_STAGING: 1 REACT_APP_STAGING: 1
- name: Setup node@16 (required by Cloudflare Pages)
uses: actions/setup-node@v3
with:
node-version: 16
- name: Update Cloudflare Pages deployment - name: Update Cloudflare Pages deployment
id: pages-deployment id: pages-deployment
uses: cloudflare/pages-action@364c7ca09a4b57837c5967871d64a2c31adb8c0d uses: cloudflare/pages-action@364c7ca09a4b57837c5967871d64a2c31adb8c0d

@ -74,11 +74,6 @@ jobs:
${{ steps.github-tag-action.outputs.changelog }} ${{ steps.github-tag-action.outputs.changelog }}
- name: Setup node@16 (required by Cloudflare Pages)
uses: actions/setup-node@v3
with:
node-version: 16
- name: Update Cloudflare Pages deployment - name: Update Cloudflare Pages deployment
uses: cloudflare/pages-action@364c7ca09a4b57837c5967871d64a2c31adb8c0d uses: cloudflare/pages-action@364c7ca09a4b57837c5967871d64a2c31adb8c0d
id: pages-deployment id: pages-deployment

@ -96,11 +96,6 @@ jobs:
${{ needs.tag.outputs.changelog }} ${{ needs.tag.outputs.changelog }}
- name: Setup node@16 (required by Cloudflare Pages)
uses: actions/setup-node@v3
with:
node-version: 16
- name: Update Cloudflare Pages deployment - name: Update Cloudflare Pages deployment
uses: cloudflare/pages-action@364c7ca09a4b57837c5967871d64a2c31adb8c0d uses: cloudflare/pages-action@364c7ca09a4b57837c5967871d64a2c31adb8c0d
with: with:

2
.nvmrc

@ -1 +1 @@
14.20.0 v18.16.0

@ -261,7 +261,7 @@
}, },
"engines": { "engines": {
"npm": "please-use-yarn", "npm": "please-use-yarn",
"node": "14", "node": "18.x",
"yarn": ">=1.22" "yarn": ">=1.22"
} }
} }

@ -10,7 +10,7 @@ const thegraphConfig = require('../graphql.thegraph.config')
const exec = promisify(child_process.exec) const exec = promisify(child_process.exec)
function fetchSchema(url, outputFile) { function fetchSchema(url, outputFile) {
exec(`npx get-graphql-schema --h Origin=https://app.uniswap.org ${url}`) exec(`yarn --silent get-graphql-schema --h Origin=https://app.uniswap.org ${url}`)
.then(({ stderr, stdout }) => { .then(({ stderr, stdout }) => {
if (stderr) { if (stderr) {
throw new Error(stderr) throw new Error(stderr)