New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(bluebird): remove Bluebird.bind #3477
Conversation
@@ -475,7 +474,7 @@ class Migrator { | |||
_waterfallBatch(batchNo, migrations, direction, trx) { | |||
const trxOrKnex = trx || this.knex; | |||
const { tableName, schemaName, disableTransactions } = this.config; | |||
let current = Bluebird.bind({ failed: false, failedOn: 0 }); | |||
let current = Promise.resolve(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are those fields not used anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't found any usages in project
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7a6937f first revision where failedOn exists, i think it just partially implemented feature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, guess we can drop it.
Sorry, there is a merge conflict now after refactoring of a seeder. Could you resolve them? |
Ok, i will resolve it later |
b5d15cf
to
9382295
Compare
@@ -28,7 +20,7 @@ class Seeder { | |||
// Runs seed files for the given environment. | |||
async run(config) { | |||
this.config = this.setConfig(config); | |||
const [all] = await this._seedData(); | |||
const all = await this._listAll(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will types changed in https://github.com/knex/knex/pull/3438/files still be correct after this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_seedData is just _listAll, but wrapping result inside promise into []
@@ -103,22 +85,14 @@ class Seeder { | |||
); | |||
} | |||
|
|||
// Generates the stub template for the current seed file, returning a compiled template. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lorefnon I assume we stopped using it after your refactoring?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, i moved the lodash template usage to a shared utility which we can potentially use from other places as well.
@maximelkin Merged your other PR, that seems to have introduced a minor conflict as well. |
5886a20
to
5e9343e
Compare
@kibertoad done |
No description provided.