-
Notifications
You must be signed in to change notification settings - Fork 10.3k
fix: ensure rendering engine has vendored libvips #39317
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
Conversation
} | ||
|
||
return checkIfInstalledInInternalPackagesCache( | ||
{ | ||
needToInstall: true, | ||
packageName: `sharp`, | ||
packageVersion: sharpVersion, | ||
packageVersion: | ||
sharp.versions.sharp ?? require(`sharp/package.json`).version, |
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.
sharp.versions.sharp
is string | undefined
, hence the fallback to previous method. This is mostly to satisfy typechecking as I did not manage to repro undefined
case myself and sharp version was always set, but still probably good idea to have fallback even if I didn't manage to ever hit it myself
…cts which mess up html header assertions
@@ -1,5 +1,7 @@ | |||
import { applyTrailingSlashOption } from "../../utils" |
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.
Those changes in this test are not related to sharp changes.
I'm not exactly sure what changed that those tests started failing now, but without the changes we are now making header assertions on 301 redirects instead of 200 html responses. Those changes ensure we do direct visit to expected html route thus avoiding 301 redirect (that's redirect for trailing slash) that is messing our assertions
@@ -114,7 +119,9 @@ describe("Headers", () => { | |||
}) | |||
|
|||
it("should contain correct headers for index page", () => { | |||
cy.visit("/").waitForRouteChange() | |||
cy.visit( | |||
applyTrailingSlashOption(Cypress.config().baseUrl, TRAILING_SLASH) |
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.
note, using baseUrl
here to get full url, so that applyTrailingSlashOption
can work correctly - otherwise it will always want to set /
on "index" which would lead to redirect
* fix: ensure rendering engine has vendored libvips * chore: bump caniuse * test: visit and intercept direct html routes and avoid hitting redirects which mess up html header assertions (cherry picked from commit 1371440)
* fix: ensure rendering engine has vendored libvips * chore: bump caniuse * test: visit and intercept direct html routes and avoid hitting redirects which mess up html header assertions (cherry picked from commit 1371440) Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
|
Description
Less disruptive alternative to #39297 that ensures that globally installed libvips in build environment does not impact produced functions (and allow them to be always self-contained)
Related Issues