Comparing version 5.1.8 to 5.1.9
@@ -8,5 +8,5 @@ const { find, findLast } = require("lodash"); | ||
module.exports = async db => { | ||
await beforeDir.shouldExist(); | ||
// await beforeDir.shouldExist(); | ||
await migrationsDir.shouldExist(); | ||
await afterDir.shouldExist(); | ||
// await afterDir.shouldExist(); | ||
await configFile.shouldExist(); | ||
@@ -19,8 +19,8 @@ | ||
const beforeFileNames = await beforeDir.getFileNames(); | ||
const beforeItems = beforeFileNames.map(fileName => { | ||
const itemInLog = findLast(changelog, { fileName }); | ||
const appliedAt = itemInLog ? itemInLog.appliedAt.toJSON() : "PENDING"; | ||
return { type: "ALWAYS_BEFORE", fileName, appliedAt }; | ||
}); | ||
// const beforeFileNames = await beforeDir.getFileNames(); | ||
// const beforeItems = beforeFileNames.map(fileName => { | ||
// const itemInLog = findLast(changelog, { fileName }); | ||
// const appliedAt = itemInLog ? itemInLog.appliedAt.toJSON() : "PENDING"; | ||
// return { type: "ALWAYS_BEFORE", fileName, appliedAt }; | ||
// }); | ||
@@ -34,11 +34,11 @@ const migrationFileNames = await migrationsDir.getFileNames(); | ||
const afterFileNames = await afterDir.getFileNames(); | ||
const afterItems = afterFileNames.map(fileName => { | ||
const itemInLog = findLast(changelog, { fileName }); | ||
const appliedAt = itemInLog ? itemInLog.appliedAt.toJSON() : "PENDING"; | ||
return { type: "ALWAYS_AFTER", fileName, appliedAt }; | ||
}); | ||
// const afterFileNames = await afterDir.getFileNames(); | ||
// const afterItems = afterFileNames.map(fileName => { | ||
// const itemInLog = findLast(changelog, { fileName }); | ||
// const appliedAt = itemInLog ? itemInLog.appliedAt.toJSON() : "PENDING"; | ||
// return { type: "ALWAYS_AFTER", fileName, appliedAt }; | ||
// }); | ||
const statusTable = beforeItems.concat(migrationItems).concat(afterItems); | ||
const statusTable = migrationItems; | ||
return statusTable; | ||
}; |
{ | ||
"name": "mongo-up-1", | ||
"version": "5.1.8", | ||
"version": "5.1.9", | ||
"description": "A database migration tool for MongoDB in Node", | ||
@@ -5,0 +5,0 @@ "main": "lib/mongo-up.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
101239