Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

feat: update mupdf

Marc Seitzceefc971d856
diff --git a/next.config.mjs b/next.config.mjs
index 4acb293b..fa3b91e8 100644
--- a/next.config.mjs
+++ b/next.config.mjs
@@ -10,7 +10,7 @@ const nextConfig = {
skipTrailingSlashRedirect: true,
experimental: {
outputFileTracingIncludes: {
- "/api/mupdf/*": ["./node_modules/mupdf/lib/*.wasm"],
+ "/api/mupdf/*": ["./node_modules/mupdf/dist/*.wasm"],
},
missingSuspenseWithCSRBailout: false,
},
diff --git a/package-lock.json b/package-lock.json
index 5d4b7d9c..e0e66894 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -71,7 +71,7 @@
"js-cookie": "^3.0.5",
"lucide-react": "^0.400.0",
"ms": "^2.1.3",
- "mupdf": "^0.1.3",
+ "mupdf": "^0.2.2",
"nanoid": "^5.0.7",
"next": "^14.2.4",
"next-auth": "^4.24.7",
@@ -12375,9 +12375,9 @@
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
},
"node_modules/mupdf": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/mupdf/-/mupdf-0.1.3.tgz",
- "integrity": "sha512-/4r6Hvzr20hQQR7hZmVOrMB+KEmTamY1nWVZEQ86yBogOUYXgBLf/t3jnSyh3XISR0MVEUNZXx4w30iF4r+Ehw=="
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/mupdf/-/mupdf-0.2.2.tgz",
+ "integrity": "sha512-vMqzdyY1lmeIXIxRbuzRE4lae+qorPyFiUelK40y8aSCjeve2fhggl18OoDQO79rMYAjWgIyLFE0q+PRLVLlnA=="
},
"node_modules/mz": {
"version": "2.7.0",
diff --git a/package.json b/package.json
index 90dba467..8f70b8b3 100644
--- a/package.json
+++ b/package.json
@@ -80,7 +80,7 @@
"js-cookie": "^3.0.5",
"lucide-react": "^0.400.0",
"ms": "^2.1.3",
- "mupdf": "^0.1.3",
+ "mupdf": "^0.2.2",
"nanoid": "^5.0.7",
"next": "^14.2.4",
"next-auth": "^4.24.7",
diff --git a/pages/api/mupdf/convert-page.ts b/pages/api/mupdf/convert-page.ts
index 9abdb395..4fc94877 100644
--- a/pages/api/mupdf/convert-page.ts
+++ b/pages/api/mupdf/convert-page.ts
@@ -1,8 +1,7 @@
import { NextApiRequest, NextApiResponse } from "next";
import { DocumentPage } from "@prisma/client";
-// @ts-ignore
-import mupdf from "mupdf";
+import * as mupdf from "mupdf";
import { putFileServer } from "@/lib/files/put-file-server";
import prisma from "@/lib/prisma";
diff --git a/tsconfig.json b/tsconfig.json
index 59c9536a..150ac0de 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -9,7 +9,7 @@
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
- "moduleResolution": "node",
+ "moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"downlevelIteration": true,