fix(extension): resolve sharp module error on Node.js 22 (fixes #413)

- Add sharp@0.33.5 override to support Node.js 22
- Add sharp as direct dependency
- Upgrade plasmo to 0.90.5
- Add Node.js version constraint (>=18.0.0 <23.0.0)
- Add pnpm version constraint (>=8.0.0)

This fixes the 'Cannot find module sharp-win32-x64.node' error
reported in issue #413 when building on Node.js v22.0.0
This commit is contained in:
Differ 2025-11-27 14:04:57 +08:00
parent 1ed0cb3dfe
commit e0725741c9
2 changed files with 1157 additions and 886 deletions

View file

@ -4,6 +4,15 @@
"version": "0.0.8",
"description": "Extension to collect Browsing History for SurfSense.",
"author": "https://github.com/MODSetter",
"engines": {
"node": ">=18.0.0 <23.0.0",
"pnpm": ">=8.0.0"
},
"pnpm": {
"overrides": {
"sharp": "^0.33.5"
}
},
"scripts": {
"dev": "plasmo dev",
"build": "plasmo build",
@ -24,13 +33,14 @@
"dom-to-semantic-markdown": "^1.2.11",
"linkedom": "0.1.34",
"lucide-react": "^0.454.0",
"plasmo": "0.89.4",
"plasmo": "0.90.5",
"postcss-loader": "^8.1.1",
"radix-ui": "^1.0.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hooks-global-state": "^2.1.0",
"react-router-dom": "^6.26.1",
"sharp": "^0.33.5",
"tailwind-merge": "^2.5.4",
"tailwindcss-animate": "^1.0.7"
},

File diff suppressed because it is too large Load diff