Skip to content

Commit

Permalink
Move files
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Jan 30, 2022
1 parent c3d3ce5 commit 4cdc6e2
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/config/normalize/definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import {
DEFAULT_SINCE_DELTA,
} from '../../history/delta/transform.js'
import { getDefaultId, validateMerge } from '../../history/merge/id.js'
import { isOutputPath } from '../../report/contents/output.js'
import { DEFAULT_SHOW_PRECISION } from '../../report/normalize/omit.js'
import {
DEFAULT_TITLES,
DEFAULT_SHOW_TITLES,
} from '../../report/normalize/titles_add.js'
import { isOutputPath } from '../../report/output.js'
import { DEFAULT_REPORTERS } from '../../report/reporters/main.js'
import { isTtyInput } from '../../report/tty.js'
import {
Expand Down
6 changes: 3 additions & 3 deletions src/report/finalize.js → src/report/contents/finalize.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import stripFinalNewline from 'strip-final-newline'

import { groupBy } from '../utils/group.js'
import { groupBy } from '../../utils/group.js'
import { FORMATS } from '../formats/list.js'
import { getLineSeparator } from '../utils/line.js'

import { FORMATS } from './formats/list.js'
import { handleContent } from './handle.js'
import { getLineSeparator } from './utils/line.js'

// Remove empty contents, join them by output, fix colors and whitespaces
export const finalizeContents = function (contents) {
Expand Down
2 changes: 1 addition & 1 deletion src/report/contents.js → src/report/contents/get.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import omit from 'omit.js'

import { FORMATS } from './formats/list.js'
import { FORMATS } from '../formats/list.js'

// Retrieve reporter's contents by calling all `reporter.report()` then
// normalizing their return value and grouping it by `output`.
Expand Down
4 changes: 2 additions & 2 deletions src/report/handle.js → src/report/contents/handle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Node <16.11.0
import stripAnsi from 'strip-ansi'

import { addPadding } from './utils/indent.js'
import { wrapRows } from './utils/wrap.js'
import { addPadding } from '../utils/indent.js'
import { wrapRows } from '../utils/wrap.js'

// Handle content returned by `reporter.report()`.
// Also used on the preview bottom bar.
Expand Down
4 changes: 2 additions & 2 deletions src/report/insert.js → src/report/contents/insert.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { pathExists } from 'path-exists'
import stripFinalNewline from 'strip-final-newline'
import writeFileAtomic from 'write-file-atomic'

import { UserError } from '../error/main.js'
import { wrapError } from '../error/wrap.js'
import { UserError } from '../../error/main.js'
import { wrapError } from '../../error/wrap.js'

// By default, the `output` configuration property overwrites the file.
// However, contents can be inserted instead between any two lines with the
Expand Down
6 changes: 3 additions & 3 deletions src/report/output.js → src/report/contents/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { dirname } from 'path'

import writeFileAtomic from 'write-file-atomic'

import { UserError } from '../error/main.js'
import { wrapError } from '../error/wrap.js'
import { UserError } from '../../error/main.js'
import { wrapError } from '../../error/wrap.js'
import { printToStdout } from '../tty.js'

import { detectInsert, insertContents } from './insert.js'
import { printToStdout } from './tty.js'

// `output` path is normalized, but some of its values are not file paths
export const isOutputPath = function (output) {
Expand Down
6 changes: 3 additions & 3 deletions src/report/main.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { getContents } from './contents.js'
import { finalizeContents } from './finalize.js'
import { finalizeContents } from './contents/finalize.js'
import { getContents } from './contents/get.js'
import { outputContents } from './contents/output.js'
import { normalizeComputedResult } from './normalize/computed.js'
import { normalizeEarlyResult } from './normalize/early.js'
import { outputContents } from './output.js'
import { startReporters, endReporters } from './start_end.js'

// Report final results in `show` and `remove` commands.
Expand Down
2 changes: 1 addition & 1 deletion src/run/preview/update/bottom_bar.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { handleContent } from '../../../report/handle.js'
import { handleContent } from '../../../report/contents/handle.js'
import { getFullLineSeparator } from '../../../report/utils/line.js'

import { getActions, ACTIONS_LABEL } from './actions.js'
Expand Down

0 comments on commit 4cdc6e2

Please sign in to comment.