mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-14 17:43:52 +08:00
refactor: use Buffer.from instead of deprecated constructor
This commit is contained in:
parent
17ba2bc450
commit
2b3f9de403
@ -46,7 +46,7 @@ exports.istanbulRequireHook = function(code, filename) {
|
||||
|
||||
instrumentedCode = instrumentedCode.replace(inlineSourceMapRe, '')
|
||||
+ '//# sourceMappingURL=data:application/json;base64,'
|
||||
+ new Buffer(sourceMapGenerator.toString()).toString('base64');
|
||||
+ Buffer.from(sourceMapGenerator.toString()).toString('base64');
|
||||
|
||||
// Keep the consumer from the original source map, because the reports from Istanbul (not
|
||||
// Constantinople) are already mapped against the code.
|
||||
|
@ -55,7 +55,7 @@ export default function(args: ChangelogOptions, logger: logging.Logger) {
|
||||
const commit = chunk.toString('utf-8')
|
||||
.replace(/https?:\/\/github.com\/(.*?)\/issues\/(\d+)/g, '@$1#$2');
|
||||
|
||||
callback(undefined, new Buffer(commit));
|
||||
callback(undefined, Buffer.from(commit));
|
||||
}))
|
||||
.pipe(conventionalCommitsParser({
|
||||
headerPattern: /^(\w*)(?:\(([^)]*)\))?: (.*)$/,
|
||||
|
Loading…
x
Reference in New Issue
Block a user