File tree Expand file tree Collapse file tree
@isaacs/cliui/node_modules/ansi-regex
wrap-ansi/node_modules/ansi-regex Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11export default function ansiRegex ( { onlyFirst = false } = { } ) {
22 // Valid string terminator sequences are BEL, ESC\, and 0x9c
33 const ST = '(?:\\u0007|\\u001B\\u005C|\\u009C)' ;
4- const pattern = [
5- `[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ ST } )` ,
6- '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))' ,
7- ] . join ( '|' ) ;
4+
5+ // OSC sequences only: ESC ] ... ST (non-greedy until the first ST)
6+ const osc = `(?:\\u001B\\][\\s\\S]*?${ ST } )` ;
7+
8+ // CSI and related: ESC/C1, optional intermediates, optional params (supports ; and :) then final byte
9+ const csi = '[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]' ;
10+
11+ const pattern = `${ osc } |${ csi } ` ;
812
913 return new RegExp ( pattern , onlyFirst ? undefined : 'g' ) ;
1014}
Original file line number Diff line number Diff line change 11{
22 "name" : " ansi-regex" ,
3- "version" : " 6.1.0 " ,
3+ "version" : " 6.2.2 " ,
44 "description" : " Regular expression for matching ANSI escape codes" ,
55 "license" : " MIT" ,
66 "repository" : " chalk/ansi-regex" ,
Original file line number Diff line number Diff line change 11export default function ansiRegex ( { onlyFirst = false } = { } ) {
22 // Valid string terminator sequences are BEL, ESC\, and 0x9c
33 const ST = '(?:\\u0007|\\u001B\\u005C|\\u009C)' ;
4- const pattern = [
5- `[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ ST } )` ,
6- '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))' ,
7- ] . join ( '|' ) ;
4+
5+ // OSC sequences only: ESC ] ... ST (non-greedy until the first ST)
6+ const osc = `(?:\\u001B\\][\\s\\S]*?${ ST } )` ;
7+
8+ // CSI and related: ESC/C1, optional intermediates, optional params (supports ; and :) then final byte
9+ const csi = '[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]' ;
10+
11+ const pattern = `${ osc } |${ csi } ` ;
812
913 return new RegExp ( pattern , onlyFirst ? undefined : 'g' ) ;
1014}
Original file line number Diff line number Diff line change 11{
22 "name" : " ansi-regex" ,
3- "version" : " 6.1.0 " ,
3+ "version" : " 6.2.2 " ,
44 "description" : " Regular expression for matching ANSI escape codes" ,
55 "license" : " MIT" ,
66 "repository" : " chalk/ansi-regex" ,
Original file line number Diff line number Diff line change 12971297 }
12981298 },
12991299 "node_modules/@isaacs/cliui/node_modules/ansi-regex": {
1300- "version": "6.1.0 ",
1301- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0 .tgz",
1302- "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA ==",
1300+ "version": "6.2.2 ",
1301+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2 .tgz",
1302+ "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg ==",
13031303 "inBundle": true,
13041304 "license": "MIT",
13051305 "engines": {
1722017220 }
1722117221 },
1722217222 "node_modules/wrap-ansi/node_modules/ansi-regex": {
17223- "version": "6.1.0 ",
17224- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0 .tgz",
17225- "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA ==",
17223+ "version": "6.2.2 ",
17224+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2 .tgz",
17225+ "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg ==",
1722617226 "inBundle": true,
1722717227 "license": "MIT",
1722817228 "engines": {
You can’t perform that action at this time.
0 commit comments