Skip to content

Commit 50b35cd

Browse files
committed
Upgrade dependencies
1 parent 0d10134 commit 50b35cd

File tree

14 files changed

+118
-108
lines changed

14 files changed

+118
-108
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
yarn.lock
22
package-lock.json
3+
.idea/
34

45
# Created by .ignore support plugin (hsz.mobi)
56
logs

package.json

+7-6
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
},
1414
"license": "Apache-2.0",
1515
"devDependencies": {
16-
"@types/jest": "^23",
16+
"@types/jest": "^24",
1717
"@types/node": "^8.0.4",
18-
"jest": "^23",
19-
"lerna": "^2.11.0",
20-
"typedoc": "^0.11.0",
21-
"typescript": "^2.7"
18+
"jest": "^24",
19+
"lerna": "^3.13",
20+
"typedoc": "^0.14.0",
21+
"typescript": "^3.4"
2222
},
2323
"dependencies": {
2424
"aws-sdk": "^2.7.0"
@@ -27,6 +27,7 @@
2727
"packages/*"
2828
],
2929
"jest": {
30-
"testEnvironment": "node"
30+
"testEnvironment": "node",
31+
"testPathIgnorePatterns": ["/node_modules/", ".ts"]
3132
}
3233
}

packages/dynamodb-auto-marshaller/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,25 @@
2020
"docs": "typedoc src",
2121
"prepublishOnly": "tsc",
2222
"pretest": "tsc -p tsconfig.test.json",
23-
"test": "jest"
23+
"test": "jest \"build/(.+).spec.js\""
2424
},
2525
"author": {
2626
"name": "AWS SDK for JavaScript Team",
2727
"email": "[email protected]"
2828
},
2929
"license": "Apache-2.0",
3030
"devDependencies": {
31-
"@types/jest": "^23",
31+
"@types/jest": "^24",
3232
"@types/node": "^8.0.4",
3333
"aws-sdk": "^2.7.0",
34-
"jest": "^23",
35-
"typedoc": "^0.11.0",
36-
"typescript": "^2.7"
34+
"jest": "^24",
35+
"typedoc": "^0.14.0",
36+
"typescript": "^3.4"
3737
},
3838
"peerDependencies": {
3939
"aws-sdk": "^2.7.0"
4040
},
4141
"dependencies": {
42-
"tslib": "^1.8.1"
42+
"tslib": "^1.9"
4343
}
4444
}

packages/dynamodb-batch-iterator/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,26 @@
2020
"docs": "typedoc src",
2121
"prepublishOnly": "tsc",
2222
"pretest": "tsc -p tsconfig.test.json",
23-
"test": "jest"
23+
"test": "jest \"build/(.+).spec.js\""
2424
},
2525
"author": {
2626
"name": "AWS SDK for JavaScript Team",
2727
"email": "[email protected]"
2828
},
2929
"license": "Apache-2.0",
3030
"devDependencies": {
31-
"@types/jest": "^23",
31+
"@types/jest": "^24",
3232
"@types/node": "^8.0.4",
3333
"aws-sdk": "^2.7.0",
34-
"jest": "^23",
35-
"typedoc": "^0.11.0",
36-
"typescript": "^2.7"
34+
"jest": "^24",
35+
"typedoc": "^0.14.0",
36+
"typescript": "^3.4"
3737
},
3838
"peerDependencies": {
3939
"aws-sdk": "^2.7.0"
4040
},
4141
"dependencies": {
42-
"tslib": "^1.8.1",
42+
"tslib": "^1.9",
4343
"utf8-bytes": "^0.0.1"
4444
}
4545
}

packages/dynamodb-batch-iterator/src/BatchGet.spec.ts

+13-12
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { BatchGet, MAX_READ_BATCH_SIZE } from './BatchGet';
2-
import { AttributeMap, BatchGetItemOutput } from 'aws-sdk/clients/dynamodb';
2+
import {AttributeMap, BatchGetItemInput, BatchGetItemOutput} from 'aws-sdk/clients/dynamodb';
33

