Skip to content

Commit dd02660

Browse files
authored
Merge pull request #28 from getjackd/default-export
Follow-up for default export
2 parents 91e5d5f + 3c65f96 commit dd02660

File tree

6 files changed

+12
-5
lines changed

6 files changed

+12
-5
lines changed

dist/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export declare class JackdClient {
4949
listTubeUsed: () => Promise<string>;
5050
createCommandHandler<TArgs extends any[], TReturn>(commandStringFunction: (...args: any[]) => Buffer, handlers: CommandHandler<TReturn | void>[]): (...args: TArgs) => Promise<TReturn>;
5151
}
52+
export default JackdClient;
5253
export declare class InvalidResponseError extends Error {
5354
response: string;
5455
}

dist/index.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
{
22
"name": "jackd",
3-
"version": "2.1.1",
3+
"version": "2.1.2",
44
"description": "Modern beanstalkd client for Node.js",
55
"main": "dist/index.js",
6+
"types": "dist/index.d.ts",
67
"scripts": {
8+
"start": "tsc",
9+
"dev": "tsc --watch",
710
"lint": "eslint src",
811
"test": "mocha --bail"
912
},

src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ import {
1818

1919
const DELIMITER = '\r\n'
2020

21-
export default JackdClient;
22-
2321
export class JackdClient {
2422
socket: Socket = new Socket()
2523
connected: Boolean = false
@@ -558,6 +556,10 @@ export class JackdClient {
558556
}
559557
}
560558

559+
module.exports = JackdClient;
560+
561+
export default JackdClient;
562+
561563
function validate(buffer: Buffer, additionalErrors: string[] = []): string {
562564
const ascii = buffer.toString('ascii')
563565
const errors = [OUT_OF_MEMORY, INTERNAL_ERROR, BAD_FORMAT, UNKNOWN_COMMAND]

0 commit comments

Comments
 (0)