Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

fix: 🐛 fix the issue 2667, do not mutate object given to options …#2668

Merged
ddelgrosso1 merged 3 commits intogoogleapis:mainfrom
gnekich:fix/issue-2667
Oct 29, 2025
Merged

fix: 🐛 fix the issue 2667, do not mutate object given to options …#2668
ddelgrosso1 merged 3 commits intogoogleapis:mainfrom
gnekich:fix/issue-2667

Conversation

@gnekich
Copy link
Contributor

@gnekich gnekich commented Oct 28, 2025

Resolves the issue #2667

Description

Instead of assigning argument passed to download to options doing Object.assing({}, options) before to copy the values.

Impact

Fixes bug.

Testing

It would be good to cover this with tests as it is trivial to test for this. So I added one for this method, and fixed one faulty one, that should have captured this before.

Checklist

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease
  • Appropriate docs were updated
  • Appropriate comments were added, particularly in complex areas or places that require background
  • No new warnings or issues will be generated from this change

Fixes #2667 🦕

@gnekich gnekich requested a review from a team October 28, 2025 22:37
@gnekich gnekich requested a review from a team as a code owner October 28, 2025 22:37
@google-cla
Copy link

google-cla bot commented Oct 28, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: storage Issues related to the googleapis/nodejs-storage API. labels Oct 28, 2025
@product-auto-label product-auto-label bot added size: s Pull request size is small. and removed size: xs Pull request size is extra small. labels Oct 28, 2025
@ddelgrosso1
Copy link
Contributor

@gnekich thank you for the contribution!

@ddelgrosso1 ddelgrosso1 added the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 29, 2025
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 29, 2025
@ddelgrosso1 ddelgrosso1 added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Oct 29, 2025
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 29, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 29, 2025
@eliekozah eliekozah self-requested a review October 29, 2025 14:11
@ddelgrosso1 ddelgrosso1 merged commit 8a9f259 into googleapis:main Oct 29, 2025
15 of 17 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: storage Issues related to the googleapis/nodejs-storage API. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

file download mutates options arguments

4 participants