Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import buildDebug from "debug/node";
let verboseDebug = buildDebug("babel:verbose");
let generalDebug = buildDebug("babel");
let seenDeprecatedMessages = [];
export default class Logger {
constructor(file, filename) {
this.filename = filename;
this.file = file;
}
_buildMessage(msg) {
let parts = `[BABEL] ${this.filename}`;
if (msg) parts += `: ${msg}`;
return parts;
}
warn(msg) {
import buildDebug from "debug/node";
let verboseDebug = buildDebug("comal:verbose");
let generalDebug = buildDebug("comal");
let seenDeprecatedMessages = [];
export default class Logger {
constructor(opts = {}) {
this.config(opts);
}
config(opts) {
this.suppressDeprecationMessages = opts.suppressDeprecationMessages;
this.filename = opts.filename || "(unknown)";
this.messagePrefix = opts.messagePrefix || "COMAL";
}
setFilename(filename) {
import type File from "./index";
import buildDebug from "debug/node";
const verboseDebug = buildDebug("babel:verbose");
const generalDebug = buildDebug("babel");
const seenDeprecatedMessages = [];
export default class Logger {
constructor(file: File, filename: string) {
this.filename = filename;
this.file = file;
}
filename: string;
file: File;
_buildMessage(msg: string): string {
let parts = `[BABEL] ${this.filename}`;
if (msg) parts += `: ${msg}`;
return parts;
import type File from "./index";
import buildDebug from "debug/node";
const verboseDebug = buildDebug("babel:verbose");
const generalDebug = buildDebug("babel");
const seenDeprecatedMessages = [];
export default class Logger {
constructor(file: File, filename: string) {
this.filename = filename;
this.file = file;
}
filename: string;
file: File;
_buildMessage(msg: string): string {
let parts = `[BABEL] ${this.filename}`;
if (msg) parts += `: ${msg}`;
import buildDebug from "debug/node";
let verboseDebug = buildDebug("babel:verbose");
let generalDebug = buildDebug("babel");
let seenDeprecatedMessages = [];
export default class Logger {
constructor(file, filename) {
this.filename = filename;
this.file = file;
}
_buildMessage(msg) {
let parts = `[BABEL] ${this.filename}`;
if (msg) parts += `: ${msg}`;
return parts;
}
import buildDebug from "debug/node";
let verboseDebug = buildDebug("comal:verbose");
let generalDebug = buildDebug("comal");
let seenDeprecatedMessages = [];
export default class Logger {
constructor(opts = {}) {
this.config(opts);
}
config(opts) {
this.suppressDeprecationMessages = opts.suppressDeprecationMessages;
this.filename = opts.filename || "(unknown)";
this.messagePrefix = opts.messagePrefix || "COMAL";
}
setFilename(filename) {
this.filename = filename;