Skip to content

Commit

Permalink
refactor(core): replace import require with import *
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieMason committed Feb 3, 2019
1 parent f095f8d commit b198353
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/bin-fix-mismatches.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node

import chalk from 'chalk';
import program = require('commander');
import * as program from 'commander';
import { run } from './fix-mismatches';

program.description(
Expand Down
2 changes: 1 addition & 1 deletion src/bin-format.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node

import chalk from 'chalk';
import program = require('commander');
import * as program from 'commander';
import { run } from './format';

program.description(
Expand Down
2 changes: 1 addition & 1 deletion src/bin-list-mismatches.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node

import chalk from 'chalk';
import program = require('commander');
import * as program from 'commander';
import { run } from './list-mismatches';

program.description(
Expand Down
2 changes: 1 addition & 1 deletion src/bin-list.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node

import chalk from 'chalk';
import program = require('commander');
import * as program from 'commander';
import { run } from './list';

program.description(
Expand Down
2 changes: 1 addition & 1 deletion src/bin-set-semver-ranges.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node

import chalk from 'chalk';
import program = require('commander');
import * as program from 'commander';
import { run } from './set-semver-ranges';

program.description(
Expand Down
2 changes: 1 addition & 1 deletion src/bin.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node

import program = require('commander');
import * as program from 'commander';
import { run } from './syncpack';

run(program);
2 changes: 1 addition & 1 deletion src/fix-mismatches.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import chalk from 'chalk';
import { writeJson } from 'fs-extra';
import _ = require('lodash');
import * as _ from 'lodash';
import { relative } from 'path';
import {
OPTION_INDENT,
Expand Down
2 changes: 1 addition & 1 deletion src/format.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import chalk from 'chalk';
import { writeJson } from 'fs-extra';
import _ = require('lodash');
import * as _ from 'lodash';
import { relative } from 'path';
import {
OPTION_INDENT,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/version.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import _ = require('lodash');
import * as _ from 'lodash';
import { getNewest, getVersionRange, sortBySemver } from './version';

describe('getNewest', () => {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/version.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import _ = require('lodash');
import semver = require('semver');
import * as _ from 'lodash';
import * as semver from 'semver';
import { GREATER, LESSER, SAME, SEMVER_ORDER } from '../constants';

const isSemver = (version: string) =>
Expand Down
2 changes: 1 addition & 1 deletion src/list-mismatches.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import chalk from 'chalk';
import _ = require('lodash');
import * as _ from 'lodash';
import {
OPTION_SOURCES,
OPTIONS_DEV,
Expand Down
2 changes: 1 addition & 1 deletion src/list.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import chalk from 'chalk';
import _ = require('lodash');
import * as _ from 'lodash';
import {
OPTION_SOURCES,
OPTIONS_DEV,
Expand Down
4 changes: 2 additions & 2 deletions src/set-semver-ranges.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import chalk from 'chalk';
import { writeJson } from 'fs-extra';
import _ = require('lodash');
import * as _ from 'lodash';
import { relative } from 'path';
import semver = require('semver');
import * as semver from 'semver';
import {
OPTION_INDENT,
OPTION_SEMVER_RANGE,
Expand Down
2 changes: 1 addition & 1 deletion test/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { readJsonSync } from 'fs-extra';
import _ = require('lodash');
import * as _ from 'lodash';
import { CommanderApi } from '../src/typings';

const shuffle = (value: any): typeof value =>
Expand Down

0 comments on commit b198353

Please sign in to comment.