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

Update @vercel/og to 0.6.2 #57

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/smart-goats-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cloudflare/pages-plugin-vercel-og": patch
---

Updated @vercel/og dependency to version 0.6.2
2 changes: 1 addition & 1 deletion packages/vercel-og/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"prepack": "npm run build"
},
"devDependencies": {
"@vercel/og": "0.4.1"
"@vercel/og": "0.6.2"
},
"volta": {
"node": "20.11.0",
Expand Down
47 changes: 0 additions & 47 deletions patches/@vercel+og+0.4.1.patch
Original file line number Diff line number Diff line change
@@ -1,47 +0,0 @@
diff --git a/node_modules/@vercel/og/dist/index.edge.d.ts b/node_modules/@vercel/og/dist/index.edge.d.ts
index eab3ed7..3a5f9ad 100644
--- a/node_modules/@vercel/og/dist/index.edge.d.ts
+++ b/node_modules/@vercel/og/dist/index.edge.d.ts
@@ -1,5 +1,5 @@
import type { ReactElement } from 'react';
import type { ImageResponseOptions } from './types';
-export declare class ImageResponse {
+export declare class ImageResponse extends Response {
constructor(element: ReactElement, options?: ImageResponseOptions);
}
diff --git a/node_modules/@vercel/og/dist/index.edge.js b/node_modules/@vercel/og/dist/index.edge.js
index 33895c5..5862810 100644
--- a/node_modules/@vercel/og/dist/index.edge.js
+++ b/node_modules/@vercel/og/dist/index.edge.js
@@ -6,11 +6,11 @@ import {
import satori, { init as initSatori } from "satori/wasm";
import initYoga from "yoga-wasm-web";
import * as resvg from "@resvg/resvg-wasm";
-import resvg_wasm from "./resvg.wasm?module";
-import yoga_wasm from "./yoga.wasm?module";
+import resvg_wasm from "./resvg.wasm";
+import yoga_wasm from "./yoga.wasm";
+import fallbackFont from './noto-sans-v27-latin-regular.ttf.bin';
var initializedResvg = resvg.initWasm(resvg_wasm);
var initializedYoga = initYoga(yoga_wasm).then((yoga) => initSatori(yoga));
-var fallbackFont = fetch(new URL("./noto-sans-v27-latin-regular.ttf", import.meta.url)).then((res) => res.arrayBuffer());
var _a, _b;
var isDev = ((_b = (_a = globalThis == null ? void 0 : globalThis.process) == null ? void 0 : _a.env) == null ? void 0 : _b.NODE_ENV) === "development";
var ImageResponse = class {
diff --git a/node_modules/@vercel/og/dist/index.node.d.ts b/node_modules/@vercel/og/dist/index.node.d.ts
index 66edc70..22b42ba 100644
--- a/node_modules/@vercel/og/dist/index.node.d.ts
+++ b/node_modules/@vercel/og/dist/index.node.d.ts
@@ -2,7 +2,7 @@
import type { ReactElement } from 'react';
import type { ImageResponseNodeOptions, ImageResponseOptions } from './types';
import { Readable } from 'stream';
-export declare class ImageResponse {
+export declare class ImageResponse extends Response {
constructor(element: ReactElement, options?: ImageResponseOptions);
}
/**
diff --git a/node_modules/@vercel/og/dist/noto-sans-v27-latin-regular.ttf b/node_modules/@vercel/og/dist/noto-sans-v27-latin-regular.ttf.bin
similarity index 100%
rename from node_modules/@vercel/og/dist/noto-sans-v27-latin-regular.ttf
rename to node_modules/@vercel/og/dist/noto-sans-v27-latin-regular.ttf.bin
28 changes: 28 additions & 0 deletions patches/@vercel+og+0.6.2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/node_modules/@vercel/og/dist/index.edge.js b/node_modules/@vercel/og/dist/index.edge.js
index 089354c..af8d1b3 100644
--- a/node_modules/@vercel/og/dist/index.edge.js
+++ b/node_modules/@vercel/og/dist/index.edge.js
@@ -18565,8 +18565,9 @@ var Resvg2 = class extends Resvg {
};

// src/index.edge.ts
-import resvg_wasm from "./resvg.wasm?module";
-import yoga_wasm from "./yoga.wasm?module";
+import resvg_wasm from "./resvg.wasm";
+import yoga_wasm from "./yoga.wasm";
+import fallbackFont from './noto-sans-v27-latin-regular.ttf.bin';

// src/emoji/index.ts
var U200D = String.fromCharCode(8205);
@@ -18980,7 +18981,6 @@ function assertValue(v, errorMessage) {
// src/index.edge.ts
var initializedResvg = initWasm(resvg_wasm);
var initializedYoga = initYoga(yoga_wasm).then((yoga2) => Rl(yoga2));
-var fallbackFont = fetch(new URL("./noto-sans-v27-latin-regular.ttf", import.meta.url)).then((res) => res.arrayBuffer());
var ImageResponse = class extends Response {
constructor(element, options = {}) {
const result = new ReadableStream({
diff --git a/node_modules/@vercel/og/dist/noto-sans-v27-latin-regular.ttf b/node_modules/@vercel/og/dist/noto-sans-v27-latin-regular.ttf.bin
similarity index 100%
rename from node_modules/@vercel/og/dist/noto-sans-v27-latin-regular.ttf
rename to node_modules/@vercel/og/dist/noto-sans-v27-latin-regular.ttf.bin