-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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: Remove bluebird
from lib/plugins/plugin
#8984
refactor: Remove bluebird
from lib/plugins/plugin
#8984
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8984 +/- ##
==========================================
+ Coverage 86.31% 87.02% +0.70%
==========================================
Files 274 285 +11
Lines 10241 10902 +661
==========================================
+ Hits 8840 9487 +647
- Misses 1401 1415 +14
Continue to review full report at Codecov.
|
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.
Thank you @juanjoDiaz 🙇 It looks good overall, I only have a few minor comments, please let me know what do you think
lib/plugins/plugin/install.js
Outdated
await this.addPluginToServerlessFile(); | ||
await this.installPeerDependencies(); | ||
|
||
const message = [ |
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 know it's not strictly part of BbPromise
refactoring, but while we're at it - could you also simplify construction of that message? I don't think we need join
here and putting it all in one line should be okay.
lib/plugins/plugin/install.js
Outdated
|
||
// install the package through npm | ||
const pluginFullName = `${this.options.pluginName}@${this.options.pluginVersion}`; | ||
const message = [ |
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 know it's not strictly part of BbPromise
refactoring, but while we're at it - could you also simplify construction of that message? I don't think we need join
here and putting it all in one line should be okay.
lib/plugins/plugin/install.js
Outdated
this.serverless.cli.log(message); | ||
}); | ||
}); | ||
await this.validate(); |
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.
does it have to be awaited? I believe it does not return a Promise after your changes in utils.js
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 think this wasn't addressed
@@ -62,7 +66,7 @@ describe('PluginInstall', () => { | |||
let installStub; | |||
|
|||
beforeEach(() => { | |||
installStub = sinon.stub(pluginInstall, 'install').returns(BbPromise.resolve()); | |||
installStub = sinon.stub(pluginInstall, 'install').returns(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.
can we replace it with .resolves
instead of returns(Promise.resolve())
? It is repeated in a few other places as well
629fe97
to
f9c4295
Compare
Done! |
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.
thank you @juanjoDiaz 🙇 I believe there's one comment that wasn't addressed - it's a minor thing and after that we should be good to go 💯
lib/plugins/plugin/install.js
Outdated
this.serverless.cli.log(message); | ||
}); | ||
}); | ||
await this.validate(); |
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 think this wasn't addressed
f9c4295
to
c2d0cb0
Compare
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.
Thank you @juanjoDiaz, looks great 🙌
lib/plugins/plugin
bluebird
from lib/plugins/plugin
Addresses: #7171
I'll keep them coming