Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace chalk.reset with stripAnsi in @vue/cli-shared-utils/lib/logger.js #4842

Merged
merged 4 commits into from Nov 27, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/@vue/cli-shared-utils/lib/logger.js
@@ -1,4 +1,5 @@
const chalk = require('chalk')
const stripAnsi = require('strip-ansi');
perakerberg marked this conversation as resolved.
Show resolved Hide resolved
const readline = require('readline')
const padStart = require('string.prototype.padstart')
const EventEmitter = require('events')
Expand All @@ -19,7 +20,7 @@ const format = (label, msg) => {
return msg.split('\n').map((line, i) => {
return i === 0
? `${label} ${line}`
: padStart(line, chalk.reset(label).length)
: padStart(line, stripAnsi(label).length)
}).join('\n')
}

Expand Down
3 changes: 2 additions & 1 deletion packages/@vue/cli-shared-utils/package.json
Expand Up @@ -31,7 +31,8 @@
"request": "^2.87.0",
"request-promise-native": "^1.0.7",
"semver": "^6.1.0",
"string.prototype.padstart": "^3.0.0"
"string.prototype.padstart": "^3.0.0",
"strip-ansi" : "^6.0.0"
},
"publishConfig": {
"access": "public"
Expand Down