-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove @types node dev dependency from botframework-streaming #1795
Merged
Merged
Changes from 29 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
4cf3fe3
replaced new Server with createNodeServer(); created test INodeSocket…
Zerryth 7231d2b
removed new Func unit test
Zerryth 0fd229b
Merge branch 'master' into Zerryth/removeTypesNodeDevDependency
Zerryth ecd41bc
consolidated server-creation into 1 utils module; added unit tests
Zerryth f116243
Merge branch 'Zerryth/removeTypesNodeDevDependency' of https://github…
Zerryth e717537
Merge branch 'master' into Zerryth/removeTypesNodeDevDependency
Zerryth a4b8f24
removed await from Promise.all, as it was originally
Zerryth 271262c
Merge branch 'Zerryth/removeTypesNodeDevDependency' of https://github…
Zerryth 805b3b5
Update libraries/botframework-streaming/tests/NamedPipe.test.js
Zerryth dc89d8c
replaced references to @types/node classes with bf-streaming interfac…
Zerryth ef932ea
Merge branch 'Zerryth/removeTypesNodeDevDependency' of https://github…
Zerryth f8be823
Merge branch 'master' into Zerryth/removeTypesNodeDevDependency
Zerryth 45b7292
added more signatures to INodeSocket to remove Socket type dependency…
Zerryth 3bd6815
Merge branch 'Zerryth/removeTypesNodeDevDependency' of https://github…
Zerryth 43847f5
cleaned up comment
Zerryth eba33a5
changed INodeSocket.connect() to return any, as the nested types on s…
Zerryth 91a5bca
changed Buffer to INodeBuffer type hint
Zerryth 31e1074
Merge branch 'master' into Zerryth/removeTypesNodeDevDependency
Zerryth 820e8ae
added type guards to ensure we're getting an INodeServer back from cr…
Zerryth 66132ef
Merge branch 'Zerryth/removeTypesNodeDevDependency' of https://github…
Zerryth a40e263
added unit test
Zerryth 9d25bd8
added duck typing checks for server methods
Zerryth 1e852bb
Added methods to INodeSocket to remove dependency on node stream.Dupl…
Zerryth 48e2ad4
Merge branch 'master' into Zerryth/removeTypesNodeDevDependency
Zerryth 9c0f058
put server-creation in trycatch block, as we don't know if node 'net'…
Zerryth 0141a89
Merge branch 'Zerryth/removeTypesNodeDevDependency' of https://github…
Zerryth 2ce87d8
removed space from top of imports in tests
Zerryth 40c021c
added false path to checks (whoops, forgot them)
Zerryth 66fdb43
Merge branch 'master' into Zerryth/removeTypesNodeDevDependency
Zerryth db5ebc9
moved imort below comment
Zerryth 1c854b0
Merge branch 'Zerryth/removeTypesNodeDevDependency' of https://github…
Zerryth c271100
Merge branch 'master' into Zerryth/removeTypesNodeDevDependency
Zerryth 41fad65
Merge branch 'master' into Zerryth/removeTypesNodeDevDependency
Zerryth dd57eee
Merge branch 'master' into Zerryth/removeTypesNodeDevDependency
Stevenic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
libraries/botframework-streaming/src/interfaces/IEventEmitter.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** | ||
* @module botframework-streaming | ||
*/ | ||
/** | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
|
||
/** | ||
* Represents a EventEmitter from the `net` module in Node.js. | ||
* | ||
* This interface supports the framework and is not intended to be called directly for your code. | ||
*/ | ||
export interface IEventEmitter { | ||
addListener(event: string | symbol, listener: (...args: any[]) => void): this; | ||
on(event: string | symbol, listener: (...args: any[]) => void): this; | ||
once(event: string | symbol, listener: (...args: any[]) => void): this; | ||
removeListener(event: string | symbol, listener: (...args: any[]) => void): this; | ||
off(event: string | symbol, listener: (...args: any[]) => void): this; | ||
removeAllListeners(event?: string | symbol): this; | ||
setMaxListeners(n: number): this; | ||
getMaxListeners(): number; | ||
listeners(event: string | symbol): Function[]; | ||
rawListeners(event: string | symbol): Function[]; | ||
emit(event: string | symbol, ...args: any[]): boolean; | ||
listenerCount(type: string | symbol): number; | ||
// Added in Node 6... | ||
prependListener(event: string | symbol, listener: (...args: any[]) => void): this; | ||
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; | ||
eventNames(): Array<string | symbol>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
libraries/botframework-streaming/src/interfaces/INodeServer.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* @module botframework-streaming | ||
*/ | ||
/** | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
|
||
import { IEventEmitter } from '.'; | ||
|
||
/** | ||
* Represents a Server from the `net` module in Node.js. | ||
* | ||
* This interface supports the framework and is not intended to be called directly for your code. | ||
*/ | ||
export interface INodeServer extends IEventEmitter { | ||
constructor: this; | ||
close(callback?: (err?: Error) => void): this; | ||
listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this; | ||
listen(path: string, listeningListener?: () => void): this; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It didn't complain that these two interfaces weren't explicitly exported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, as I was just only using them within the file for
INodeSocket