Skip to content

Commit 445efc3

Browse files
committed
fix: Fixes retrieval of last batch keys.
1 parent ca275a7 commit 445efc3

File tree

5 files changed

+43
-6
lines changed

5 files changed

+43
-6
lines changed

package-lock.json

Lines changed: 32 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@
3636
"@types/lodash": "4.14.104",
3737
"@types/mocha": "2.2.48",
3838
"@types/node": "8.9.5",
39+
"@types/source-map-support": "0.4.0",
3940
"assert-rejects": "0.1.1",
4041
"jscpd": "0.6.17",
4142
"mocha": "4.1.0",
4243
"nyc": "11.6.0",
43-
"rimraf": "2.6.2"
44+
"rimraf": "2.6.2",
45+
"source-map-support": "0.5.3"
4446
},
4547
"publishConfig": {
4648
"access": "public"

src/factory.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import * as sourceMapSupport from 'source-map-support';
2+
sourceMapSupport.install();
3+
14
import factoryTest from './factoryTest';
25
import ProcessedMigration from './utils/types/ProcessedMigration';
36

src/utils/getLastBatchKeys.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ export default async (config: FacadeConfig) => {
1111
return [];
1212
}
1313

14+
const lastBatchIsoStart = lastBatchStart.toISOString();
1415
const lastBatchMigrations = processedMigrations.filter((migration) => {
15-
return migration.lastBatch === lastBatchStart;
16+
return migration.lastBatch.toISOString() === lastBatchIsoStart;
1617
});
1718
return lastBatchMigrations.map((migration) => migration.key);
1819
};

tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
"typeRoots": [
77
"./@types",
88
"./node_modules/@types"
9+
],
10+
"lib": [
11+
"ES2015"
912
]
1013
},
1114
"includes": [

0 commit comments

Comments
 (0)