mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-02-01 00:45:55 +00:00
Merge pull request #2812 from balena-io/test-omit-escaped-chars
Omit unicode control character escapes from test logs
This commit is contained in:
commit
838a36758a
38
npm-shrinkwrap.json
generated
38
npm-shrinkwrap.json
generated
@ -2414,13 +2414,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@oclif/plugin-help/node_modules/@oclif/core": {
|
||||
"version": "4.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@oclif/core/-/core-4.0.11.tgz",
|
||||
"integrity": "sha512-cZLLdSm9tGSbuoRjjgXf128zvPZH+afjQMQcrvDfoN347KvPg75ne8YJ8qHix+T3Vl03iXfgIH6guQN0kLgmjg==",
|
||||
"version": "4.0.12",
|
||||
"resolved": "https://registry.npmjs.org/@oclif/core/-/core-4.0.12.tgz",
|
||||
"integrity": "sha512-o2dfPtmi2uBGHgpvHr+GNfoRKysKgQGiffONoMN3R+qBVNeIkJIZhVk31HreDkAI9LAzS92BWNgp/l7lXDxdvg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"ansi-escapes": "^4.3.2",
|
||||
"ansis": "^3.1.1",
|
||||
"ansis": "^3.2.1",
|
||||
"clean-stack": "^3.0.1",
|
||||
"cli-spinners": "^2.9.2",
|
||||
"debug": "^4.3.5",
|
||||
@ -2532,13 +2532,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@oclif/plugin-not-found/node_modules/@oclif/core": {
|
||||
"version": "4.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@oclif/core/-/core-4.0.11.tgz",
|
||||
"integrity": "sha512-cZLLdSm9tGSbuoRjjgXf128zvPZH+afjQMQcrvDfoN347KvPg75ne8YJ8qHix+T3Vl03iXfgIH6guQN0kLgmjg==",
|
||||
"version": "4.0.12",
|
||||
"resolved": "https://registry.npmjs.org/@oclif/core/-/core-4.0.12.tgz",
|
||||
"integrity": "sha512-o2dfPtmi2uBGHgpvHr+GNfoRKysKgQGiffONoMN3R+qBVNeIkJIZhVk31HreDkAI9LAzS92BWNgp/l7lXDxdvg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"ansi-escapes": "^4.3.2",
|
||||
"ansis": "^3.1.1",
|
||||
"ansis": "^3.2.1",
|
||||
"clean-stack": "^3.0.1",
|
||||
"cli-spinners": "^2.9.2",
|
||||
"debug": "^4.3.5",
|
||||
@ -2651,13 +2651,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@oclif/plugin-warn-if-update-available/node_modules/@oclif/core": {
|
||||
"version": "4.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@oclif/core/-/core-4.0.11.tgz",
|
||||
"integrity": "sha512-cZLLdSm9tGSbuoRjjgXf128zvPZH+afjQMQcrvDfoN347KvPg75ne8YJ8qHix+T3Vl03iXfgIH6guQN0kLgmjg==",
|
||||
"version": "4.0.12",
|
||||
"resolved": "https://registry.npmjs.org/@oclif/core/-/core-4.0.12.tgz",
|
||||
"integrity": "sha512-o2dfPtmi2uBGHgpvHr+GNfoRKysKgQGiffONoMN3R+qBVNeIkJIZhVk31HreDkAI9LAzS92BWNgp/l7lXDxdvg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"ansi-escapes": "^4.3.2",
|
||||
"ansis": "^3.1.1",
|
||||
"ansis": "^3.2.1",
|
||||
"clean-stack": "^3.0.1",
|
||||
"cli-spinners": "^2.9.2",
|
||||
"debug": "^4.3.5",
|
||||
@ -5097,9 +5097,9 @@
|
||||
"integrity": "sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk="
|
||||
},
|
||||
"node_modules/ansis": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ansis/-/ansis-3.2.0.tgz",
|
||||
"integrity": "sha512-Yk3BkHH9U7oPyCN3gL5Tc7CpahG/+UFv/6UG03C311Vy9lzRmA5uoxDTpU9CO3rGHL6KzJz/pdDeXZCZ5Mu/Sg==",
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansis/-/ansis-3.2.1.tgz",
|
||||
"integrity": "sha512-SgzY+k2aa9UqJe3jzrPZhSVzLc2XrE4/h7rk0dMCDwhCq7ipmpPZvyODoxPCms4OpMLTiBTS+Mpl4VZQ6FDitw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=15"
|
||||
@ -13639,13 +13639,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/oclif/node_modules/@oclif/core": {
|
||||
"version": "4.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@oclif/core/-/core-4.0.11.tgz",
|
||||
"integrity": "sha512-cZLLdSm9tGSbuoRjjgXf128zvPZH+afjQMQcrvDfoN347KvPg75ne8YJ8qHix+T3Vl03iXfgIH6guQN0kLgmjg==",
|
||||
"version": "4.0.12",
|
||||
"resolved": "https://registry.npmjs.org/@oclif/core/-/core-4.0.12.tgz",
|
||||
"integrity": "sha512-o2dfPtmi2uBGHgpvHr+GNfoRKysKgQGiffONoMN3R+qBVNeIkJIZhVk31HreDkAI9LAzS92BWNgp/l7lXDxdvg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"ansi-escapes": "^4.3.2",
|
||||
"ansis": "^3.1.1",
|
||||
"ansis": "^3.2.1",
|
||||
"clean-stack": "^3.0.1",
|
||||
"cli-spinners": "^2.9.2",
|
||||
"debug": "^4.3.5",
|
||||
|
@ -64,18 +64,24 @@ export function filterCliOutputForTests({
|
||||
err: string[];
|
||||
out: string[];
|
||||
}): { err: string[]; out: string[] } {
|
||||
// eslint-disable-next-line no-control-regex
|
||||
const unicodeCharacterEscapesRegex = /\u001b\[3[0-9]m/g;
|
||||
return {
|
||||
err: err.filter(
|
||||
(line: string) =>
|
||||
line &&
|
||||
!line.match(/\[debug\]/i) &&
|
||||
// TODO stop this warning message from appearing when running
|
||||
// sdk.setSharedOptions multiple times in the same process
|
||||
!line.startsWith('Shared SDK options') &&
|
||||
!line.startsWith('WARN: disabling Sentry.io error reporting') &&
|
||||
!matchesNodeEngineVersionWarn(line),
|
||||
),
|
||||
out: out.filter((line: string) => line && !line.match(/\[debug\]/i)),
|
||||
err: err
|
||||
.map((line) => line.replaceAll(unicodeCharacterEscapesRegex, ''))
|
||||
.filter(
|
||||
(line: string) =>
|
||||
line &&
|
||||
!line.match(/\[debug\]/i) &&
|
||||
// TODO stop this warning message from appearing when running
|
||||
// sdk.setSharedOptions multiple times in the same process
|
||||
!line.startsWith('Shared SDK options') &&
|
||||
!line.startsWith('WARN: disabling Sentry.io error reporting') &&
|
||||
!matchesNodeEngineVersionWarn(line),
|
||||
),
|
||||
out: out
|
||||
.map((line) => line.replaceAll(unicodeCharacterEscapesRegex, ''))
|
||||
.filter((line) => line && !line.match(/\[debug\]/i)),
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user