fix(appium): update dependency @sidvind/better-ajv-errors to v3 (#20552)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mykola Mokhnach <mokhnach@gmail.com>
This commit is contained in:
renovate[bot]
2024-09-09 21:15:16 +02:00
committed by GitHub
parent 3d674d0085
commit 0ee7716cf0
6 changed files with 35 additions and 127 deletions

135
package-lock.json generated
View File

@@ -2502,74 +2502,18 @@
"license": "MIT"
},
"node_modules/@sidvind/better-ajv-errors": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/@sidvind/better-ajv-errors/-/better-ajv-errors-2.1.3.tgz",
"integrity": "sha512-lWuod/rh7Xz5uXiEGSfm2Sd5PG7K/6yJfoAZVqzsEswjPJhUz15R7Gn/o8RczA041QS15hBd/BCSeu9vwPArkA==",
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@sidvind/better-ajv-errors/-/better-ajv-errors-3.0.1.tgz",
"integrity": "sha512-++1mEYIeozfnwWI9P1ECvOPoacy+CgDASrmGvXPMCcqgx0YUzB01vZ78uHdQ443V6sTY+e9MzHqmN9DOls02aw==",
"license": "Apache-2.0",
"dependencies": {
"@babel/code-frame": "^7.16.0",
"chalk": "^4.1.0"
"kleur": "^4.1.0"
},
"engines": {
"node": ">= 16.14"
},
"peerDependencies": {
"ajv": "4.11.8 - 8"
}
},
"node_modules/@sidvind/better-ajv-errors/node_modules/ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dependencies": {
"color-convert": "^2.0.1"
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
"node_modules/@sidvind/better-ajv-errors/node_modules/chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/@sidvind/better-ajv-errors/node_modules/color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dependencies": {
"color-name": "~1.1.4"
},
"engines": {
"node": ">=7.0.0"
}
},
"node_modules/@sidvind/better-ajv-errors/node_modules/color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
},
"node_modules/@sidvind/better-ajv-errors/node_modules/supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dependencies": {
"has-flag": "^4.0.0"
},
"engines": {
"node": ">=8"
"ajv": "^6.12.3 || ^7.0.0 || ^8.0.0"
}
},
"node_modules/@sigstore/bundle": {
@@ -11164,6 +11108,15 @@
"node": ">=14.14.0"
}
},
"node_modules/kleur": {
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz",
"integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==",
"license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/kuler": {
"version": "2.0.0",
"license": "MIT"
@@ -19282,7 +19235,7 @@
"@appium/schema": "^0.6.1",
"@appium/support": "^5.1.3",
"@appium/types": "^0.21.2",
"@sidvind/better-ajv-errors": "2.1.3",
"@sidvind/better-ajv-errors": "3.0.1",
"@types/argparse": "2.0.16",
"@types/bluebird": "3.5.42",
"@types/semver": "7.5.8",
@@ -22888,52 +22841,11 @@
"integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g=="
},
"@sidvind/better-ajv-errors": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/@sidvind/better-ajv-errors/-/better-ajv-errors-2.1.3.tgz",
"integrity": "sha512-lWuod/rh7Xz5uXiEGSfm2Sd5PG7K/6yJfoAZVqzsEswjPJhUz15R7Gn/o8RczA041QS15hBd/BCSeu9vwPArkA==",
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@sidvind/better-ajv-errors/-/better-ajv-errors-3.0.1.tgz",
"integrity": "sha512-++1mEYIeozfnwWI9P1ECvOPoacy+CgDASrmGvXPMCcqgx0YUzB01vZ78uHdQ443V6sTY+e9MzHqmN9DOls02aw==",
"requires": {
"@babel/code-frame": "^7.16.0",
"chalk": "^4.1.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"requires": {
"has-flag": "^4.0.0"
}
}
"kleur": "^4.1.0"
}
},
"@sigstore/bundle": {
@@ -24093,7 +24005,7 @@
"@appium/schema": "^0.6.1",
"@appium/support": "^5.1.3",
"@appium/types": "^0.21.2",
"@sidvind/better-ajv-errors": "2.1.3",
"@sidvind/better-ajv-errors": "3.0.1",
"@types/argparse": "2.0.16",
"@types/bluebird": "3.5.42",
"@types/semver": "7.5.8",
@@ -28895,6 +28807,11 @@
"klaw": {
"version": "4.1.0"
},
"kleur": {
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz",
"integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ=="
},
"kuler": {
"version": "2.0.0"
},

View File

@@ -344,7 +344,7 @@ function formatTimestamp(args) {
* @param {string} text
* @returns {string}
*/
function stripColorCodes(text) {
export function stripColorCodes(text) {
return text.replace(COLOR_CODE_PATTERN, '');
}

View File

@@ -66,7 +66,7 @@
"@appium/schema": "^0.6.1",
"@appium/support": "^5.1.3",
"@appium/types": "^0.21.2",
"@sidvind/better-ajv-errors": "2.1.3",
"@sidvind/better-ajv-errors": "3.0.1",
"@types/argparse": "2.0.16",
"@types/bluebird": "3.5.42",
"@types/semver": "7.5.8",

View File

@@ -9,6 +9,7 @@ import {
EXECUTABLE,
runAppiumRaw,
} from './e2e-helpers';
import { stripColorCodes } from '../../lib/logsink';
describe('argument parsing', function () {
/**
@@ -68,23 +69,17 @@ describe('argument parsing', function () {
describe('when the user provides an string where a number was expected', function () {
describe('when color output is supported', function () {
it('should output a fancy error message', async function () {
const [{stderr: actual}, expected] = await B.all([
runAppiumRaw(appiumHome, ['--port=sheep'], {
env: {FORCE_COLOR: '1'},
}),
readAppiumArgErrorFixture('cli/cli-error-output-color.txt'),
]);
expect(formatAppiumArgErrorOutput(actual)).to.equal(expected);
const {stderr: actual} = await runAppiumRaw(appiumHome, ['--port=sheep'], {
env: {FORCE_COLOR: '1'},
});
expect(stripColorCodes(actual)).to.not.equal(actual);
});
});
describe('when color output is unsupported', function () {
it('should output a colorless yet fancy error message', async function () {
const [{stderr: actual}, expected] = await B.all([
runAppiumRaw(appiumHome, ['--port=sheep'], {}),
readAppiumArgErrorFixture('cli/cli-error-output.txt'),
]);
expect(formatAppiumArgErrorOutput(actual)).to.equal(expected);
const {stderr: actual} = await runAppiumRaw(appiumHome, ['--port=sheep'], {});
expect(stripColorCodes(actual)).to.equal(actual);
});
});
});

View File

@@ -1,2 +0,0 @@
> 1 | "sheep"
  | ^^^^^^^ 👈🏽 type must be integer

View File

@@ -1,2 +0,0 @@
> 1 | "sheep"
| ^^^^^^^ 👈🏽 type must be integer