chore: Update node version to 16.15.0 LTS (#14094)

This commit is contained in:
Arsalan Yaldram 2022-05-26 16:05:02 +05:30 committed by GitHub
parent 3c1b1a3628
commit b28eb3fed8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 76 additions and 74 deletions

View File

@ -75,11 +75,11 @@ jobs:
fetch-depth: 0 fetch-depth: 0
ref: refs/pull/${{ github.event.pull_request.number }}/merge ref: refs/pull/${{ github.event.pull_request.number }}/merge
- name: Use Node.js 14.15.4 - name: Use Node.js 16.15.0
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: "14.15.4" node-version: "16.15.0"
- name: Get yarn cache directory path - name: Get yarn cache directory path
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'
@ -340,11 +340,11 @@ jobs:
- if: steps.run_result.outputs.run_result != 'success' - if: steps.run_result.outputs.run_result != 'success'
run: echo "I'm alive!" && exit 0 run: echo "I'm alive!" && exit 0
- name: Use Node.js 14.15.4 - name: Use Node.js 16.15.0
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: "14.15.4" node-version: "16.15.0"
# Here, the GITHUB_REF is of type /refs/head/<branch_name>. We extract branch_name from this by removing the # Here, the GITHUB_REF is of type /refs/head/<branch_name>. We extract branch_name from this by removing the
# first 11 characters. This can be used to build images for several branches # first 11 characters. This can be used to build images for several branches
@ -581,11 +581,11 @@ jobs:
exit 1 exit 1
fi fi
- name: Use Node.js 14.15.4 - name: Use Node.js 16.15.0
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: "14.15.4" node-version: "16.15.0"
- name: Get yarn cache directory path - name: Get yarn cache directory path
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'

View File

@ -36,10 +36,10 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Use Node.js 14.15.4 - name: Use Node.js 16.15.0
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: "14.15.4" node-version: "16.15.0"
# Here, the GITHUB_REF is of type /refs/head/<branch_name>. We extract branch_name from this by removing the # Here, the GITHUB_REF is of type /refs/head/<branch_name>. We extract branch_name from this by removing the
# first 11 characters. This can be used to build images for several branches # first 11 characters. This can be used to build images for several branches

View File

@ -53,10 +53,10 @@ jobs:
- name: Figure out the PR number - name: Figure out the PR number
run: echo ${{ github.event.pull_request.number }} run: echo ${{ github.event.pull_request.number }}
- name: Use Node.js 14.15.4 - name: Use Node.js 16.15.0
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: "14.15.4" node-version: "16.15.0"
- name: Get yarn cache directory path - name: Get yarn cache directory path
id: yarn-dep-cache-dir-path id: yarn-dep-cache-dir-path

View File

@ -57,10 +57,10 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Use Node.js 14.15.4 - name: Use Node.js 16.15.0
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: "14.15.4" node-version: "16.15.0"
# Retrieve npm dependencies from cache. After a successful run, these dependencies are cached again # Retrieve npm dependencies from cache. After a successful run, these dependencies are cached again
- name: Cache npm dependencies - name: Cache npm dependencies
@ -161,10 +161,10 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Use Node.js 14.15.4 - name: Use Node.js 16.15.0
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: "14.15.4" node-version: "16.15.0"
- name: Build - name: Build
run: | run: |

View File

@ -186,11 +186,11 @@ jobs:
Commit: `${{ github.event.client_payload.slash_command.sha }}`. Commit: `${{ github.event.client_payload.slash_command.sha }}`.
PR: ${{ github.event.client_payload.pull_request.number }}. PR: ${{ github.event.client_payload.pull_request.number }}.
- name: Use Node.js 14.15.4 - name: Use Node.js 16.15.0
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: "14.15.4" node-version: "16.15.0"
- name: Get yarn cache directory path - name: Get yarn cache directory path
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'
@ -370,11 +370,11 @@ jobs:
- if: steps.run_result.outputs.run_result != 'success' - if: steps.run_result.outputs.run_result != 'success'
run: echo "I'm alive!" && exit 0 run: echo "I'm alive!" && exit 0
- name: Use Node.js 14.15.4 - name: Use Node.js 16.15.0
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: "14.15.4" node-version: "16.15.0"
# Here, the GITHUB_REF is of type /refs/head/<branch_name>. We extract branch_name from this by removing the # Here, the GITHUB_REF is of type /refs/head/<branch_name>. We extract branch_name from this by removing the
# first 11 characters. This can be used to build images for several branches # first 11 characters. This can be used to build images for several branches
@ -563,11 +563,11 @@ jobs:
-v "$PWD/stacks:/appsmith-stacks" -e APPSMITH_LICENSE_KEY=$APPSMITH_LICENSE_KEY \ -v "$PWD/stacks:/appsmith-stacks" -e APPSMITH_LICENSE_KEY=$APPSMITH_LICENSE_KEY \
fatcontainer fatcontainer
- name: Use Node.js 14.15.4 - name: Use Node.js 16.15.0
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: "14.15.4" node-version: "16.15.0"
# Install all the dependencies # Install all the dependencies
- name: Install dependencies - name: Install dependencies
@ -849,11 +849,11 @@ jobs:
- name: cat run_result - name: cat run_result
run: echo ${{ steps.run_result.outputs.run_result }} run: echo ${{ steps.run_result.outputs.run_result }}
- name: Use Node.js 14.15.4 - name: Use Node.js 16.15.0
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: "14.15.4" node-version: "16.15.0"
- name: Get yarn cache directory path - name: Get yarn cache directory path
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'
@ -1359,11 +1359,11 @@ jobs:
# Set status = success # Set status = success
- run: echo "::set-output name=run_result::success" > ~/run_result - run: echo "::set-output name=run_result::success" > ~/run_result
- name: Use Node.js 14.15.4 - name: Use Node.js 16.15.0
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: "14.15.4" node-version: "16.15.0"
- name: Get yarn cache directory path - name: Get yarn cache directory path
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'

View File

@ -72,11 +72,11 @@ jobs:
# Set status = success # Set status = success
- run: echo "::set-output name=run_result::success" > ~/run_result - run: echo "::set-output name=run_result::success" > ~/run_result
- name: Use Node.js 14.15.4 - name: Use Node.js 16.15.0
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: "14.15.4" node-version: "16.15.0"
- name: Get yarn cache directory path - name: Get yarn cache directory path
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'
@ -332,11 +332,11 @@ jobs:
- if: steps.run_result.outputs.run_result != 'success' - if: steps.run_result.outputs.run_result != 'success'
run: echo "I'm alive!" && exit 0 run: echo "I'm alive!" && exit 0
- name: Use Node.js 14.15.4 - name: Use Node.js 16.15.0
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: "14.15.4" node-version: "16.15.0"
# Here, the GITHUB_REF is of type /refs/head/<branch_name>. We extract branch_name from this by removing the # Here, the GITHUB_REF is of type /refs/head/<branch_name>. We extract branch_name from this by removing the
# first 11 characters. This can be used to build images for several branches # first 11 characters. This can be used to build images for several branches
@ -535,11 +535,11 @@ jobs:
docker run -d --name appsmith -p 80:80 -p 9001:9001 \ docker run -d --name appsmith -p 80:80 -p 9001:9001 \
-v "$PWD/stacks:/appsmith-stacks" fatcontainer -v "$PWD/stacks:/appsmith-stacks" fatcontainer
- name: Use Node.js 14.15.4 - name: Use Node.js 16.15.0
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: "14.15.4" node-version: "16.15.0"
# Install all the dependencies # Install all the dependencies
- name: Install dependencies - name: Install dependencies
@ -904,11 +904,11 @@ jobs:
exit 1 exit 1
fi fi
- name: Use Node.js 14.15.4 - name: Use Node.js 16.15.0
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: "14.15.4" node-version: "16.15.0"
- name: Get yarn cache directory path - name: Get yarn cache directory path
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'

View File

@ -81,11 +81,11 @@ jobs:
# Set status = success # Set status = success
- run: echo "::set-output name=run_result::success" > ~/run_result - run: echo "::set-output name=run_result::success" > ~/run_result
- name: Use Node.js 14.15.4 - name: Use Node.js 16.15.0
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: "14.15.4" node-version: "16.15.0"
- name: Get yarn cache directory path - name: Get yarn cache directory path
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'
@ -341,11 +341,11 @@ jobs:
- if: steps.run_result.outputs.run_result != 'success' - if: steps.run_result.outputs.run_result != 'success'
run: echo "I'm alive!" && exit 0 run: echo "I'm alive!" && exit 0
- name: Use Node.js 14.15.4 - name: Use Node.js 16.15.0
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: "14.15.4" node-version: "16.15.0"
# Here, the GITHUB_REF is of type /refs/head/<branch_name>. We extract branch_name from this by removing the # Here, the GITHUB_REF is of type /refs/head/<branch_name>. We extract branch_name from this by removing the
# first 11 characters. This can be used to build images for several branches # first 11 characters. This can be used to build images for several branches
@ -547,11 +547,11 @@ jobs:
-v "$PWD/stacks:/appsmith-stacks" -e APPSMITH_LICENSE_KEY=$APPSMITH_LICENSE_KEY \ -v "$PWD/stacks:/appsmith-stacks" -e APPSMITH_LICENSE_KEY=$APPSMITH_LICENSE_KEY \
fatcontainer fatcontainer
- name: Use Node.js 14.15.4 - name: Use Node.js 16.15.0
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: "14.15.4" node-version: "16.15.0"
# Install all the dependencies # Install all the dependencies
- name: Install dependencies - name: Install dependencies
@ -948,11 +948,11 @@ jobs:
exit 1 exit 1
fi fi
- name: Use Node.js 14.15.4 - name: Use Node.js 16.15.0
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: "14.15.4" node-version: "16.15.0"
- name: Get yarn cache directory path - name: Get yarn cache directory path
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'

View File

@ -1 +1 @@
lts/fermium lts/gallium

View File

@ -3,8 +3,8 @@
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"engines": { "engines": {
"node": "^14.15.4", "node": "^16.15.0",
"npm": "^6.14.10" "npm": "^8.5.5"
}, },
"cracoConfig": "craco.dev.config.js", "cracoConfig": "craco.dev.config.js",
"dependencies": { "dependencies": {

View File

@ -7,8 +7,8 @@
"license": "Apache-2.0", "license": "Apache-2.0",
"private": true, "private": true,
"engines": { "engines": {
"node": "^14.15.4", "node": "^16.15.0",
"npm": "^6.14.10" "npm": "^8.5.5"
}, },
"devDependencies": { "devDependencies": {
"@types/express": "^4.17.11", "@types/express": "^4.17.11",

View File

@ -2,10 +2,8 @@
Appsmith's client (UI/frontend) uses the ReactJS library and Typescript. The application also uses libraries like react-redux and redux-saga for workflows. We use VS Code Editor as our primary editor. Appsmith's client (UI/frontend) uses the ReactJS library and Typescript. The application also uses libraries like react-redux and redux-saga for workflows. We use VS Code Editor as our primary editor.
[![How to Setup Appsmith for Client Side Development](../static/images/client-yt-video-thumbnail.jpg)](https://www.youtube.com/watch?v=FwJlVWVx0X0) [![How to Setup Appsmith for Client Side Development](../static/images/client-yt-video-thumbnail.jpg)](https://www.youtube.com/watch?v=FwJlVWVx0X0)
### Pre-requisites: ### Pre-requisites:
On your development machine, please ensure that: On your development machine, please ensure that:
@ -13,16 +11,18 @@ On your development machine, please ensure that:
1. You have `docker` installed in your system. If not, please visit: [https://docs.docker.com/get-docker/](https://docs.docker.com/get-docker/) 1. You have `docker` installed in your system. If not, please visit: [https://docs.docker.com/get-docker/](https://docs.docker.com/get-docker/)
1. You have `mkcert` installed. Please visit: [https://github.com/FiloSottile/mkcert#installation](https://github.com/FiloSottile/mkcert#installation) for details. For `mkcert` to work with Firefox, you may need to install the `nss` utility. Details are in the link above. 1. You have `mkcert` installed. Please visit: [https://github.com/FiloSottile/mkcert#installation](https://github.com/FiloSottile/mkcert#installation) for details. For `mkcert` to work with Firefox, you may need to install the `nss` utility. Details are in the link above.
Note: Note:
- On Linux, you can easily install `mkcert` using the following command
``` - On Linux, you can easily install `mkcert` using the following command
curl -s https://api.github.com/repos/FiloSottile/mkcert/releases/latest \
| grep "browser_download_url.*linux-amd64" \ ```
| cut -d : -f 2,3 | tr -d \" \ curl -s https://api.github.com/repos/FiloSottile/mkcert/releases/latest \
| wget -i - -O mkcert | grep "browser_download_url.*linux-amd64" \
chmod +x mkcert | cut -d : -f 2,3 | tr -d \" \
sudo mv mkcert /usr/local/bin | wget -i - -O mkcert
``` chmod +x mkcert
sudo mv mkcert /usr/local/bin
```
1. You have `envsubst` installed. Use `brew install gettext` on MacOS. Linux machines usually have this installed. 1. You have `envsubst` installed. Use `brew install gettext` on MacOS. Linux machines usually have this installed.
1. You have cloned the repo in your local machine. 1. You have cloned the repo in your local machine.
@ -69,19 +69,19 @@ On your development machine, please ensure that:
1. Run `yarn install`. 1. Run `yarn install`.
Note: Note:
- On the Ubuntu Linux platform, please run the following cmd before step 2 below: - On the Ubuntu Linux platform, please run the following cmd before step 2 below:
``` ```
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
``` ```
2. Run `yarn start`. 2. Run `yarn start`.
🎉 Your Appsmith client is now running on https://dev.appsmith.com. 🎉 Your Appsmith client is now running on https://dev.appsmith.com.
This URL must be opened with https and not have port 3000 in it. This URL must be opened with https and not have port 3000 in it.
#### Note: #### Note:
@ -93,22 +93,22 @@ On your development machine, please ensure that:
This error occurs because the node version is not compatible with the app environment. In this case, Node version manager can be used, allowing multiple node versions in different projects. Check below for installation and usage details: This error occurs because the node version is not compatible with the app environment. In this case, Node version manager can be used, allowing multiple node versions in different projects. Check below for installation and usage details:
1. Install a node version manager. For eg: check [nvm](https://github.com/nvm-sh/nvm) or [fnm](https://github.com/Schniz/fnm). 1. Install a node version manager. For eg: check [nvm](https://github.com/nvm-sh/nvm) or [fnm](https://github.com/Schniz/fnm).
1. In the project's root, run `nvm use 14.15.4` or `fnm use 14.15.4`. 1. In the project's root, run `nvm use 16.15.0` or `fnm use 16.15.0`.
#### If you would like to hit a different Appsmith server: #### If you would like to hit a different Appsmith server:
- You can pass the server URL as an arg to the `start-https.sh` script. - You can pass the server URL as an arg to the `start-https.sh` script.
```bash ```bash
./start-https.sh https://release.app.appsmith.com ./start-https.sh https://release.app.appsmith.com
``` ```
- Run - Run
``` ```
yarn yarn
yarn start yarn start
``` ```
### Running Tests on Client ### Running Tests on Client
@ -122,6 +122,7 @@ This error occurs because the node version is not compatible with the app enviro
``` ```
1. run: 1. run:
```bash ```bash
cd app/client cd app/client
yarn run test yarn run test
@ -129,8 +130,8 @@ This error occurs because the node version is not compatible with the app enviro
Please check out our [Testing Contribution](docs/TestAutomation.md) guide for more details on setting up & troubleshooting Cypress runs on your machine. Please check out our [Testing Contribution](docs/TestAutomation.md) guide for more details on setting up & troubleshooting Cypress runs on your machine.
2. To run the Jest unit tests, run: 2. To run the Jest unit tests, run:
```bash ```bash
cd app/client cd app/client
yarn run test:unit yarn run test:unit
@ -147,6 +148,7 @@ Before you follow the instructions above, make sure to check the following steps
3. You have **Docker Desktop** installed with the WSL2 backend. If not, please visit: [https://docs.docker.com/docker-for-windows/wsl/](https://docs.docker.com/docker-for-windows/wsl/). 3. You have **Docker Desktop** installed with the WSL2 backend. If not, please visit: [https://docs.docker.com/docker-for-windows/wsl/](https://docs.docker.com/docker-for-windows/wsl/).
In the above [Docker Desktop Setup](https://docs.docker.com/docker-for-windows/wsl/) instructions, make sure to: In the above [Docker Desktop Setup](https://docs.docker.com/docker-for-windows/wsl/) instructions, make sure to:
1. Set WSL Distro to run in WSL2 mode. 1. Set WSL Distro to run in WSL2 mode.
2. Enable integration with the WSL Distro in Docker Desktop. 2. Enable integration with the WSL Distro in Docker Desktop.
3. Install [Remote-WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension in VSCode. 3. Install [Remote-WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension in VSCode.
@ -155,12 +157,12 @@ Make sure to Clone the Repo in the WSL file system instead of the Windows file s
And finally, you can open the folder in VSCode with WSL by following the instructions in [Docker Desktop Setup](https://docs.docker.com/docker-for-windows/wsl/), And finally, you can open the folder in VSCode with WSL by following the instructions in [Docker Desktop Setup](https://docs.docker.com/docker-for-windows/wsl/),
or by, or by,
1. Clicking on the Green button on the Bottom Left corner in VSCode. 1. Clicking on the Green button on the Bottom Left corner in VSCode.
2. Selecting **Open Folder in WSL** and navigating to the folder in WSL. 2. Selecting **Open Folder in WSL** and navigating to the folder in WSL.
After this, you can continue Setting up from [here](#pre-requisites). After this, you can continue Setting up from [here](#pre-requisites).
### Troubleshooting ### Troubleshooting
#### I am on WSL and can't reach dev.appsmith.com #### I am on WSL and can't reach dev.appsmith.com