Skip to content

Conversation

@KhafraDev
Copy link
Member

@KhafraDev KhafraDev commented Mar 18, 2023

Undici has been using the native File class by default for over 3 months now, and we haven't had a single issue reported about it or using it with fetch/FormData. It's a very small wrapper around Blob too, I don't personally see much reason in keeping a class with 2 additional properties experimental.

I based this commit heavily on jasnell's which made Blob global, lmk if I'm missing something

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/startup

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Mar 18, 2023
@targos targos added the semver-major PRs that contain breaking changes and should be released in the next major version. label Mar 19, 2023
@KhafraDev KhafraDev mentioned this pull request Mar 20, 2023
@anonrig
Copy link
Member

anonrig commented Mar 20, 2023

@nodejs/tsc @nodejs/buffer Can you review please?

@anonrig anonrig added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label Mar 20, 2023
@anonrig anonrig added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Mar 20, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 20, 2023
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@GeoffreyBooth GeoffreyBooth left a comment

Choose a reason for hiding this comment

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

Does its API match the browser counterpart? Assuming it does, this seems fine to me.

@nodejs-github-bot
Copy link
Collaborator

@anonrig anonrig added the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 21, 2023
@KhafraDev
Copy link
Member Author

Does its API match the browser counterpart? Assuming it does, this seems fine to me.

yes it's a 1:1 match

@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Mar 21, 2023
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/47153
✔  Done loading data for nodejs/node/pull/47153
----------------------------------- PR info ------------------------------------
Title      buffer: graduate File from experimental and expose as global (#47153)
Author     Khafra  (@KhafraDev)
Branch     KhafraDev:make-file-global -> nodejs:main
Labels     semver-major, author ready, needs-ci, commit-queue-squash
Commits    2
 - buffer: graduate File from experimental and expose as global
 - doc: apply suggestions from code review
Committers 1
 - Khafra <42794878+KhafraDev@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/47153
Reviewed-By: Yagiz Nizipli 
Reviewed-By: Matteo Collina 
Reviewed-By: Geoffrey Booth 
Reviewed-By: Robert Nagy 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/47153
Reviewed-By: Yagiz Nizipli 
Reviewed-By: Matteo Collina 
Reviewed-By: Geoffrey Booth 
Reviewed-By: Robert Nagy 
--------------------------------------------------------------------------------
   ℹ  This PR was created on Sat, 18 Mar 2023 21:34:05 GMT
   ✔  Approvals: 4
   ✔  - Yagiz Nizipli (@anonrig): https://github.com/nodejs/node/pull/47153#pullrequestreview-1349416220
   ✔  - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/47153#pullrequestreview-1349430849
   ✔  - Geoffrey Booth (@GeoffreyBooth) (TSC): https://github.com/nodejs/node/pull/47153#pullrequestreview-1349668541
   ✔  - Robert Nagy (@ronag) (TSC): https://github.com/nodejs/node/pull/47153#pullrequestreview-1350351079
   ✘  Last GitHub CI failed
   ℹ  Last Full PR CI on 2023-03-21T12:31:57Z: https://ci.nodejs.org/job/node-test-pull-request/50514/
- Querying data for job/node-test-pull-request/50514/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/4482731187

@nodejs-github-bot
Copy link
Collaborator

Copy link
Contributor

@aduh95 aduh95 left a comment

Choose a reason for hiding this comment

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

We should remove the following in a follow up PR:

runner.setInitScript(`
const { File } = require('buffer');
globalThis.File = File;
`);

@aduh95 aduh95 added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Mar 22, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 22, 2023
@nodejs-github-bot nodejs-github-bot merged commit 7bc0e6a into nodejs:main Mar 22, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in 7bc0e6a

@babakfp

This comment was marked as abuse.

@babakfp

This comment was marked as abuse.

@KhafraDev
Copy link
Member Author

We don't implement HTML forms https://wicg.github.io/entries-api/#dom-file-webkitrelativepath

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

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run. semver-major PRs that contain breaking changes and should be released in the next major version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants