Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade file-type #8111

Closed
benmccann opened this issue Sep 7, 2024 · 5 comments
Closed

Upgrade file-type #8111

benmccann opened this issue Sep 7, 2024 · 5 comments
Assignees

Comments

@benmccann
Copy link

Link to reproduction

"file-type": "17.1.6",

Environment Info

beta.100

Describe the Bug

payload 3 currently uses file-type 17 while the latest is file-type 19. The newer version is smaller and would remove a couple of transitive dependencies

Reproduction Steps

See

"file-type": "17.1.6",

Adapters and Plugins

No response

@benmccann benmccann added status: needs-triage Possible bug which hasn't been reproduced yet v3 labels Sep 7, 2024
@github-actions github-actions bot removed the status: needs-triage Possible bug which hasn't been reproduced yet label Sep 8, 2024
@AlessioGr
Copy link
Member

AlessioGr commented Sep 13, 2024

I'll upgrade this to file-type 19.3.0. Cannot upgrade to the latest (file-type 19.4.0 and higher) because of the following:

Damn I wish there was a way to add comments to package.json's to document these decisions

@benmccann
Copy link
Author

that's awesome!! thank you!

Damn I wish there was a way to add comments to package.json's to document these decisions

there is, but it's really hacky...

"comment": "we use version 19.3 of file-type because..."

AlessioGr added a commit that referenced this issue Sep 15, 2024
Fixes #8111 and
#8113

Before: 132 dependencies
After: 123 dependencies

This PR also contains a small performance optimization during telemetry
startup: By using the async `fs.promises.readFile` instead of
`readFileSync` we're not blocking the entire thread anymore and are
allowing other stuff to happen while the file is being read.
Also, in our dependency checker, this moves some variables out of loops,
to the module scope, as they only need to be calculated once.

We have to pin file-type to 19.3.0 and cannot upgrade it further (latest
is 19.5.0). See reasoning in
#8111 (comment)
@AlessioGr
Copy link
Member

Fixed by #8195

there is, but it's really hacky...

"comment": "we use version 19.3 of file-type because..."

Yeea that might be a bit too hacky - I'm hoping for jsonc support or something like that to be added in the future!

Copy link
Contributor

🚀 This is included in version v3.0.0-beta.107

Copy link
Contributor

This issue has been automatically locked.
Please open a new issue if this issue persists with any additional detail.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants