-
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/create
#8996
refactor: Remove bluebird
from lib/plugins/create
#8996
Conversation
ffab379
to
fc14988
Compare
Codecov Report
@@ Coverage Diff @@
## master #8996 +/- ##
==========================================
- Coverage 87.03% 87.00% -0.03%
==========================================
Files 285 286 +1
Lines 10917 10938 +21
==========================================
+ Hits 9502 9517 +15
- Misses 1415 1421 +6
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 - great work. I've added only a few comments, please let me know what do you think and after minor adjustments we should be ready to wrap this one up 💯
@@ -144,34 +144,39 @@ class Create { | |||
}; |
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.
Let's get rid of this instance of BbPromise
as well
lib/plugins/create/create.js
Outdated
@@ -233,7 +238,7 @@ class Create { | |||
|
|||
this.serverless.cli.log(`Generating boilerplate in "${newPath}"`); | |||
|
|||
fse.mkdirsSync(newPath); | |||
await fse.mkdir(newPath); |
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.
Is it safe here to use mkdir
instead of mkdirs
? I believe we should avoid such changes as it might break if newPath
requires creating whole dir structure
@@ -9,9 +9,11 @@ const Serverless = require('../../../../../lib/Serverless'); | |||
const sinon = require('sinon'); | |||
const walkDirSync = require('../../../../../lib/utils/fs/walkDirSync'); | |||
const download = require('../../../../../lib/utils/downloadTemplateFromRepo'); | |||
const { ServerlessError } = require('../../../../../lib/classes/Error'); |
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.
let's import from lib/serverless-error
instead of lib/classes/Error
- Error
module is going to be deprecated at some point in the future
fc14988
to
42ee29b
Compare
Good feedback! 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.
Awesome work @juanjoDiaz 🥳 Thank you so much for pushing Bluebird
refactoring at such great pace 🙇
lib/plugins/create
bluebird
from lib/plugins/create
Addresses: #7171