Skip to content

Commit

Permalink
fix(all): use debug correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwremmel committed May 2, 2018
1 parent 5e3b4c8 commit 4d1ad56
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {Config, ScriptConfig} from '../lib/config';
import {format as f, makeDebug} from '../lib/debug';
import {findProjectRoot, hasRc} from '../lib/project';

const debug = makeDebug(__dirname);
const debug = makeDebug(__filename);

/**
* Create a .clarkrc file in your project root
Expand Down
2 changes: 1 addition & 1 deletion src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import rc from 'rc';

import {format as f, makeDebug} from './debug';

const debug = makeDebug(__dirname);
const debug = makeDebug(__filename);

/**
* Root of the config object
Expand Down
2 changes: 1 addition & 1 deletion src/lib/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function makeDebug(filename: string): IDebugger {
.substr(filename.indexOf(rootName))
.replace('src/', '')
.replace(/\/|\\/g, ':')
.replace(/.js$/, ''),
.replace(/.[jt]sx?$/, ''),
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib/packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {spawn} from './spawn';
import {sortObject} from './util';
import {select} from './version';

const debug = makeDebug(__dirname);
const debug = makeDebug(__filename);

let pathsByPackage = new Map();
let packagesByPath = new Map();
Expand Down
2 changes: 1 addition & 1 deletion src/lib/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {resolve} from 'path';

import {format as f, makeDebug} from './debug';

const debug = makeDebug(__dirname);
const debug = makeDebug(__filename);

/**
* Locates the monorepo's root based on various heuristics including existence
Expand Down
2 changes: 1 addition & 1 deletion src/lib/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import semver from 'semver';

import {format as f, makeDebug} from './debug';

const debug = makeDebug(__dirname);
const debug = makeDebug(__filename);

/**
* Range operators
Expand Down

0 comments on commit 4d1ad56

Please sign in to comment.