44
describe('BatchGet', () => {
55
const promiseFunc = jest.fn(() => Promise.resolve({
6-
UnprocessedItems: {}
7-
}));
6+
UnprocessedKeys: {}
7+
} as BatchGetItemOutput));
88
const mockDynamoDbClient = {
99
config: {},
1010
batchGetItem: jest.fn(() => ({promise: promiseFunc})),
11-
};
11+
} as any;
1212

1313
beforeEach(() => {
1414
promiseFunc.mockClear();
@@ -279,7 +279,7 @@ describe('BatchGet', () => {
279279
const buzz = { S: 'Static string' };
280280
const response: BatchGetItemOutput = {};
281281

282-
const {RequestItems} = mockDynamoDbClient.batchGetItem.mock.calls.slice(-1)[0][0];
282+
const {RequestItems} = (mockDynamoDbClient.batchGetItem.mock.calls.slice(-1)[0] as any)[0];
283283
for (const tableName of Object.keys(RequestItems)) {
284284
for (const item of RequestItems[tableName].Keys) {
285285
if (toBeFailed.has(item.fizz.N)) {
@@ -310,7 +310,7 @@ describe('BatchGet', () => {
310310
}
311311
}
312312

313-
return response;
313+
return Promise.resolve(response);
314314
});
315315

316316
const input = asyncInput
@@ -348,8 +348,7 @@ describe('BatchGet', () => {
348348
const {calls} = mockDynamoDbClient.batchGetItem.mock;
349349
expect(calls.length).toBe(Math.ceil(gets.length / MAX_READ_BATCH_SIZE));
350350

351-
352-
const callCount: {[key: string]: number} = calls.reduce(
351+
const callCount: {[key: string]: number} = (calls as Array<Array<BatchGetItemInput>>).reduce(
353352
(
354353
keyUseCount: {[key: string]: number},
355354
[{RequestItems}]
@@ -359,10 +358,12 @@ describe('BatchGet', () => {
359358
keys.push(...RequestItems[table].Keys);
360359
}
361360
for (const {fizz: {N: key}} of keys) {
362-
if (key in keyUseCount) {
363-
keyUseCount[key]++;
364-
} else {
365-
keyUseCount[key] = 1;
361+
if (key) {
362+
if (key in keyUseCount) {
363+
keyUseCount[key]++;
364+
} else {
365+
keyUseCount[key] = 1;
366+
}
366367
}
367368
}
368369

packages/dynamodb-batch-iterator/src/BatchWrite.spec.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { BatchWrite, MAX_WRITE_BATCH_SIZE } from './BatchWrite';
22
import { WriteRequest } from './types';
3-
import { BatchWriteItemOutput } from 'aws-sdk/clients/dynamodb';
3+
import {BatchWriteItemInput, BatchWriteItemOutput} from 'aws-sdk/clients/dynamodb';
44

55
describe('BatchWrite', () => {
66
const promiseFunc = jest.fn(() => Promise.resolve({
77
UnprocessedItems: {}
8-
}));
8+
} as BatchWriteItemOutput));
99
const mockDynamoDbClient = {
1010
config: {},
1111
batchWriteItem: jest.fn(() => ({promise: promiseFunc})),
@@ -138,10 +138,10 @@ describe('BatchWrite', () => {
138138
}
139139
}
140140

141-
promiseFunc.mockImplementation(() => {
141+
promiseFunc.mockImplementation(async () => {
142142
const response: BatchWriteItemOutput = {};
143143

144-
const {RequestItems} = mockDynamoDbClient.batchWriteItem.mock.calls.slice(-1)[0][0];
144+
const {RequestItems} = (mockDynamoDbClient.batchWriteItem.mock.calls.slice(-1)[0] as any)[0];
145145
for (const tableName of Object.keys(RequestItems)) {
146146
for (const {DeleteRequest, PutRequest} of RequestItems[tableName]) {
147147
const item = DeleteRequest ? DeleteRequest.Key : PutRequest.Item;
@@ -201,7 +201,7 @@ describe('BatchWrite', () => {
201201
expect(calls.length)
202202
.toBe(Math.ceil(writes.length / MAX_WRITE_BATCH_SIZE));
203203

204-
const callCount: {[key: string]: number} = calls.reduce(
204+
const callCount: {[key: string]: number} = (calls as Array<Array<BatchWriteItemInput>>).reduce(
205205
(
206206
keyUseCount: {[key: string]: number},
207207
[{RequestItems}]
@@ -210,7 +210,7 @@ describe('BatchWrite', () => {
210210
for (const {PutRequest, DeleteRequest} of RequestItems[table]) {
211211
let key = DeleteRequest
212212
? DeleteRequest.Key.fizz.N
213-
: PutRequest.Item.fizz.N;
213+
: (PutRequest as any).Item.fizz.N;
214214
if (key in keyUseCount) {
215215
keyUseCount[key]++;
216216
} else {

packages/dynamodb-data-mapper-annotations/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,28 @@
2222
"integ": "npm run pretest && jest --config=jest.integration.js",
2323
"prepublishOnly": "npm run build",
2424
"pretest": "tsc -p tsconfig.test.json",
25-
"test": "jest"
25+
"test": "jest \"build/(.+).spec.js\""
2626
},
2727
"author": {
2828
"name": "AWS SDK for JavaScript Team",
2929
"email": "[email protected]"
3030
},
3131
"license": "Apache-2.0",
3232
"devDependencies": {
33-
"@types/jest": "^23",
33+
"@types/jest": "^24",
3434
"@types/node": "^8.0.4",
3535
"@types/uuid": "^3.0.0",
3636
"aws-sdk": "^2.7.0",
37-
"jest": "^23",
38-
"typedoc": "^0.11.0",
39-
"typescript": "^2.7"
37+
"jest": "^24",
38+
"typedoc": "^0.14.0",
39+
"typescript": "^3.4"
4040
},
4141
"dependencies": {
4242
"@aws/dynamodb-auto-marshaller": "^0.7.1",
4343
"@aws/dynamodb-data-mapper": "^0.7.3",
4444
"@aws/dynamodb-data-marshaller": "^0.7.3",
4545
"reflect-metadata": "^0.1.10",
46-
"tslib": "^1.8.1",
46+
"tslib": "^1.9",
4747
"uuid": "^3.0.0"
4848
}
4949
}

packages/dynamodb-data-mapper-annotations/src/functional.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ describe('annotations', () => {
6666

6767
await mapper.put(post);
6868

69-
expect(mockDynamoDbClient.putItem.mock.calls[0][0])
69+
expect((mockDynamoDbClient.putItem.mock.calls[0] as any)[0])
7070
.toMatchObject({
7171
ConditionExpression: 'attribute_not_exists(#attr0)',
7272
ExpressionAttributeNames: {'#attr0': 'version'},

packages/dynamodb-data-mapper/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,28 @@
2222
"integ": "npm run pretest && jest --config=jest.integration.js",
2323
"prepublishOnly": "npm run build",
2424
"pretest": "tsc -p tsconfig.test.json",
25-
"test": "jest"
25+
"test": "jest \"build/(.+).spec.js\""
2626
},
2727
"author": {
2828
"name": "AWS SDK for JavaScript Team",
2929
"email": "[email protected]"
3030
},
3131
"license": "Apache-2.0",
3232
"devDependencies": {
33-
"@types/jest": "^23",
33+
"@types/jest": "^24",
3434
"@types/node": "^8.0.4",
3535
"aws-sdk": "^2.7.0",
36-
"jest": "^23",
37-
"typedoc": "^0.11.0",
38-
"typescript": "^2.7"
36+
"jest": "^24",
37+
"typedoc": "^0.14.0",
38+
"typescript": "^3.4"
3939
},
4040
"dependencies": {
4141
"@aws/dynamodb-auto-marshaller": "^0.7.1",
4242
"@aws/dynamodb-batch-iterator": "^0.7.1",
4343
"@aws/dynamodb-data-marshaller": "^0.7.3",
4444
"@aws/dynamodb-expressions": "^0.7.3",
4545
"@aws/dynamodb-query-iterator": "^0.7.1",
46-
"tslib": "^1.8.1"
46+
"tslib": "^1.9"
4747
},
4848
"peerDependencies": {
4949
"aws-sdk": "^2.7.0"

0 commit comments

Comments
 (0)