Skip to content

Commit

Permalink
fix: use default export for node mocks (cjs compat)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Nov 19, 2020
1 parent c42196c commit 83c275d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
13 changes: 10 additions & 3 deletions src.runtime/node/http/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
export * from './consts'
export * from './request'
export * from './response'
import { METHODS, STATUS_CODES } from './consts'
import { IncomingMessage } from './request'
import { ServerResponse } from './response'

export default {
METHODS,
STATUS_CODES,
IncomingMessage,
ServerResponse
}
6 changes: 5 additions & 1 deletion src.runtime/node/net/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
export * from './socket'
import { Socket } from './socket'

export default {
Socket
}
9 changes: 7 additions & 2 deletions src.runtime/node/stream/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
export * from './readable'
export * from './writable'
import { Readable } from './readable'
import { Writable } from './writable'

export default {
Readable,
Writable
}

0 comments on commit 83c275d

Please sign in to comment.