Skip to content

Conversation

@jordanverasamy
Copy link
Contributor

@jordanverasamy jordanverasamy commented Jan 14, 2026

Summary

Context: #6756 (comment)

Following up on #6756 which switched bulk uploads to use native FormData, this removes the form-data package entirely from cli-kit:

  • Remove form-data package from cli-kit dependencies (reduces bundle size)
  • Remove formData() export and FormData import from http.ts
  • Remove formData test from http.test.ts
  • Simplify uploadToGCS to not use FormData (it was being used incorrectly anyway - creating a FormData, appending data, but then sending raw buffer as the body with multipart headers)
  • Replace Headers type import from form-data with a minimal ResponseHeaders interface that works with both node-fetch and graphql-request

Tophatting

[wip]

Following the switch to native FormData in f08eeb4, this removes
the form-data dependency entirely from cli-kit:

- Remove form-data package from cli-kit dependencies
- Remove formData() export and FormData import from http.ts
- Remove formData test from http.test.ts
- Simplify uploadToGCS to not use FormData (was using it incorrectly anyway - sending raw buffer with multipart headers)
- Replace Headers type import from form-data with a minimal ResponseHeaders interface that works with both node-fetch and graphql-request

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@jordanverasamy jordanverasamy requested a review from a team as a code owner January 14, 2026 21:40
@github-actions
Copy link
Contributor

We detected some changes at packages/*/src and there are no updates in the .changeset.
If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.

Caution

DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.

@jordanverasamy jordanverasamy changed the title Remove form-data package from cli-kit Remove form-data package from cli-kit Jan 14, 2026
@jordanverasamy jordanverasamy changed the title Remove form-data package from cli-kit Remove form-data package from cli-kit entirely Jan 14, 2026
@jordanverasamy
Copy link
Contributor Author

jordanverasamy commented Jan 14, 2026

Aw, turns out we can't remove form-data from cli-kit yet.

@shopify/oxygen-cli still imports formData from @shopify/cli-kit/node/http. (See here.)

We'd need to update oxygen-cli to use native FormData first, then revisit this. 😭

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.

1 participant