diff --git a/.github/workflows/appsmithctl.yml b/.github/workflows/appsmithctl.yml index 35797511dd..5270ff0f6b 100644 --- a/.github/workflows/appsmithctl.yml +++ b/.github/workflows/appsmithctl.yml @@ -74,11 +74,11 @@ jobs: - if: steps.appsmithctl_run_result.outputs.appsmithctl_run_result != 'success' run: echo "I'm alive!" && exit 0 - - name: Use Node.js 16.14.0 + - name: Use Node.js if: steps.appsmithctl_run_result.outputs.appsmithctl_run_result != 'success' uses: actions/setup-node@v3 with: - node-version: "16.14.0" + node-version-file: app/client/package.json # Install all the dependencies - name: Install dependencies diff --git a/.github/workflows/build-chromatic.yml b/.github/workflows/build-chromatic.yml index 952ef7be4c..93f5f2bc1a 100644 --- a/.github/workflows/build-chromatic.yml +++ b/.github/workflows/build-chromatic.yml @@ -31,10 +31,10 @@ jobs: fetch-depth: 0 ref: release - - name: Use Node.js 16.14.0 + - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: "16.14.0" + node-version-file: app/client/package.json - name: Install Dependencies working-directory: ./app/client/packages/storybook diff --git a/.github/workflows/build-storybook.yml b/.github/workflows/build-storybook.yml index eeb1f1fdfa..b492b28f16 100644 --- a/.github/workflows/build-storybook.yml +++ b/.github/workflows/build-storybook.yml @@ -31,10 +31,10 @@ jobs: fetch-depth: 0 ref: release - - name: Use Node.js 16.14.0 + - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: "16.14.0" + node-version-file: app/client/package.json - name: Install Dependencies working-directory: ./app/client/packages/storybook diff --git a/.github/workflows/ci-sanity.yml b/.github/workflows/ci-sanity.yml index 82b193b9c1..41ed300726 100644 --- a/.github/workflows/ci-sanity.yml +++ b/.github/workflows/ci-sanity.yml @@ -161,11 +161,11 @@ jobs: # docker cp init-mssql-dump-for-test.sql mssqldb:var/init-mssql-dump-for-test.sql # docker exec -i mssqldb /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P Root@123 -i /var/init-mssql-dump-for-test.sql - - name: Use Node.js 16.14.0 + - name: Use Node.js if: steps.run_result.outputs.run_result != 'success' uses: actions/setup-node@v3 with: - node-version: "16.14.0" + node-version-file: app/client/package.json # Install all the dependencies - name: Install dependencies diff --git a/.github/workflows/ci-smoke.yml b/.github/workflows/ci-smoke.yml index b9bc5f2a65..5e57c8f5aa 100644 --- a/.github/workflows/ci-smoke.yml +++ b/.github/workflows/ci-smoke.yml @@ -161,11 +161,11 @@ jobs: # docker cp init-mssql-dump-for-test.sql mssqldb:var/init-mssql-dump-for-test.sql # docker exec -i mssqldb /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P Root@123 -i /var/init-mssql-dump-for-test.sql - - name: Use Node.js 16.14.0 + - name: Use Node.js if: steps.run_result.outputs.run_result != 'success' uses: actions/setup-node@v3 with: - node-version: "16.14.0" + node-version-file: app/client/package.json # Install all the dependencies - name: Install dependencies diff --git a/.github/workflows/ci-test-custom-script.yml b/.github/workflows/ci-test-custom-script.yml index cb6adc6da3..aaa0202152 100644 --- a/.github/workflows/ci-test-custom-script.yml +++ b/.github/workflows/ci-test-custom-script.yml @@ -157,11 +157,11 @@ jobs: --add-host=host.docker.internal:host-gateway --add-host=api.segment.io:host-gateway --add-host=t.appsmith.com:host-gateway \ cicontainer - - name: Use Node.js 16.14.0 + - name: Use Node.js if: steps.run_result.outputs.run_result != 'success' uses: actions/setup-node@v3 with: - node-version: "16.14.0" + node-version-file: app/client/package.json # actions/setup-node@v3 doesn’t work properly with Yarn 3 # when the project lives in a subdirectory: https://github.com/actions/setup-node/issues/488 diff --git a/.github/workflows/ci-test-hosted.yml b/.github/workflows/ci-test-hosted.yml index 6028cbd242..47d4008ba3 100644 --- a/.github/workflows/ci-test-hosted.yml +++ b/.github/workflows/ci-test-hosted.yml @@ -125,11 +125,11 @@ jobs: - name: cat run_result run: echo ${{ steps.run_result.outputs.run_result }} - - name: Use Node.js 16.14.0 + - name: Use Node.js if: steps.run_result.outputs.run_result != 'success' uses: actions/setup-node@v3 with: - node-version: "16.14.0" + node-version-file: app/client/package.json # actions/setup-node@v3 doesn’t work properly with Yarn 3 # when the project lives in a subdirectory: https://github.com/actions/setup-node/issues/488 diff --git a/.github/workflows/ci-test-limited.yml b/.github/workflows/ci-test-limited.yml index 13e2834d62..2aa91fd507 100644 --- a/.github/workflows/ci-test-limited.yml +++ b/.github/workflows/ci-test-limited.yml @@ -176,10 +176,10 @@ jobs: --add-host=host.docker.internal:host-gateway --add-host=api.segment.io:host-gateway --add-host=t.appsmith.com:host-gateway \ cicontainer - - name: Use Node.js 16.14.0 + - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: "16.14.0" + node-version-file: app/client/package.json # actions/setup-node@v3 doesn’t work properly with Yarn 3 # when the project lives in a subdirectory: https://github.com/actions/setup-node/issues/488 diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 55126af6d6..a15128b10e 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -190,11 +190,11 @@ jobs: --add-host=host.docker.internal:host-gateway --add-host=api.segment.io:host-gateway --add-host=t.appsmith.com:host-gateway \ cicontainer - - name: Use Node.js 16.14.0 + - name: Use Node.js if: steps.run_result.outputs.run_result != 'success' uses: actions/setup-node@v3 with: - node-version: "16.14.0" + node-version-file: app/client/package.json # actions/setup-node@v3 doesn’t work properly with Yarn 3 # when the project lives in a subdirectory: https://github.com/actions/setup-node/issues/488 diff --git a/.github/workflows/client-build.yml b/.github/workflows/client-build.yml index 02914cf982..9c444f4191 100644 --- a/.github/workflows/client-build.yml +++ b/.github/workflows/client-build.yml @@ -134,11 +134,11 @@ jobs: - if: steps.run_result.outputs.run_result != 'success' run: echo "I'm alive!" && exit 0 - - name: Use Node.js 16.14.0 + - name: Use Node.js if: steps.run_result.outputs.run_result != 'success' uses: actions/setup-node@v3 with: - node-version: "16.14.0" + node-version-file: app/client/package.json # actions/setup-node@v3 doesn’t work properly with Yarn 3 # when the project lives in a subdirectory: https://github.com/actions/setup-node/issues/488 diff --git a/.github/workflows/client-lint.yml b/.github/workflows/client-lint.yml index a8fb261db5..2aca7cdfbf 100644 --- a/.github/workflows/client-lint.yml +++ b/.github/workflows/client-lint.yml @@ -55,11 +55,11 @@ jobs: - if: steps.run_result.outputs.run_result != 'success' run: echo "I'm alive!" && exit 0 - - name: Use Node.js 16.14.0 + - name: Use Node.js if: steps.run_result.outputs.run_result != 'success' uses: actions/setup-node@v3 with: - node-version: "16.14.0" + node-version-file: app/client/package.json # actions/setup-node@v3 doesn’t work properly with Yarn 3 # when the project lives in a subdirectory: https://github.com/actions/setup-node/issues/488 diff --git a/.github/workflows/client-prettier.yml b/.github/workflows/client-prettier.yml index f6fa9d01b0..1496b0ff2b 100644 --- a/.github/workflows/client-prettier.yml +++ b/.github/workflows/client-prettier.yml @@ -45,11 +45,11 @@ jobs: - if: steps.run_result.outputs.run_result != 'success' run: echo "I'm alive!" && exit 0 - - name: Use Node.js 16.14.0 + - name: Use Node.js if: steps.run_result.outputs.run_result != 'success' uses: actions/setup-node@v3 with: - node-version: "16.14.0" + node-version-file: app/client/package.json # actions/setup-node@v3 doesn’t work properly with Yarn 3 # when the project lives in a subdirectory: https://github.com/actions/setup-node/issues/488 diff --git a/.github/workflows/client-unit-tests.yml b/.github/workflows/client-unit-tests.yml index b92ea2d7d0..ed5291d677 100644 --- a/.github/workflows/client-unit-tests.yml +++ b/.github/workflows/client-unit-tests.yml @@ -55,11 +55,11 @@ jobs: - if: steps.run_result.outputs.run_result != 'success' run: echo "I'm alive!" && exit 0 - - name: Use Node.js 16.14.0 + - name: Use Node.js if: steps.run_result.outputs.run_result != 'success' uses: actions/setup-node@v3 with: - node-version: "16.14.0" + node-version-file: app/client/package.json # actions/setup-node@v3 doesn’t work properly with Yarn 3 # when the project lives in a subdirectory: https://github.com/actions/setup-node/issues/488 diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 49d2d7b121..ba7f2c4480 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 16.14.0 + - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: "16.14.0" + node-version-file: app/client/package.json # Retrieve npm dependencies from cache. After a successful run, these dependencies are cached again - name: Cache npm dependencies @@ -167,10 +167,10 @@ jobs: with: fetch-depth: 0 - - name: Use Node.js 16.14.0 + - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: "16.14.0" + node-version-file: app/client/package.json # actions/setup-node@v3 doesn’t work properly with Yarn 3 # when the project lives in a subdirectory: https://github.com/actions/setup-node/issues/488 diff --git a/.github/workflows/on-demand-build-docker-image-deploy-preview.yml b/.github/workflows/on-demand-build-docker-image-deploy-preview.yml index 9c643387be..b77f6e735d 100644 --- a/.github/workflows/on-demand-build-docker-image-deploy-preview.yml +++ b/.github/workflows/on-demand-build-docker-image-deploy-preview.yml @@ -65,11 +65,11 @@ jobs: - name: Install Vercel CLI run: npm install --global vercel@latest - - name: Use Node.js 16.14.0 + - name: Use Node.js if: steps.run_result.outputs.run_result != 'success' uses: actions/setup-node@v3 with: - node-version: "16.14.0" + node-version-file: app/client/package.json # actions/setup-node@v3 doesn’t work properly with Yarn 3 # when the project lives in a subdirectory: https://github.com/actions/setup-node/issues/488 diff --git a/.github/workflows/perf-test-v2.yml b/.github/workflows/perf-test-v2.yml index a602f289ff..dc5155b511 100644 --- a/.github/workflows/perf-test-v2.yml +++ b/.github/workflows/perf-test-v2.yml @@ -98,7 +98,7 @@ jobs: if: steps.run_result.outputs.run_result != 'success' uses: actions/setup-node@v3 with: - node-version: "16.14.0" + node-version-file: app/client/package.json - name: Download Docker image artifact uses: actions/download-artifact@v3 diff --git a/.github/workflows/perf-test.yml b/.github/workflows/perf-test.yml index b2fe7e560a..f9d4730ad3 100644 --- a/.github/workflows/perf-test.yml +++ b/.github/workflows/perf-test.yml @@ -98,7 +98,7 @@ jobs: if: steps.run_result.outputs.run_result != 'success' uses: actions/setup-node@v3 with: - node-version: "16.14.0" + node-version-file: app/client/package.json - name: Download Docker image artifact uses: actions/download-artifact@v3 diff --git a/.github/workflows/rts-build.yml b/.github/workflows/rts-build.yml index c2c82c2499..8c8c3f8081 100644 --- a/.github/workflows/rts-build.yml +++ b/.github/workflows/rts-build.yml @@ -89,11 +89,11 @@ jobs: - if: steps.run_result.outputs.run_result != 'success' run: echo "I'm alive!" && exit 0 - - name: Use Node.js 16.14.0 + - name: Use Node.js if: steps.run_result.outputs.run_result != 'success' uses: actions/setup-node@v3 with: - node-version: "16.14.0" + node-version-file: app/client/package.json # actions/setup-node@v3 doesn’t work properly with Yarn 3 # when the project lives in a subdirectory: https://github.com/actions/setup-node/issues/488 diff --git a/app/client/.nvmrc b/app/client/.nvmrc index 53d838af21..a77793ecc5 100644 --- a/app/client/.nvmrc +++ b/app/client/.nvmrc @@ -1 +1 @@ -lts/gallium +lts/hydrogen diff --git a/app/client/.yarn/plugins/@yarnpkg/plugin-engines.cjs b/app/client/.yarn/plugins/@yarnpkg/plugin-engines.cjs new file mode 100644 index 0000000000..f88ad2b43f --- /dev/null +++ b/app/client/.yarn/plugins/@yarnpkg/plugin-engines.cjs @@ -0,0 +1,9 @@ +/* eslint-disable */ +//prettier-ignore +module.exports = { +name: "@yarnpkg/plugin-engines", +factory: function (require) { +var plugin=(()=>{var P=Object.create,f=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var b=n=>f(n,"__esModule",{value:!0});var i=n=>{if(typeof require!="undefined")return require(n);throw new Error('Dynamic require of "'+n+'" is not supported')};var T=(n,e)=>{for(var r in e)f(n,r,{get:e[r],enumerable:!0})},V=(n,e,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of N(e))!Y.call(n,t)&&t!=="default"&&f(n,t,{get:()=>e[t],enumerable:!(r=R(e,t))||r.enumerable});return n},s=n=>V(b(f(n!=null?P(j(n)):{},"default",n&&n.__esModule&&"default"in n?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n);var U={};T(U,{default:()=>q});var o=s(i("@yarnpkg/core")),c;(function(r){r.Yarn="Yarn",r.Console="Console"})(c||(c={}));var h=class{constructor(e){this.throwWrongEngineError=(e,r)=>{let t=this.formatErrorMessage(e,r);this.throwError(t)};this.throwError=e=>{switch(this.errorReporter){case c.Yarn:this.reportYarnError(e);break;case c.Console:default:this.reportConsoleError(e);break}};this.reportYarnError=e=>{throw new o.ReportError(o.MessageName.UNNAMED,e)};this.reportConsoleError=e=>{console.error(e),process.exit(1)};this.formatErrorMessage=(e,r)=>{let{configuration:t}=this.project,p=o.formatUtils.applyStyle(t,o.formatUtils.pretty(t,this.engine,"green"),2),g=o.formatUtils.pretty(t,e,"cyan"),d=o.formatUtils.pretty(t,r,"cyan"),w=`The current ${p} version ${g} does not satisfy the required version ${d}.`;return o.formatUtils.pretty(t,w,"red")};this.project=e.project,this.errorReporter=e.errorReporter}};var m=s(i("fs")),y=s(i("path")),l=s(i("semver")),k=s(i("@yarnpkg/fslib")),a=s(i("@yarnpkg/core"));var v=class extends h{constructor(){super(...arguments);this.resolveNvmRequiredVersion=()=>{let{configuration:e,cwd:r}=this.project,t=(0,y.resolve)(k.npath.fromPortablePath(r),".nvmrc"),p=a.formatUtils.applyStyle(e,a.formatUtils.pretty(e,this.engine,"green"),2);if(!(0,m.existsSync)(t)){this.throwError(a.formatUtils.pretty(e,`Unable to verify the ${p} version. The .nvmrc file does not exist.`,"red"));return}let g=(0,m.readFileSync)(t,"utf-8").trim();if((0,l.validRange)(g))return g;let d=a.formatUtils.pretty(e,".nvmrc","yellow");this.throwError(a.formatUtils.pretty(e,`Unable to verify the ${p} version. The ${d} file contains an invalid semver range.`,"red"))}}get engine(){return"Node"}verifyEngine(e){let r=e.node;r!=null&&(r===".nvmrc"&&(r=this.resolveNvmRequiredVersion()),(0,l.satisfies)(process.version,r,{includePrerelease:!0})||this.throwWrongEngineError(process.version.replace(/^v/i,""),r.replace(/^v/i,"")))}};var x=s(i("semver")),E=s(i("@yarnpkg/core"));var u=class extends h{get engine(){return"Yarn"}verifyEngine(e){let r=e.yarn;r!=null&&((0,x.satisfies)(E.YarnVersion,r,{includePrerelease:!0})||this.throwWrongEngineError(E.YarnVersion,r))}};var C=n=>e=>{if(process.env.PLUGIN_YARN_ENGINES_DISABLE!=null)return;let{engines:r={}}=e.getWorkspaceByCwd(e.cwd).manifest.raw,t={project:e,errorReporter:n};[new v(t),new u(t)].forEach(g=>g.verifyEngine(r))},S={hooks:{validateProject:C(c.Yarn),setupScriptEnvironment:C(c.Console)}},q=S;return U;})(); +return plugin; +} +}; diff --git a/app/client/.yarnrc.yml b/app/client/.yarnrc.yml index d0bf3fe62e..9e670ab951 100644 --- a/app/client/.yarnrc.yml +++ b/app/client/.yarnrc.yml @@ -5,5 +5,7 @@ plugins: spec: "https://raw.githubusercontent.com/ambar/yarn-plugin-dedupe-on-install/main/index.js" - path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs spec: "@yarnpkg/plugin-workspace-tools" + - path: .yarn/plugins/@yarnpkg/plugin-engines.cjs + spec: "https://raw.githubusercontent.com/devoto13/yarn-plugin-engines/main/bundles/%40yarnpkg/plugin-engines.js" yarnPath: .yarn/releases/yarn-3.5.1.cjs diff --git a/app/client/cypress/package.json b/app/client/cypress/package.json index e5d68d6e4e..b72497d173 100644 --- a/app/client/cypress/package.json +++ b/app/client/cypress/package.json @@ -3,8 +3,8 @@ "version": "0.1.0", "private": true, "engines": { - "node": "^16.14.0", - "npm": "^8.5.5" + "node": "^18.17.1", + "yarn": "^3.5.1" }, "scripts": { "install": "node apply-patches.js" diff --git a/app/client/package.json b/app/client/package.json index 8b0d164bdb..5f15503825 100644 --- a/app/client/package.json +++ b/app/client/package.json @@ -6,7 +6,7 @@ "./lib/*": "./lib/*.js" }, "engines": { - "node": "^16.14.0", + "node": "^18.17.1", "yarn": "^3.5.1" }, "packageManager": "yarn@3.5.1", diff --git a/contributions/ClientSetup.md b/contributions/ClientSetup.md index dc5707ad86..e39b0b78d1 100644 --- a/contributions/ClientSetup.md +++ b/contributions/ClientSetup.md @@ -90,7 +90,7 @@ On your development machine, please ensure that: - 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 16.14.0` or `fnm use 16.14.0`. + 1. In the project's root, run `nvm use 18.17.1` or `fnm use 18.17.1`. ### Running Tests on Client