Skip to content

docs: add gaxios and node 18 migration guide#15

Open
thiyaguk09 wants to merge 31 commits into
storage-node-18from
docs/gaxios-migration-guide
Open

docs: add gaxios and node 18 migration guide#15
thiyaguk09 wants to merge 31 commits into
storage-node-18from
docs/gaxios-migration-guide

Conversation

@thiyaguk09
Copy link
Copy Markdown
Owner

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • 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 (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

…sport (googleapis#8283)

- Remove Service.ts and common.ts files from handwritten/storage

- Migrate remaining functionality to StorageTransport

- chore(ci): upgrade conformance tests to Node 18
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a migration guide for transitioning from @google-cloud/storage v7 to v8, detailing breaking changes such as the shift to standard Headers objects and updated URL resolution logic. The review feedback identifies syntax errors in the documentation's code examples where variable shadowing would cause a ReferenceError and suggests adding context regarding Node.js 18 requirements and its relationship to native web APIs.

Comment thread handwritten/storage/MIGRATION.md Outdated
Comment thread handwritten/storage/MIGRATION.md Outdated
Comment thread handwritten/storage/MIGRATION.md Outdated
@thiyaguk09 thiyaguk09 force-pushed the docs/gaxios-migration-guide branch from 15bf4ba to 3b2a681 Compare May 20, 2026 12:55

### 2. Passing Headers in Options

If you pass custom headers in options to Storage methods (which extend `GaxiosOptions`), you can still pass plain objects, as the Storage library will convert them to standard `Headers` internally for the request. However, if you read them back from the prepared options or response, they will be `Headers` objects.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add examples for 2 and 3 as well

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added


## Troubleshooting

- If you encounter `undefined` when accessing headers on the response object, ensure you are using `apiResponse.headers.get('header-name')`.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gaxios is indirect dependency?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, it's direct dependency.

…sport (googleapis#8283)

- Remove Service.ts and common.ts files from handwritten/storage

- Migrate remaining functionality to StorageTransport

- chore(ci): upgrade conformance tests to Node 18
@thiyaguk09 thiyaguk09 requested a review from gurusai-voleti May 21, 2026 07:12
…sport (googleapis#8283)

- Remove Service.ts and common.ts files from handwritten/storage

- Migrate remaining functionality to StorageTransport

- chore(ci): upgrade conformance tests to Node 18
…sport (googleapis#8283)

- Remove Service.ts and common.ts files from handwritten/storage

- Migrate remaining functionality to StorageTransport

- chore(ci): upgrade conformance tests to Node 18
…sport (googleapis#8283)

- Remove Service.ts and common.ts files from handwritten/storage

- Migrate remaining functionality to StorageTransport

- chore(ci): upgrade conformance tests to Node 18
…sport (googleapis#8283)

- Remove Service.ts and common.ts files from handwritten/storage

- Migrate remaining functionality to StorageTransport

- chore(ci): upgrade conformance tests to Node 18
…sport (googleapis#8283)

- Remove Service.ts and common.ts files from handwritten/storage

- Migrate remaining functionality to StorageTransport

- chore(ci): upgrade conformance tests to Node 18
…sport (googleapis#8283)

- Remove Service.ts and common.ts files from handwritten/storage

- Migrate remaining functionality to StorageTransport

- chore(ci): upgrade conformance tests to Node 18
…sport (googleapis#8283)

- Remove Service.ts and common.ts files from handwritten/storage

- Migrate remaining functionality to StorageTransport

- chore(ci): upgrade conformance tests to Node 18
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.

2 participants