Skip to content

docs: add missing fs import to README stream example - #11113

Merged
jasonsaayman merged 1 commit into
axios:v1.xfrom
Sasireddy001:docs/readme-stream-fs-import-signed
Jul 29, 2026
Merged

jasonsaayman merged 1 commit into
axios:v1.xfrom
Sasireddy001:docs/readme-stream-fs-import-signed

Conversation

@Sasireddy001

@Sasireddy001 Sasireddy001 commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Adds the missing fs import to the GET request for remote image in node.js example in README.md. Copy-pasting the current snippet without the import throws ReferenceError: fs is not defined. Replaces #11111.


Summary by cubic

Fix the README Node.js GET image example by adding the missing fs import so the snippet runs without errors. No runtime or API changes.

Description

  • Summary of changes: Add import fs from 'fs'; to the Node.js GET image example in README.
  • Reasoning: Prevents "ReferenceError: fs is not defined" when copy-pasting the snippet.
  • Additional context: README-only update.

Docs
Please update the equivalent snippet in /docs/ to include import fs from 'fs'; so it matches the README.

Testing
No tests changed. Not needed for a docs-only update.

Semantic version impact
Patch — documentation update only.

Written for commit f7b005f. Summary will update on new commits.

Review in cubic

Re-targeted from main to �1.x and updated CI action pins for the �1.x workflow.

@Sasireddy001
Sasireddy001 force-pushed the docs/readme-stream-fs-import-signed branch from 6c52c6e to f18de29 Compare July 29, 2026 17:50
@greptile-apps

greptile-apps Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

Greptile Summary

Fixes the Node.js image-stream README example.

  • Adds the missing fs import required by fs.createWriteStream.
  • Makes the complete example runnable when copied from the README.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

T-Rex T-Rex Logs

What T-Rex did

  • I ran the local fixture-image validation and observed that before the change the snippet without the new import failed at fs.createWriteStream and did not create a file.
  • After applying the changes, the validation succeeded: GET /fixture-image returned 200, Axios reported status 200, the child process exited 0, and the generated 40-byte file exactly matched the fixture hash.
  • No tracked README working-tree changes were introduced during validation.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
README.md Adds the required Node.js fs import to the remote-image streaming example.

Reviews (2): Last reviewed commit: "docs(readme): add fs import to Node.js G..." | Re-trigger Greptile

@Sasireddy001
Sasireddy001 force-pushed the docs/readme-stream-fs-import-signed branch from f18de29 to f7b005f Compare July 29, 2026 18:03
@jasonsaayman jasonsaayman added the commit::docs The PR is related to docs label Jul 29, 2026
@jasonsaayman
jasonsaayman merged commit 529ce70 into axios:v1.x Jul 29, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commit::docs The PR is related to docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants