Skip to content

Commit

Permalink
fix: fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jegj committed Oct 13, 2023
1 parent 6ea69d0 commit 4af22df
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
8 changes: 5 additions & 3 deletions lib/input.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import fs from 'fs'
import { inputFromSTDIN } from './utils.js'
import splitter from '../lib/splitter.js'
import matcher from '../lib/matcher.js'
import Analyzer from '../lib/analyzer.js'
import splitter from '../lib/splitter/index.js'
import matcher from '../lib/matcher/index.js'
import Analyzer from '../lib/analyzer/index.js'

const _stdin = (analyzer, pgfilterCLIParseOpts) => {
process.stdin.setEncoding('utf8')
Expand Down Expand Up @@ -36,3 +36,5 @@ export const init = function _init (pgfilterCLIParseOpts) {
_file(analyzer, pgfilterCLIParseOpts)
}
}

export default init
4 changes: 2 additions & 2 deletions lib/matcher/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Transform } from 'stream'
import { isStartOfCopyStatement, isEndOfCopyStatement } from '../utils'
import { isStartOfCopyStatement, isEndOfCopyStatement } from '../utils.js'

const matcher = function _matcher (analyzer, { readableHighWaterMark = null, writableHighWaterMark = null } = { readableHighWaterMark: null, writableHighWaterMark: null }) {
const CopyTransform = new Transform({
Expand Down Expand Up @@ -35,4 +35,4 @@ const matcher = function _matcher (analyzer, { readableHighWaterMark = null, wri
return CopyTransform
}

module.exports = matcher
export default matcher
2 changes: 2 additions & 0 deletions lib/splitter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ import split2 from 'split2'
export const splitter = function splitter (matcher = null, mapper = null, options = {}) {
return split2(matcher, mapper, options)
}

export default splitter
4 changes: 2 additions & 2 deletions pgfilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import yargs from 'yargs/yargs'
import { hideBin } from 'yargs/helpers'
import input from './lib/input'
import { validJSONFile, validBackupFile, validBuffer } from './lib/utils'
import input from './lib/input.js'
import { validJSONFile, validBackupFile, validBuffer } from './lib/utils.js'

const pgfilter = yargs(hideBin(process.argv))
.scriptName('pgfilter')
Expand Down

0 comments on commit 4af22df

Please sign in to comment.