Skip to content

Commit

Permalink
#81 (#82)
Browse files Browse the repository at this point in the history
* Fix #81 Update dependencies
  • Loading branch information
regevbr authored Feb 24, 2020
1 parent e2942bb commit b647ff3
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 21 deletions.
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "squiss-ts",
"version": "4.0.9",
"version": "4.0.10",
"description": "High-volume SQS poller",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -46,33 +46,33 @@
},
"homepage": "https://github.com/PruvoNet/squiss-ts#readme",
"dependencies": {
"aws-sdk": "^2.572.0",
"aws-sdk": "^2.624.0",
"iltorb": "2.4.3",
"linked-list": "^2.1.0",
"ts-type-guards": "^0.6.1",
"uuid": "^3.3.3"
"uuid": "^7.0.0"
},
"devDependencies": {
"@istanbuljs/nyc-config-typescript": "^0.1.3",
"@types/chai": "^4.2.5",
"@istanbuljs/nyc-config-typescript": "0.1.3",
"@types/chai": "^4.2.9",
"@types/chai-as-promised": "^7.1.2",
"@types/iltorb": "^2.3.0",
"@types/mocha": "^5.2.7",
"@types/node": "^12.12.8",
"@types/mocha": "^7.0.0",
"@types/node": "^13.7.4",
"@types/proxyquire": "^1.3.28",
"@types/uuid": "^3.4.6",
"@types/uuid": "^3.4.7",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"delay": "^4.3.0",
"dirty-chai": "^2.0.1",
"mocha": "^6.2.2",
"nyc": "^14.1.1",
"mocha": "6.2.2",
"nyc": "14.1.1",
"proxyquire": "^2.1.3",
"sinon": "^7.5.0",
"sinon-chai": "^3.3.0",
"sinon": "^9.0.0",
"sinon-chai": "^3.5.0",
"source-map-support": "^0.5.16",
"ts-node": "^8.5.2",
"tslint": "^5.20.1",
"typescript": "^3.7.2"
"ts-node": "^8.6.2",
"tslint": "^6.0.0",
"typescript": "^3.8.2"
}
}
2 changes: 1 addition & 1 deletion src/Squiss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ export class Squiss extends (EventEmitter as new() => SquissEmitter) {
QueueUrl: queueUrl,
Entries: [],
};
const promises: Array<Promise<void>> = [];
const promises: Promise<void>[] = [];
messages.forEach((msg, idx) => {
const entry: SQS.Types.SendMessageBatchRequestEntry = {
Id: (start + idx).toString(),
Expand Down
2 changes: 1 addition & 1 deletion src/Utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

export const removeEmptyKeys = <T extends object>(obj: T): T => {
(Object.keys(obj) as Array<keyof typeof obj>).forEach((key) => {
(Object.keys(obj) as (keyof typeof obj)[]).forEach((key) => {
if (obj[key] === undefined) {
delete obj[key];
}
Expand Down
4 changes: 2 additions & 2 deletions src/s3Utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

import {S3} from 'aws-sdk';
import * as uuid from 'uuid/v4';
import { v4 as uuidv4 } from 'uuid';
import {getSizeInBytes} from './messageSizeUtils';

export const S3_MARKER = '__SQS_S3__';
Expand All @@ -13,7 +13,7 @@ export interface IS3Upload {
}

export const uploadBlob = (s3: S3, bucket: string, blob: string, prefix: string): Promise<IS3Upload> => {
const key = `${prefix}${uuid()}`;
const key = `${prefix}${uuidv4()}`;
const size = getSizeInBytes(blob);
return s3.putObject({
Body: blob,
Expand Down
6 changes: 4 additions & 2 deletions src/test/src/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import * as proxyquire from 'proxyquire';
const uuidStub = () => {
return 'my_uuid';
};
(uuidStub as any)['@global'] = true;
const stubs = {
'uuid/v4': uuidStub,
'uuid': {
v4: uuidStub,
'@global': true,
},
};
// tslint:disable-next-line
const {Squiss: SquissPatched, Message: MessagePatched} = proxyquire('../../', stubs);
Expand Down

0 comments on commit b647ff3

Please sign in to comment.