File tree Expand file tree Collapse file tree 4 files changed +14
-12
lines changed
Expand file tree Collapse file tree 4 files changed +14
-12
lines changed Original file line number Diff line number Diff line change 1212 node-version :
1313 - 14
1414 - 12
15- - 10
1615 steps :
1716 - uses : actions/checkout@v2
18- - uses : actions/setup-node@v1
17+ - uses : actions/setup-node@v2
1918 with :
2019 node-version : ${{ matrix.node-version }}
2120 - run : npm install
Original file line number Diff line number Diff line change 1- 'use strict' ;
2- const ansiRegex = require ( 'ansi-regex' ) ;
3- const replaceStream = require ( 'replacestream' ) ;
1+ import ansiRegex from 'ansi-regex' ;
2+ import replaceStream from 'replacestream' ;
43
5- module . exports = ( ) => replaceStream ( ansiRegex ( ) , '' ) ;
4+ export default function stripAnsiStream ( ) {
5+ return replaceStream ( ansiRegex ( ) , '' ) ;
6+ }
Original file line number Diff line number Diff line change 55 "license" : " MIT" ,
66 "repository" : " chalk/strip-ansi-stream" ,
77 "funding" : " https://github.com/chalk/strip-ansi-stream?sponsor=1" ,
8+ "type" : " module" ,
9+ "exports" : " ./index.js" ,
810 "engines" : {
9- "node" : " >=4 "
11+ "node" : " >=12 "
1012 },
1113 "scripts" : {
1214 "test" : " xo && ava"
4042 " stream"
4143 ],
4244 "dependencies" : {
43- "ansi-regex" : " ^3 .0.0" ,
45+ "ansi-regex" : " ^6 .0.0" ,
4446 "replacestream" : " ^4.0.3"
4547 },
4648 "devDependencies" : {
47- "ava" : " ^1 " ,
48- "get-stream" : " ^3 .0.0 " ,
49- "xo" : " ^0.20.0 "
49+ "ava" : " ^3 " ,
50+ "get-stream" : " ^6 .0.1 " ,
51+ "xo" : " ^0.38.2 "
5052 }
5153}
Original file line number Diff line number Diff line change 11import test from 'ava' ;
22import getStream from 'get-stream' ;
3- import stripAnsiStream from '.' ;
3+ import stripAnsiStream from './index.js ' ;
44
55test ( 'strip color from string' , async t => {
66 const stream = stripAnsiStream ( ) ;
You can’t perform that action at this time.
0 commit comments