diff --git a/.github/workflows/TestReuseActions.yml b/.github/workflows/TestReuseActions.yml index 91552700ea..9eb70ae1c6 100644 --- a/.github/workflows/TestReuseActions.yml +++ b/.github/workflows/TestReuseActions.yml @@ -75,11 +75,11 @@ jobs: fetch-depth: 0 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' uses: actions/setup-node@v1 with: - node-version: "14.15.4" + node-version: "16.15.0" - name: Get yarn cache directory path if: steps.run_result.outputs.run_result != 'success' @@ -340,11 +340,11 @@ jobs: - if: steps.run_result.outputs.run_result != 'success' 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' uses: actions/setup-node@v1 with: - node-version: "14.15.4" + node-version: "16.15.0" # Here, the GITHUB_REF is of type /refs/head/. We extract branch_name from this by removing the # first 11 characters. This can be used to build images for several branches @@ -581,11 +581,11 @@ jobs: exit 1 fi - - name: Use Node.js 14.15.4 + - name: Use Node.js 16.15.0 if: steps.run_result.outputs.run_result != 'success' uses: actions/setup-node@v1 with: - node-version: "14.15.4" + node-version: "16.15.0" - name: Get yarn cache directory path if: steps.run_result.outputs.run_result != 'success' diff --git a/.github/workflows/build-rts.yml b/.github/workflows/build-rts.yml index 511c8a182f..474017cfa6 100644 --- a/.github/workflows/build-rts.yml +++ b/.github/workflows/build-rts.yml @@ -36,10 +36,10 @@ jobs: with: fetch-depth: 0 - - name: Use Node.js 14.15.4 + - name: Use Node.js 16.15.0 uses: actions/setup-node@v1 with: - node-version: "14.15.4" + node-version: "16.15.0" # Here, the GITHUB_REF is of type /refs/head/. We extract branch_name from this by removing the # first 11 characters. This can be used to build images for several branches diff --git a/.github/workflows/client-build.yml b/.github/workflows/client-build.yml index f3d67d66b5..1c2bd80da3 100644 --- a/.github/workflows/client-build.yml +++ b/.github/workflows/client-build.yml @@ -53,10 +53,10 @@ jobs: - name: Figure out the PR 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 with: - node-version: "14.15.4" + node-version: "16.15.0" - name: Get yarn cache directory path id: yarn-dep-cache-dir-path diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 4c2b9c13da..7c7f41e4c5 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -57,10 +57,10 @@ jobs: with: fetch-depth: 0 - - name: Use Node.js 14.15.4 + - name: Use Node.js 16.15.0 uses: actions/setup-node@v1 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 - name: Cache npm dependencies @@ -161,10 +161,10 @@ jobs: with: fetch-depth: 0 - - name: Use Node.js 14.15.4 + - name: Use Node.js 16.15.0 uses: actions/setup-node@v1 with: - node-version: "14.15.4" + node-version: "16.15.0" - name: Build run: | diff --git a/.github/workflows/integration-tests-command.yml b/.github/workflows/integration-tests-command.yml index fd93daa984..511ab7a760 100644 --- a/.github/workflows/integration-tests-command.yml +++ b/.github/workflows/integration-tests-command.yml @@ -186,11 +186,11 @@ jobs: Commit: `${{ github.event.client_payload.slash_command.sha }}`. 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' uses: actions/setup-node@v1 with: - node-version: "14.15.4" + node-version: "16.15.0" - name: Get yarn cache directory path if: steps.run_result.outputs.run_result != 'success' @@ -370,11 +370,11 @@ jobs: - if: steps.run_result.outputs.run_result != 'success' 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' uses: actions/setup-node@v1 with: - node-version: "14.15.4" + node-version: "16.15.0" # Here, the GITHUB_REF is of type /refs/head/. We extract branch_name from this by removing the # 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 \ fatcontainer - - name: Use Node.js 14.15.4 + - name: Use Node.js 16.15.0 if: steps.run_result.outputs.run_result != 'success' uses: actions/setup-node@v1 with: - node-version: "14.15.4" + node-version: "16.15.0" # Install all the dependencies - name: Install dependencies @@ -849,11 +849,11 @@ jobs: - name: cat 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' uses: actions/setup-node@v1 with: - node-version: "14.15.4" + node-version: "16.15.0" - name: Get yarn cache directory path if: steps.run_result.outputs.run_result != 'success' @@ -1359,11 +1359,11 @@ jobs: # Set status = success - 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' uses: actions/setup-node@v1 with: - node-version: "14.15.4" + node-version: "16.15.0" - name: Get yarn cache directory path if: steps.run_result.outputs.run_result != 'success' diff --git a/.github/workflows/test-build-docker-image-fat.yml b/.github/workflows/test-build-docker-image-fat.yml index 737c8d5f60..2ef62a5dbd 100644 --- a/.github/workflows/test-build-docker-image-fat.yml +++ b/.github/workflows/test-build-docker-image-fat.yml @@ -72,11 +72,11 @@ jobs: # Set status = success - 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' uses: actions/setup-node@v1 with: - node-version: "14.15.4" + node-version: "16.15.0" - name: Get yarn cache directory path if: steps.run_result.outputs.run_result != 'success' @@ -332,11 +332,11 @@ jobs: - if: steps.run_result.outputs.run_result != 'success' 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' uses: actions/setup-node@v1 with: - node-version: "14.15.4" + node-version: "16.15.0" # Here, the GITHUB_REF is of type /refs/head/. We extract branch_name from this by removing the # 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 \ -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' uses: actions/setup-node@v1 with: - node-version: "14.15.4" + node-version: "16.15.0" # Install all the dependencies - name: Install dependencies @@ -904,11 +904,11 @@ jobs: exit 1 fi - - name: Use Node.js 14.15.4 + - name: Use Node.js 16.15.0 if: steps.run_result.outputs.run_result != 'success' uses: actions/setup-node@v1 with: - node-version: "14.15.4" + node-version: "16.15.0" - name: Get yarn cache directory path if: steps.run_result.outputs.run_result != 'success' diff --git a/.github/workflows/test-build-docker-image.yml b/.github/workflows/test-build-docker-image.yml index 29f60132b4..4868ccf7ce 100644 --- a/.github/workflows/test-build-docker-image.yml +++ b/.github/workflows/test-build-docker-image.yml @@ -81,11 +81,11 @@ jobs: # Set status = success - 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' uses: actions/setup-node@v1 with: - node-version: "14.15.4" + node-version: "16.15.0" - name: Get yarn cache directory path if: steps.run_result.outputs.run_result != 'success' @@ -341,11 +341,11 @@ jobs: - if: steps.run_result.outputs.run_result != 'success' 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' uses: actions/setup-node@v1 with: - node-version: "14.15.4" + node-version: "16.15.0" # Here, the GITHUB_REF is of type /refs/head/. We extract branch_name from this by removing the # 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 \ fatcontainer - - name: Use Node.js 14.15.4 + - name: Use Node.js 16.15.0 if: steps.run_result.outputs.run_result != 'success' uses: actions/setup-node@v1 with: - node-version: "14.15.4" + node-version: "16.15.0" # Install all the dependencies - name: Install dependencies @@ -948,11 +948,11 @@ jobs: exit 1 fi - - name: Use Node.js 14.15.4 + - name: Use Node.js 16.15.0 if: steps.run_result.outputs.run_result != 'success' uses: actions/setup-node@v1 with: - node-version: "14.15.4" + node-version: "16.15.0" - name: Get yarn cache directory path if: steps.run_result.outputs.run_result != 'success' diff --git a/app/client/.nvmrc b/app/client/.nvmrc index 518633e168..53d838af21 100644 --- a/app/client/.nvmrc +++ b/app/client/.nvmrc @@ -1 +1 @@ -lts/fermium +lts/gallium diff --git a/app/client/package.json b/app/client/package.json index c2a34709c5..b4b35c45df 100644 --- a/app/client/package.json +++ b/app/client/package.json @@ -3,8 +3,8 @@ "version": "0.1.0", "private": true, "engines": { - "node": "^14.15.4", - "npm": "^6.14.10" + "node": "^16.15.0", + "npm": "^8.5.5" }, "cracoConfig": "craco.dev.config.js", "dependencies": { diff --git a/app/rts/package.json b/app/rts/package.json index 825d7c63e5..d90b731fdc 100644 --- a/app/rts/package.json +++ b/app/rts/package.json @@ -7,8 +7,8 @@ "license": "Apache-2.0", "private": true, "engines": { - "node": "^14.15.4", - "npm": "^6.14.10" + "node": "^16.15.0", + "npm": "^8.5.5" }, "devDependencies": { "@types/express": "^4.17.11", diff --git a/contributions/ClientSetup.md b/contributions/ClientSetup.md index 1c91774c9a..97456af954 100644 --- a/contributions/ClientSetup.md +++ b/contributions/ClientSetup.md @@ -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. - [![How to Setup Appsmith for Client Side Development](../static/images/client-yt-video-thumbnail.jpg)](https://www.youtube.com/watch?v=FwJlVWVx0X0) - ### Pre-requisites: 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 `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: - - 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 \" \ - | wget -i - -O mkcert - chmod +x mkcert - sudo mv mkcert /usr/local/bin - ``` +Note: + +- 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 \" \ +| 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 cloned the repo in your local machine. @@ -69,19 +69,19 @@ On your development machine, please ensure that: 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`. - 🎉 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: @@ -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: 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: - You can pass the server URL as an arg to the `start-https.sh` script. - ```bash - ./start-https.sh https://release.app.appsmith.com - ``` + ```bash + ./start-https.sh https://release.app.appsmith.com + ``` - Run - ``` - yarn - yarn start - ``` + ``` + yarn + yarn start + ``` ### Running Tests on Client @@ -122,6 +122,7 @@ This error occurs because the node version is not compatible with the app enviro ``` 1. run: + ```bash cd app/client 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. - 2. To run the Jest unit tests, run: + ```bash cd app/client 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/). 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. 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. @@ -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/), or by, + 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. After this, you can continue Setting up from [here](#pre-requisites). - ### Troubleshooting #### I am on WSL and can't reach dev.appsmith.com