Skip to content

Commit

Permalink
Merge pull request #28 from getjackd/default-export
Browse files Browse the repository at this point in the history
Follow-up for default export
  • Loading branch information
divmgl authored Feb 28, 2022
2 parents 91e5d5f + 3c65f96 commit dd02660
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export declare class JackdClient {
listTubeUsed: () => Promise<string>;
createCommandHandler<TArgs extends any[], TReturn>(commandStringFunction: (...args: any[]) => Buffer, handlers: CommandHandler<TReturn | void>[]): (...args: TArgs) => Promise<TReturn>;
}
export default JackdClient;
export declare class InvalidResponseError extends Error {
response: string;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{
"name": "jackd",
"version": "2.1.1",
"version": "2.1.2",
"description": "Modern beanstalkd client for Node.js",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"start": "tsc",
"dev": "tsc --watch",
"lint": "eslint src",
"test": "mocha --bail"
},
Expand Down
6 changes: 4 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import {

const DELIMITER = '\r\n'

export default JackdClient;

export class JackdClient {
socket: Socket = new Socket()
connected: Boolean = false
Expand Down Expand Up @@ -558,6 +556,10 @@ export class JackdClient {
}
}

module.exports = JackdClient;

export default JackdClient;

function validate(buffer: Buffer, additionalErrors: string[] = []): string {
const ascii = buffer.toString('ascii')
const errors = [OUT_OF_MEMORY, INTERNAL_ERROR, BAD_FORMAT, UNKNOWN_COMMAND]
Expand Down

0 comments on commit dd02660

Please sign in to comment.