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: Replace _.flatMap with Array.prototype.flatMap #11272

Merged
merged 4 commits into from Jul 28, 2022
Merged

refactor: Replace _.flatMap with Array.prototype.flatMap #11272

merged 4 commits into from Jul 28, 2022

Conversation

pjmattingly
Copy link
Contributor

Addresses: #7747

@pjmattingly
Copy link
Contributor Author

When addressing #7747 for _.flatmap, I noted that there were additional lodash calls that seemed similar. Both _.flattenDeep() and _.flattenDepth() can be replaced with Array.prototype.flat(); And so I took the liberty of making those small changes as well.

@pjmattingly pjmattingly mentioned this pull request Jul 24, 2022
54 tasks
@codecov
Copy link

codecov bot commented Jul 24, 2022

Codecov Report

Merging #11272 (d29f3d5) into main (2ac55b0) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main   #11272      +/-   ##
==========================================
- Coverage   85.89%   85.87%   -0.02%     
==========================================
  Files         315      315              
  Lines       13247    13273      +26     
==========================================
+ Hits        11378    11398      +20     
- Misses       1869     1875       +6     
Impacted Files Coverage Δ
...ts/api-gateway/lib/hack/disassociate-usage-plan.js 100.00% <ø> (ø)
lib/cli/commands-schema/resolve-final.js 90.74% <100.00%> (ø)
lib/plugins/aws/invoke-local/index.js 69.87% <100.00%> (ø)
lib/plugins/aws/package/compile/events/http-api.js 96.65% <0.00%> (-0.05%) ⬇️
lib/cli/triage.js 91.34% <0.00%> (ø)
...ns/aws/package/compile/events/cognito-user-pool.js 100.00% <0.00%> (ø)
...urces/resources/cognito-user-pool/lib/user-pool.js 0.00% <0.00%> (ø)
...ib/plugins/aws/custom-resources/resources/utils.js 25.45% <0.00%> (+1.38%) ⬆️

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 2ac55b0...d29f3d5. 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.

Thanks @pjmattingly 🙇 I have one comment, please let me know what do you think

lib/plugins/aws/invoke-local/index.js Outdated Show resolved Hide resolved
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.

Well done @pjmattingly 👏 Thank you 🙇

@pgrzesik pgrzesik changed the title Addressing-#7747;-Replace-_.flatMap-with-array.flatMap refactor: Replace _.flatMap with Array.prototype.flatMap Jul 28, 2022
@pgrzesik pgrzesik merged commit 4f7e129 into serverless:main Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants