From 149658e7434b074277d29ee9c385dfb04d8b8a2e Mon Sep 17 00:00:00 2001 From: Krishna Sundaresan Date: Thu, 12 Jun 2025 02:36:41 +0530 Subject: [PATCH 1/4] Override cheerio version --- .github/workflows/pr_e2e.yaml | 2 +- .github/workflows/pr_workflow.yaml | 2 +- .github/workflows/~reusable_e2e_by_OS.yaml | 2 +- .../workflows/~reusable_public_publish.yaml | 2 +- .github/workflows/~reusable_publish.yaml | 2 +- packages/plugin-flex/bin/preinstall | 21 +++++++++++++++++++ packages/plugin-flex/package.json | 1 + 7 files changed, 27 insertions(+), 5 deletions(-) create mode 100755 packages/plugin-flex/bin/preinstall diff --git a/.github/workflows/pr_e2e.yaml b/.github/workflows/pr_e2e.yaml index e4ee21ae1..a0a9018f0 100644 --- a/.github/workflows/pr_e2e.yaml +++ b/.github/workflows/pr_e2e.yaml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: - node-version: '22' + node-version: '18.17.0' - name: Extract branch name run: | echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" diff --git a/.github/workflows/pr_workflow.yaml b/.github/workflows/pr_workflow.yaml index 4ad6546d1..9ec11b7ed 100644 --- a/.github/workflows/pr_workflow.yaml +++ b/.github/workflows/pr_workflow.yaml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: - node-version: '22' + node-version: '18.17.0' - name: Install project dependencies run: | echo "Starting npm ci with a 10-minute timeout" diff --git a/.github/workflows/~reusable_e2e_by_OS.yaml b/.github/workflows/~reusable_e2e_by_OS.yaml index 4a062ce40..5cad863fd 100644 --- a/.github/workflows/~reusable_e2e_by_OS.yaml +++ b/.github/workflows/~reusable_e2e_by_OS.yaml @@ -96,7 +96,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: - node-version: '22' + node-version: '18.17.0' - name: Install project dependencies (Linux) if: ${{ inputs.OS == 'ubuntu-22.04' }} run: | diff --git a/.github/workflows/~reusable_public_publish.yaml b/.github/workflows/~reusable_public_publish.yaml index bb44b8f00..eeae53930 100644 --- a/.github/workflows/~reusable_public_publish.yaml +++ b/.github/workflows/~reusable_public_publish.yaml @@ -43,7 +43,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: - node-version: '22' + node-version: '18.17.0' registry-url: 'https://registry.npmjs.org' - name: Install dependencies run: | diff --git a/.github/workflows/~reusable_publish.yaml b/.github/workflows/~reusable_publish.yaml index 8ce1f3736..11700eca2 100644 --- a/.github/workflows/~reusable_publish.yaml +++ b/.github/workflows/~reusable_publish.yaml @@ -32,7 +32,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: - node-version: "22" + node-version: "18.17.0" registry-url: "https://registry.npmjs.org" - name: Install dependencies run: | diff --git a/packages/plugin-flex/bin/preinstall b/packages/plugin-flex/bin/preinstall new file mode 100755 index 000000000..4ce70aa11 --- /dev/null +++ b/packages/plugin-flex/bin/preinstall @@ -0,0 +1,21 @@ +#!/bin/bash + +set -e + +echo "Pre-installing cheerio version 1.0.0-rc.12 to avoid yarn issues with the latest version" +cat >> ~/.twilio-cli/yarn.lock << EOL + +cheerio@^1.0.0-rc.3: + version "1.0.0-rc.12" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.12.tgz#788bf7466506b1c6bf5fae51d24a2c4d62e47683" + integrity sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q== + dependencies: + cheerio-select "^2.1.0" + dom-serializer "^2.0.0" + domhandler "^5.0.3" + domutils "^3.0.1" + htmlparser2 "^8.0.1" + parse5 "^7.0.0" + parse5-htmlparser2-tree-adapter "^7.0.0" + +EOL diff --git a/packages/plugin-flex/package.json b/packages/plugin-flex/package.json index 8975b03d1..ee195baf1 100644 --- a/packages/plugin-flex/package.json +++ b/packages/plugin-flex/package.json @@ -30,6 +30,7 @@ "package.json" ], "scripts": { + "preinstall": "./bin/preinstall", "prebuild": "npm run clean", "build": "cd ../.. && tsc -p \"packages/plugin-flex/tsconfig.json\"", "clean": "rm -rf dist", From 8a2bf5cf8ea5011aabaa5b452158b815eb0a2543 Mon Sep 17 00:00:00 2001 From: sanand Date: Thu, 12 Jun 2025 02:55:01 +0530 Subject: [PATCH 2/4] add overides --- lerna.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lerna.json b/lerna.json index 633ada454..b2db51fcc 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,4 @@ { "packages": ["packages/*"], - "version": "7.1.1", - "useWorkspaces": true + "version": "7.1.1" } From 5061f4313a8e27ae88b7eb89a90d014f6ba5e4fa Mon Sep 17 00:00:00 2001 From: sanand Date: Thu, 12 Jun 2025 03:09:07 +0530 Subject: [PATCH 3/4] add overides --- packages/plugin-flex/bin/preinstall | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/plugin-flex/bin/preinstall b/packages/plugin-flex/bin/preinstall index 4ce70aa11..582e39b44 100755 --- a/packages/plugin-flex/bin/preinstall +++ b/packages/plugin-flex/bin/preinstall @@ -2,6 +2,7 @@ set -e +if [ -d ~/.twilio-cli ]; then echo "Pre-installing cheerio version 1.0.0-rc.12 to avoid yarn issues with the latest version" cat >> ~/.twilio-cli/yarn.lock << EOL @@ -19,3 +20,5 @@ cheerio@^1.0.0-rc.3: parse5-htmlparser2-tree-adapter "^7.0.0" EOL + +fi From 78e80cfce87f3a51cd0e626d20349a087e972200 Mon Sep 17 00:00:00 2001 From: sanand Date: Thu, 12 Jun 2025 03:20:07 +0530 Subject: [PATCH 4/4] add overides --- lerna.json | 3 ++- package.json | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lerna.json b/lerna.json index b2db51fcc..633ada454 100644 --- a/lerna.json +++ b/lerna.json @@ -1,4 +1,5 @@ { "packages": ["packages/*"], - "version": "7.1.1" + "version": "7.1.1", + "useWorkspaces": true } diff --git a/package.json b/package.json index 383665aae..c97863c90 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,6 @@ "docs": "./bin/docs-generator.js", "lint": "lerna run lint", "lint:fix": "lerna run lint:fix", - "preinstall": "npm install npm-force-resolutions --location=global", "postbootstrap": "npm run build", "postinstall": "npm run bootstrap", "prepare": "husky install", @@ -59,7 +58,6 @@ "lerna": "^5.6.2", "lerna-audit": "^1.3.3", "markdown-toc": "^1.2.0", - "npm-force-resolutions": "^0.0.10", "nyc": "^15.1.0", "ts-jest": "^27.0.0", "typescript": "4.3.5",