Skip to content

Conversation

dplewis
Copy link
Member

@dplewis dplewis commented Mar 14, 2025

Pull Request

Issue

Fetch API is the successor of XMLHTTPRequest. The xmlhttprequest package used in the SDK hasn't been updated in 7 years.

https://blog.logrocket.com/fetch-api-node-js/

Closes: #2498

Approach

  • Remove dependency on xmlhttprequest
  • Add new feature to allow upload and download file progress in both browser and node. Previously it was only upload progress on browser.
  • Add tests
  • Add changes to documentation (guides, repository pages, code comments)

Copy link

parse-github-assistant bot commented Mar 14, 2025

🚀 Thanks for opening this pull request!

@dplewis dplewis marked this pull request as draft March 14, 2025 02:41
Copy link

codecov bot commented Apr 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (b78e9aa) to head (755df3f).
⚠️ Report is 116 commits behind head on alpha.

Additional details and impacted files
@@            Coverage Diff            @@
##             alpha     #2503   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           64        63    -1     
  Lines         6238      6167   -71     
  Branches      1450      1464   +14     
=========================================
- Hits          6238      6167   -71     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dplewis dplewis marked this pull request as ready for review April 15, 2025 16:51
@dplewis dplewis requested a review from a team April 15, 2025 16:52
@dplewis
Copy link
Member Author

dplewis commented Apr 16, 2025

@mtrezza This is ready for review

Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

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

Is this PR a breaking change?

@mtrezza mtrezza changed the title feat: Replace XMLHttpRequest with Fetch API feat: Add Parse.File upload and download progress in browser and Node.js environments Apr 23, 2025
@mtrezza
Copy link
Member

mtrezza commented Apr 23, 2025

I've changed the PR title in an attempt to make a more meaningful change log entry. Does this look good, or is there anything else to add?

@mtrezza mtrezza changed the title feat: Add Parse.File upload and download progress in browser and Node.js environments feat: Add Parse.File upload and download progress in browser and Node environments Apr 23, 2025
@dplewis
Copy link
Member Author

dplewis commented Apr 23, 2025

This is good! FYI the Parse server test suite will break when we merge because it mocks Fetch and doesn’t clean up the global scope after each test

@mtrezza
Copy link
Member

mtrezza commented Apr 23, 2025

OK, but this PR itself isn't a breaking change for developers, who are using the existing APIs, right? Just making sure before we merge.

@dplewis
Copy link
Member Author

dplewis commented Apr 23, 2025

That is correct, doesn’t break for devs

@mtrezza mtrezza merged commit d3ca465 into parse-community:alpha Apr 23, 2025
12 checks passed
@dplewis dplewis deleted the fetch-api branch May 6, 2025 18:53
parseplatformorg pushed a commit that referenced this pull request Oct 14, 2025
# [7.0.0-alpha.1](6.2.0-alpha.3...7.0.0-alpha.1) (2025-10-14)

### Bug Fixes

*  Prototype Pollution vulnerability in `SingleInstanceStateController`; fixes security vulnerability [GHSA-9g8m-v378-pcg3](GHSA-9g8m-v378-pcg3) ([#2745](#2745)) ([9e7c1ba](9e7c1ba))
* HTTP status code 3XX redirection for Parse Server URL not handled properly ([#2608](#2608)) ([58e7f58](58e7f58))
* Incorrect type in `ParseObject.fetch` parameter `options` ([#2726](#2726)) ([dc78419](dc78419))
* Prototype pollution in `Parse.Object` and internal APIs; fixes security vulnerability [GHSA-9f2h-7v79-mxw](GHSA-9f2h-7v79-mxw3) ([#2749](#2749)) ([0097398](0097398))
* Unhandled exception when calling `Parse.Cloud.run` with option value `null` ([#2622](#2622)) ([#2623](#2623)) ([2818ed9](2818ed9))

### Features

* Add `Parse.File` upload and download progress in browser and Node environments ([#2503](#2503)) ([d3ca465](d3ca465))
* Add option `Parse.nodeLogging` to fully log `Parse.Object` in Node.js environments ([#1594](#1594)) ([de9d057](de9d057))
* Remove `Parse.serverAuthType`, `Parse.serverAuthToken` infavor of CoreManager `REQUEST_HEADERS` config ([#2639](#2639)) ([ddc66a1](ddc66a1))

### BREAKING CHANGES

* The methods `Parse.serverAuthType()` and `Parse.serverAuthToken()` have been removed; use the CoreManager `REQUEST_HEADER` config to set authorization headers instead. ([ddc66a1](ddc66a1))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 7.0.0-alpha.1

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Oct 14, 2025
parseplatformorg pushed a commit that referenced this pull request Oct 14, 2025
# [7.0.0](6.1.1...7.0.0) (2025-10-14)

### Bug Fixes

*  Prototype Pollution vulnerability in `SingleInstanceStateController`; fixes security vulnerability [GHSA-9g8m-v378-pcg3](GHSA-9g8m-v378-pcg3) ([#2745](#2745)) ([9e7c1ba](9e7c1ba))
* HTTP status code 3XX redirection for Parse Server URL not handled properly ([#2608](#2608)) ([58e7f58](58e7f58))
* Incorrect type in `ParseObject.fetch` parameter `options` ([#2726](#2726)) ([dc78419](dc78419))
* Missing error message when returning an internal server error ([#2543](#2543)) ([f91f3f1](f91f3f1))
* Prototype pollution in `Parse.Object` and internal APIs; fixes security vulnerability [GHSA-9f2h-7v79-mxw](GHSA-9f2h-7v79-mxw3) ([#2749](#2749)) ([0097398](0097398))
* Unhandled exception when calling `Parse.Cloud.run` with option value `null` ([#2622](#2622)) ([#2623](#2623)) ([2818ed9](2818ed9))

### Features

* Add `Parse.File` upload and download progress in browser and Node environments ([#2503](#2503)) ([d3ca465](d3ca465))
* Add `Uint8Array` support for `Parse.File` data ([#2548](#2548)) ([6f6bb66](6f6bb66))
* Add option `Parse.nodeLogging` to fully log `Parse.Object` in Node.js environments ([#1594](#1594)) ([de9d057](de9d057))
* Remove `Parse.serverAuthType`, `Parse.serverAuthToken` infavor of CoreManager `REQUEST_HEADERS` config ([#2639](#2639)) ([ddc66a1](ddc66a1))

### Performance Improvements

* Optimize bundle packaging with Vite ([#2553](#2553)) ([a4b19e5](a4b19e5))

### BREAKING CHANGES

* The methods `Parse.serverAuthType()` and `Parse.serverAuthToken()` have been removed; use the CoreManager `REQUEST_HEADER` config to set authorization headers instead. ([ddc66a1](ddc66a1))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 7.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:released Released as stable version state:released-alpha Released as alpha version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace XMLHttpRequest with Fetch API

3 participants