-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
fix: pin Sharp at old version #9653
Conversation
🦋 Changeset detectedLatest commit: 7ae82b9 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
!preview pin-sharp |
Snapshots have been released for the following packages:
Publish Log
Build Log
|
!preview pin-sharp |
Snapshots have been released for the following packages:
Publish Log
Build Log
|
!preview pin-sharp |
Snapshots have been released for the following packages:
Publish Log
Build Log
|
packages/astro/package.json
Outdated
@@ -179,7 +179,7 @@ | |||
"zod": "^3.22.4" | |||
}, | |||
"optionalDependencies": { | |||
"sharp": "^0.33.1" | |||
"sharp": "0.32.6" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sucks, because users have to do a manual override to use newer versions, but unfortunately, I couldn't figure it out. The semver checks in Sharp cannot really be relaxed, because it (very understandably so) depends on the newer Node API 9. This is a shame because 0.33.0
is otherwise a very very good upgrade making installation much much less troublesome.
Now that Node 20 is the LTS, it's likely that when we'll release 5.0 a majority of our users will be on it, which should make this much easier. In 5.0 we can update our requirements to be ^18.17.0 || >= 20.3.0
or similar, which should cover everything + be understandable by our users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You did great Erika, let's merge it and get over it
- upgrade dependencies - pin sharp version (c.f. withastro/astro#9653) - fix relative path for import data (the cause unknown)
FYI: This is blocking Astro installation with Bun / without Node.js because:
The workaround is "overrides": {
"sharp": "^0.33.2"
} Can't wait to see Astro 5... |
Changes
Sharp's
0.33.0
is much better in every single regard to the 0.32.x version, however its semver checks are incompatible with ours, causing it to not install properly for a lot of users using outdated versions of Node. This PR pins it at the old version until Astro 5.0, where we'll presumably raise the Node requirements. Oh well.For reference, Sharp's semver check is
^18.17.0 || ^20.3.0 || >=21.0.0
and ours is>=18.14.1
Fix #9345
Testing
Tested manually, we were at that version previously so, it definitely does work.
Docs
N/A