Skip to content

Commit

Permalink
fix: fix ESM imports/exports
Browse files Browse the repository at this point in the history
  • Loading branch information
keindev committed Apr 20, 2022
1 parent 0fea1d4 commit 42d4091
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/ProgressBar.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import figures from 'figures';

import { TaskStatus } from './Task';
import { IndicationType, TextSeparator, Theme } from './Theme';
import { TaskStatus } from './Task.js';
import { IndicationType, TextSeparator, Theme } from './Theme.js';

/** Progress in percent by default */
export enum Progress {
Expand Down
6 changes: 3 additions & 3 deletions src/Task.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import chalkTemplate from 'chalk-template';

import { IProgressBarOptions, Progress, ProgressBar } from './ProgressBar';
import { ExitCode, TaskTree } from './TaskTree';
import { IndicationType, Theme } from './Theme';
import { IProgressBarOptions, Progress, ProgressBar } from './ProgressBar.js';
import { ExitCode, TaskTree } from './TaskTree.js';
import { IndicationType, Theme } from './Theme.js';

let uid = 0;

Expand Down
4 changes: 2 additions & 2 deletions src/TaskTree.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import UpdateManager from 'stdout-update';

import { Task } from './Task';
import { Theme, ThemeOptions } from './Theme';
import { Task } from './Task.js';
import { Theme, ThemeOptions } from './Theme.js';

export enum ExitCode {
Success = 0,
Expand Down
4 changes: 2 additions & 2 deletions src/Theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import elegantSpinner from 'elegant-spinner';
import figures from 'figures';
import { Terminal } from 'stdout-update/lib/Terminal';

import { ProgressBar } from './ProgressBar';
import { Task, TaskStatus } from './Task';
import { ProgressBar } from './ProgressBar.js';
import { Task, TaskStatus } from './Task.js';

const frame = elegantSpinner();

Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/ProgressBar.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import stripAnsi from 'strip-ansi';

import { IProgressBarOptions, ProgressBar } from '../ProgressBar';
import { Theme } from '../Theme';
import { IProgressBarOptions, ProgressBar } from '../ProgressBar.js';
import { Theme } from '../Theme.js';

describe('ProgressBar', (): void => {
const template = ':bar :percent :etas :custom';
Expand Down
8 changes: 4 additions & 4 deletions src/__tests__/Task.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Terminal } from 'stdout-update/lib/Terminal';
import stripAnsi from 'strip-ansi';

import { IProgressBarOptions } from '../ProgressBar';
import { Task, TaskStatus } from '../Task';
import { TaskTree } from '../TaskTree';
import { Theme, ThemeOptions } from '../Theme';
import { IProgressBarOptions } from '../ProgressBar.js';
import { Task, TaskStatus } from '../Task.js';
import { TaskTree } from '../TaskTree.js';
import { Theme, ThemeOptions } from '../Theme.js';

describe('Task', (): void => {
const title = 'task';
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/TaskTree.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Terminal } from 'stdout-update/lib/Terminal';
import stripAnsi from 'strip-ansi';

import { Task } from '../Task';
import { ITaskTreeOptions, TaskTree } from '../TaskTree';
import { Theme, ThemeOptions } from '../Theme';
import { Task } from '../Task.js';
import { ITaskTreeOptions, TaskTree } from '../TaskTree.js';
import { Theme, ThemeOptions } from '../Theme.js';

describe('TaskTree', (): void => {
const options: ITaskTreeOptions = { silent: true, autoClear: false };
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/Theme.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import figures from 'figures';
import stripAnsi from 'strip-ansi';

import { IndicationBadge, IndicationType, Theme } from '../Theme';
import { IndicationBadge, IndicationType, Theme } from '../Theme.js';

describe('Theme', (): void => {
const text = { input: '\\{\\{\\{t\\}e\\}x{red t}\\}', output: '{{{t}e}xt}' };
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from './TaskTree';
export { default } from './TaskTree.js';

0 comments on commit 42d4091

Please sign in to comment.