diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
commit | bbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch) | |
tree | c58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/ansi-regex | |
parent | 003fb34971cf63466184351b4db5f7c67df4f444 (diff) | |
download | wallet-core-bbff7403fbf46f9ad92240ac213df8d30ef31b64.tar.xz |
update packages
Diffstat (limited to 'node_modules/ansi-regex')
-rw-r--r-- | node_modules/ansi-regex/index.js | 2 | ||||
-rw-r--r-- | node_modules/ansi-regex/package.json | 23 | ||||
-rw-r--r-- | node_modules/ansi-regex/readme.md | 14 |
3 files changed, 29 insertions, 10 deletions
diff --git a/node_modules/ansi-regex/index.js b/node_modules/ansi-regex/index.js index 783c5c7bb..b9574ed7e 100644 --- a/node_modules/ansi-regex/index.js +++ b/node_modules/ansi-regex/index.js @@ -1,4 +1,4 @@ 'use strict'; module.exports = function () { - return /\u001b\[(?:[0-9]{1,3}(?:;[0-9]{1,3})*)?[m|K]/g; + return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g; }; diff --git a/node_modules/ansi-regex/package.json b/node_modules/ansi-regex/package.json index 2734a7873..eb44fb5c1 100644 --- a/node_modules/ansi-regex/package.json +++ b/node_modules/ansi-regex/package.json @@ -1,19 +1,25 @@ { "name": "ansi-regex", - "version": "0.2.1", + "version": "2.1.1", "description": "Regular expression for matching ANSI escape codes", "license": "MIT", - "repository": "sindresorhus/ansi-regex", + "repository": "chalk/ansi-regex", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" + "url": "sindresorhus.com" }, + "maintainers": [ + "Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)", + "Joshua Appelman <jappelman@xebia.com> (jbnicolai.com)", + "JD Ballard <i.am.qix@gmail.com> (github.com/qix-)" + ], "engines": { "node": ">=0.10.0" }, "scripts": { - "test": "mocha" + "test": "xo && ava --verbose", + "view-supported": "node fixtures/view-codes.js" }, "files": [ "index.js" @@ -46,6 +52,13 @@ "pattern" ], "devDependencies": { - "mocha": "*" + "ava": "0.17.0", + "xo": "0.16.0" + }, + "xo": { + "rules": { + "guard-for-in": 0, + "no-loop-func": 0 + } } } diff --git a/node_modules/ansi-regex/readme.md b/node_modules/ansi-regex/readme.md index ae876e729..6a928edf0 100644 --- a/node_modules/ansi-regex/readme.md +++ b/node_modules/ansi-regex/readme.md @@ -1,11 +1,11 @@ -# ansi-regex [![Build Status](https://travis-ci.org/sindresorhus/ansi-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-regex) +# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) > Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) ## Install -```sh +``` $ npm install --save ansi-regex ``` @@ -13,7 +13,7 @@ $ npm install --save ansi-regex ## Usage ```js -var ansiRegex = require('ansi-regex'); +const ansiRegex = require('ansi-regex'); ansiRegex().test('\u001b[4mcake\u001b[0m'); //=> true @@ -25,7 +25,13 @@ ansiRegex().test('cake'); //=> ['\u001b[4m', '\u001b[0m'] ``` -*It's a function so you can create multiple instances. Regexes with the global flag will have the `.lastIndex` property changed for each call to methods on the instance. Therefore reusing the instance with multiple calls will not work as expected for `.test()`.* +## FAQ + +### Why do you test for codes not in the ECMA 48 standard? + +Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. + +On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. ## License |