Skip to content

Commit

Permalink
deps: strip-ansi@7.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Jun 19, 2023
1 parent 6105dbc commit aee4a30
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
7 changes: 6 additions & 1 deletion node_modules/@isaacs/cliui/node_modules/strip-ansi/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import ansiRegex from 'ansi-regex';

const regex = ansiRegex();

export default function stripAnsi(string) {
if (typeof string !== 'string') {
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
}

return string.replace(ansiRegex(), '');
// Even though the regex is global, we don't need to reset the `.lastIndex`
// because unlike `.exec()` and `.test()`, `.replace()` does it automatically
// and doing it manually has a performance penalty.
return string.replace(regex, '');
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "strip-ansi",
"version": "7.0.1",
"version": "7.1.0",
"description": "Strip ANSI escape codes from a string",
"license": "MIT",
"repository": "chalk/strip-ansi",
Expand Down
7 changes: 6 additions & 1 deletion node_modules/wrap-ansi/node_modules/strip-ansi/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import ansiRegex from 'ansi-regex';

const regex = ansiRegex();

export default function stripAnsi(string) {
if (typeof string !== 'string') {
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
}

return string.replace(ansiRegex(), '');
// Even though the regex is global, we don't need to reset the `.lastIndex`
// because unlike `.exec()` and `.test()`, `.replace()` does it automatically
// and doing it manually has a performance penalty.
return string.replace(regex, '');
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "strip-ansi",
"version": "7.0.1",
"version": "7.1.0",
"description": "Strip ANSI escape codes from a string",
"license": "MIT",
"repository": "chalk/strip-ansi",
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -1329,9 +1329,9 @@
}
},
"node_modules/@isaacs/cliui/node_modules/strip-ansi": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz",
"integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==",
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
"integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
"inBundle": true,
"dependencies": {
"ansi-regex": "^6.0.1"
Expand Down Expand Up @@ -15231,9 +15231,9 @@
}
},
"node_modules/wrap-ansi/node_modules/strip-ansi": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz",
"integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==",
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
"integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
"inBundle": true,
"dependencies": {
"ansi-regex": "^6.0.1"
Expand Down

0 comments on commit aee4a30

Please sign in to comment.