Skip to content

Conversation

dplewis
Copy link
Member

@dplewis dplewis commented Apr 1, 2025

Pull Request

Issue

Parse.File.encodeBase64 accepts both number[] and Uint8Array but there is no way to pass Uint8Array to Parse.File.

There is also a flaky test #2530. I believe it occurs because those files are so small in size they save before you get a chance to cancel which causes the timeout.

Closes: #2530

Approach

  • Add check for Uint8Arrays
  • Fix flaky test

Tasks

  • Add tests
  • Add changes to documentation (guides, repository pages, code comments)

Copy link

parse-github-assistant bot commented Apr 1, 2025

🚀 Thanks for opening this pull request!

Copy link

codecov bot commented Apr 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (616eabd) to head (e28e867).
Report is 2 commits behind head on alpha.

Additional details and impacted files
@@            Coverage Diff            @@
##             alpha     #2548   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           64        64           
  Lines         6238      6238           
  Branches      1464      1452   -12     
=========================================
  Hits          6238      6238           

☔ 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 requested a review from a team April 1, 2025 20:31
@mtrezza mtrezza changed the title feat: Adds Uint8Array support for Parse.File feat: Add Uint8Array support for Parse.File Apr 7, 2025
@mtrezza mtrezza changed the title feat: Add Uint8Array support for Parse.File feat: Add Uint8Array support for Parse.File data Apr 7, 2025
@mtrezza mtrezza merged commit 6f6bb66 into parse-community:alpha Apr 7, 2025
12 checks passed
parseplatformorg pushed a commit that referenced this pull request Apr 7, 2025
# [6.2.0-alpha.1](6.1.1...6.2.0-alpha.1) (2025-04-07)

### Features

* Add `Uint8Array` support for `Parse.File` data ([#2548](#2548)) ([6f6bb66](6f6bb66))
@parseplatformorg
Copy link
Contributor

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

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Apr 7, 2025
@dplewis dplewis deleted the uint8array branch April 14, 2025 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released-alpha Released as alpha version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix flaky test Parse Dist Test parse.js / parse.min.js can cancel save file with uri
3 participants