From 5511234eb30864ab4a34936eae9708212f600c07 Mon Sep 17 00:00:00 2001 From: Allon Mureinik Date: Tue, 14 Jul 2026 11:47:08 +0300 Subject: [PATCH] Clean up yargs override Follow up on 59a1c9aeb1d93a69201c6a6c43beb60c40eeeafa. Using `yargs@16.6.2` allows us to use a unified `yargs` version for all supproted Node.js versions instead of having a workaround for Node.js 26 (and newer). See https://github.com/yargs/yargs/pull/2514 for details on the `yargs` fix. This approach has two advantages: - It simplifies the build process by having a unified approach for every Node.js version - It (moderately) speeds up the Node.js 26 CI, as it can now use a straightforward `npm ci`, and no longer needs to perform package resolution with `npm install`. Related to #132 --- .github/workflows/ci.yaml | 5 ---- package-lock.json | 62 +++++++++++++++++++-------------------- package.json | 3 ++ 3 files changed, 34 insertions(+), 36 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a2decb2..5bc49cc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -30,11 +30,6 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - - name: Override yargs for Node.js 26 - if: ${{ matrix.node-version == '26.x' }} - run: | - npm pkg set overrides.yargs=18.0.0 - npm install - run: npm ci - run: npm run build --if-present - run: PGTESTNOSSL=true PGUSER=postgres PGHOST=localhost PGPASSWORD=postgres PGDATABASE=ci_db_test npm test diff --git a/package-lock.json b/package-lock.json index 1ced1b8..a947cf7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "libpq", - "version": "1.10.0", + "version": "1.11.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "libpq", - "version": "1.10.0", + "version": "1.11.0", "license": "MIT", "dependencies": { "bindings": "1.5.0", @@ -209,17 +209,6 @@ "fsevents": "~2.3.2" } }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -615,6 +604,35 @@ "node": ">= 14.0.0" } }, + "node_modules/mocha/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/mocha/node_modules/yargs": { + "version": "16.2.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.2.tgz", + "integrity": "sha512-Nt9ZJjXTv5R8MHbqby/wXQ6Gi0Bb3TcYZkR1bzuL4yB2OxWPkXknz513gEF0GoA6tn00UpbPvERW8rzCuWCA6w==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -878,24 +896,6 @@ "node": ">=10" } }, - "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/yargs-parser": { "version": "20.2.9", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", diff --git a/package.json b/package.json index dfcf7e6..cbb09bd 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,9 @@ "mocha": "^10.8.2", "okay": "^1.0.0" }, + "overrides": { + "yargs": "16.2.2" + }, "prettier": { "singleQuote": true }