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/plugin #8984

Merged

Conversation

juanjoDiaz
Copy link
Contributor

Addresses: #7171

I'll keep them coming

@codecov
Copy link

codecov bot commented Feb 22, 2021

Codecov Report

Merging #8984 (fe7b203) into master (4f64e56) will increase coverage by 0.70%.
The diff coverage is 98.29%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
lib/configSchema.js 100.00% <ø> (ø)
lib/plugins/aws/provider.js 94.85% <ø> (ø)
.../templates/aws-nodejs-typescript/webpack.config.js 0.00% <ø> (ø)
scripts/serverless.js 74.64% <54.16%> (-10.46%) ⬇️
lib/plugins/aws/package/compile/events/httpApi.js 92.35% <83.33%> (-0.33%) ⬇️
...ns/aws/package/compile/events/eventBridge/utils.js 94.11% <94.11%> (ø)
...iguration/variables/humanize-property-path-keys.js 100.00% <100.00%> (ø)
lib/configuration/variables/parse.js 100.00% <100.00%> (ø)
lib/configuration/variables/resolve-meta.js 100.00% <100.00%> (ø)
lib/configuration/variables/resolve.js 100.00% <100.00%> (ø)
... and 27 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 4f64e56...c2d0cb0. 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 🙇 It looks good overall, I only have a few minor comments, please let me know what do you think

await this.addPluginToServerlessFile();
await this.installPeerDependencies();

const message = [
Copy link
Contributor

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.


// install the package through npm
const pluginFullName = `${this.options.pluginName}@${this.options.pluginVersion}`;
const message = [
Copy link
Contributor

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.

this.serverless.cli.log(message);
});
});
await this.validate();
Copy link
Contributor

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

Copy link
Contributor

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

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

@juanjoDiaz
Copy link
Contributor Author

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.

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 💯

this.serverless.cli.log(message);
});
});
await this.validate();
Copy link
Contributor

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

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, looks great 🙌

@pgrzesik pgrzesik changed the title refactor: Remove Bluebird from lib/plugins/plugin refactor: Remove bluebird from lib/plugins/plugin Feb 25, 2021
@pgrzesik pgrzesik merged commit 9e79602 into serverless:master Feb 25, 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