Skip to content

Commit

Permalink
fix: correct package imports
Browse files Browse the repository at this point in the history
  • Loading branch information
markthree committed Jan 30, 2023
1 parent 7aeef95 commit cb8045d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
14 changes: 6 additions & 8 deletions src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,14 @@ import {
getFileModifyTimeStampSync
} from './fs'

// @ts-ignore
import make from 'stream-json'
// @ts-ignore
import make2 from 'stream-json/streamers/streamArray'
import * as StreamArray from 'stream-json/streamers/StreamArray'
import { createRequire } from 'module'

const require = createRequire(import.meta.url)

const { parser } = require('stream-json')

const {
streamArray
} = require('stream-json/streamers/streamArray')
const parser = make.parser
const streamArray = make2.streamArray

interface ICreateFsComputedOptions {
cachePath?: string
Expand Down
4 changes: 2 additions & 2 deletions test/fs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ describe('fs', () => {
it('getFileModifyTimeStamp', async () => {
expect(
await getFileModifyTimeStamp('./package.json')
).toMatchInlineSnapshot('1675086739472')
).toMatchInlineSnapshot('1675087752504')
})

it('getFileModifyTimeStampSync', () => {
expect(
getFileModifyTimeStampSync('./package.json')
).toMatchInlineSnapshot('1675086739472')
).toMatchInlineSnapshot('1675087752504')
})

it('getFileModifyTimeStamp', async () => {
Expand Down

0 comments on commit cb8045d

Please sign in to comment.