From 239d86b9bec37ac13ec218b5fab70327751ef93b Mon Sep 17 00:00:00 2001 From: Olivier Philippon Date: Tue, 10 May 2022 09:32:53 +0100 Subject: [PATCH 1/2] [runtime] Upgrade Node.js to version 16 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Node.js 16.x just landed on Vercel! 🎈 https://vercel.com/changelog/node-js-16-lts-is-now-available ...only a few hours after the runtime actually landed on AWS itself: 👌 https://github.com/aws/aws-lambda-base-images/issues/14#issuecomment-1120864028 --- .github/workflows/code-quality.yml | 2 +- .nvmrc | 2 +- README.md | 4 ++-- package-lock.json | 2 +- package.json | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index 4be7a88..ca3572c 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/setup-node@v2 with: - node-version: 14 + node-version: 16 - name: "Cache node_modules" uses: actions/cache@v2 diff --git a/.nvmrc b/.nvmrc index 8351c19..b6a7d89 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -14 +16 diff --git a/README.md b/README.md index 44dd0d5..1116ac8 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,10 @@ We welcome PRs to add projects to the Rich / Textual galleries. Can't promise we ## Start dev server for maintaining purpose -You will need Node.js (version 14, as newer versions are not supported by our hosting platform at the moment) to run the site locally. +You will need Node.js (version 16 to run the site locally. Using [nvm](https://github.com/nvm-sh/nvm#intro) is the recommended way to install such a version. Once it is installed, you can run the following commands: -- `nvm install 14 && nvm use 14` - installs Node.js v14 +- `nvm install 16 && nvm use 16` - installs Node.js v14 - `npm i` - installs the Node.js dependencies - `npm run dev` - starts the local development server diff --git a/package-lock.json b/package-lock.json index e6f9b21..ea0c344 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,7 +42,7 @@ "typescript": "^4.6.3" }, "engines": { - "node": "14.x" + "node": "16.x" } }, "node_modules/@babel/code-frame": { diff --git a/package.json b/package.json index 4d5ea19..f18bdbf 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "private": true, "name": "Textualize.io", "engines": { - "node": "14.x" + "node": "16.x" }, "scripts": { "dev": "next dev", From b534ea75ed98f2fe862efaf6c935a7783aed9956 Mon Sep 17 00:00:00 2001 From: Olivier Philippon Date: Tue, 10 May 2022 09:37:16 +0100 Subject: [PATCH 2/2] [build cache] Fix a bug when the persistent-Next-cache-on-Vercel is not initialised yet ...by creating the `.next/cache/` at the start of the prod build folder if it doesn't exist yet --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f18bdbf..bc772ac 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "dev": "next dev", "build": "next build", "build:prod": "npm run build:textualize-cache:display && npm run scripts:transpile && npm run scripts:generate-data-code-for-galleries && next build && npm run build:textualize-cache:display", - "build:textualize-cache:display": "cat .next/cache/textualize-cache.*.json || true", + "build:textualize-cache:display": "mkdir -p .next/cache/ && cat .next/cache/textualize-cache.*.json || true", "build:textualize-cache:clear": "rm -f .next/cache/textualize-cache.*.json || true", "start": "next start", "prepare": "husky install",