Skip to content
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

Merged

Conversation

juanjoDiaz
Copy link
Contributor

Addresses: #7171

@juanjoDiaz juanjoDiaz force-pushed the remove_bluebird_plugins_create branch 4 times, most recently from ffab379 to fc14988 Compare February 24, 2021 22:12
@codecov
Copy link

codecov bot commented Feb 24, 2021

Codecov Report

Merging #8996 (cc70106) into master (2b40491) will decrease coverage by 0.02%.
The diff coverage is 93.15%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
scripts/serverless.js 73.80% <68.75%> (-0.84%) ⬇️
lib/plugins/create/create.js 90.00% <84.61%> (-0.70%) ⬇️
lib/cli/conditionally-load-dotenv.js 93.33% <93.33%> (ø)
lib/Serverless.js 93.52% <100.00%> (-0.40%) ⬇️
lib/cli/load-dotenv.js 94.11% <100.00%> (ø)
lib/configuration/variables/parse.js 100.00% <100.00%> (ø)
lib/configuration/variables/sources/file.js 100.00% <100.00%> (ø)
lib/plugins/plugin/install.js 98.57% <100.00%> (-0.03%) ⬇️
lib/plugins/plugin/lib/utils.js 97.05% <100.00%> (-0.24%) ⬇️
lib/plugins/plugin/list.js 100.00% <100.00%> (ø)
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2b40491...42ee29b. Read the comment docs.

Copy link
Contributor

@pgrzesik pgrzesik left a 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 {
};
Copy link
Contributor

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

@@ -233,7 +238,7 @@ class Create {

this.serverless.cli.log(`Generating boilerplate in "${newPath}"`);

fse.mkdirsSync(newPath);
await fse.mkdir(newPath);
Copy link
Contributor

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');
Copy link
Contributor

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

@juanjoDiaz
Copy link
Contributor Author

Good feedback!

Done :)

Copy link
Contributor

@pgrzesik pgrzesik left a 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 🙇

@pgrzesik pgrzesik changed the title refactor: Remove Bluebird from lib/plugins/create refactor: Remove bluebird from lib/plugins/create Feb 26, 2021
@pgrzesik pgrzesik merged commit 258543a into serverless:master Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants