jimp-dev / jimp-dev/jimp

feat: Update file-type to the latest version to avoid build errors caused by using eval in the old version.

Open
#1,361 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
14.7k
Forks
777
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**

When building a project with Vite, this error warning always appears.
image

**Describe the solution you'd like**
Upgrade to file-type@19.6.0

**Describe alternatives you've considered**
The local testing results using pnpm overrides + patch are good.

package.json

```json
{
"pnpm": {
"overrides": {
"file-type": "^19.6.0"
}
}
}
```

@jimp/core/es/utils/image-bitmap.js

image

**Additional context**
Add any other context or screenshots about the feature request here.

---

Update, since file-type@19.6.0 is clearly esm only, and tshy does not support the feature of dynamic imports, for example, the same import has different bundles under different formats, which is very annoying...

https://github.com/isaacs/tshy/issues/50

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.