Files
Trilium/apps/web-clipper/package.json
T
Elian DoranandClaude Opus 5.5 ec24384d2a chore(web-clipper): use @mozilla/readability instead of a vendored copy
The content script extracted articles with lib/Readability.js, a copy
last refreshed in February 2022 (upstream 0.4.x) and since modified
only to export itself as an ES module. Upstream has reached 0.6.0, its
file grown from 2,279 to 2,786 lines of extraction fixes the copy
lacked.

The content script now imports Readability from @mozilla/readability
0.6.0, typed by the package's own definitions, and the copy is gone.
It still parses a clone of the page with a serializer that returns the
content element, and throws when no article is found. The content
script grows from 42.6 kB to 45.3 kB.

Upstream still assigns innerHTML, so Firefox review keeps flagging
it; the README for the reviewer now names the library as Mozilla's own,
installed unmodified from npm, instead of promising an update.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-11 00:28:50 +03:00

32 lines
750 B
JSON

{
"name": "@triliumnext/web-clipper",
"version": "1.1.1",
"description": "",
"main": "index.js",
"scripts": {
"dev": "wxt",
"dev:firefox": "wxt -b firefox",
"build": "wxt build",
"build:firefox": "wxt build -b firefox",
"zip": "wxt zip",
"zip:firefox": "wxt zip -b firefox",
"test": "vitest",
"coverage": "vitest --coverage",
"postinstall": "wxt prepare"
},
"keywords": [],
"packageManager": "[email protected]",
"devDependencies": {
"@triliumnext/client": "workspace:*",
"@wxt-dev/auto-icons": "1.1.2",
"jszip": "3.10.2",
"web-ext": "^10.7.0",
"wxt": "0.21.4"
},
"dependencies": {
"@boxicons/js": "1.0.1",
"@mozilla/readability": "0.6.0",
"preact": "11.0.0"
}
}