You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
0.1.1: answer the review — and stop shipping bytes we don't run
Two blocking Errors in the 0.1.0 review, both the same root cause: inline
`eslint-disable` comments for an `obsidianmd/*` rule are rejected outright.
The console logging they suppressed was only a Warning — the directives
were the failure. Everything else in a very long report was a Warning or a
Recommendation.
Directives gone, and the logging with them rather than suppressed. The two
dev-only `console.log`s moved onto the debug shim as `backendSpoof()` and
`lastWorkerEnv()`, which is strictly better: obsidian-drive.mjs can assert
on the values instead of a human reading them out of a console. The worker's
warn/error bridge stays — a worker is its own console target, so without it
a conversion that died inside the thread leaves nothing behind — but it is
relaxed in eslint.config.mjs, where a reader can see it, not mid-file. Also
dropped an unnecessary no-control-regex directive; the repository now has
zero inline eslint directives.
**The finding worth keeping: the review reads the bundle, not the intent.**
main.js contained `require("fs")`, `require("path")` and `require("os")`,
and the plugin was described to users as able to "read and write any file on
the system". All three lived inside the onnxruntime emscripten glue, which
was inlined *as a text string* and — since ORT fixed the renderer guard
upstream around 1.24 — never used at all. Ninety-two kilobytes of dead text
earned a filesystem-access warning on a public safety scorecard. The
decision now happens in analyzeOrtGlue() at build time and the glue is
inlined only when a patch is genuinely needed; the loud failure on an
unrecognised epilogue stays, so a future ORT bump still can't reintroduce
the bug quietly. main.js 4675571 → 4582504 bytes, and the only `require()`
left in it is `require("obsidian")`.
Encoding that string so a scanner wouldn't recognise it would also have
"worked". It is obfuscation, which the developer policies prohibit, and the
wrong instinct regardless: not shipping it is the fix.
Also: pdf.js gets `isEvalSupported: false` on both the worker and renderer
paths, so Type-4 shading functions are interpreted rather than compiled —
a converter should not compile code out of the document it was handed.
Priced against the ground-truth suite before keeping it: attention 8/8
checks on WebGPU, 376 s, identical to the recorded baseline. `authorUrl` now
points at the org profile rather than this repository, and the release
workflow attests its assets (actions/attest-build-provenance, with the
id-token and attestations permissions that needs).
Deliberately not fixed, and why: the "use window.setTimeout" and "avoid
globalThis" warnings land on code that runs inside a Web Worker, where
`window` does not exist — applying them would break the default conversion
path. The hundreds of no-unsafe-*/no-explicit-any warnings land on untyped
third-party surfaces (transformers.js env, ORT wasmPaths, pdf.js internals)
across files including the Node CLI, which is not in the plugin bundle at
all. getSettingDefinitions() is real UX value and deferred to 0.2.0.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
"description": "Convert a PDF into clean, readable Markdown entirely on your device. Figures, tables, and math survive. No API key, no upload, no page limit.",
0 commit comments