From ebe3a813a24c496cce33ed9b6008758a26dbda4e Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 12 May 2026 18:12:36 +0000 Subject: [PATCH 1/3] Replace builtin-modules with hardcoded list of Node.js builtins - Remove builtin-modules package dependency - Define Node.js builtins directly in esbuild.config.mjs - Resolves Obsidian warning about deprecated package --- esbuild.config.mjs | 51 +++++++++++++++++++++++++++++++++++++++++++++- package-lock.json | 14 ------------- package.json | 1 - 3 files changed, 50 insertions(+), 16 deletions(-) diff --git a/esbuild.config.mjs b/esbuild.config.mjs index b17bc09..a9d0195 100644 --- a/esbuild.config.mjs +++ b/esbuild.config.mjs @@ -1,6 +1,55 @@ import esbuild from "esbuild"; import process from "process"; -import builtins from "builtin-modules"; + +const builtins = [ + "assert", + "async_hooks", + "buffer", + "child_process", + "cluster", + "console", + "constants", + "crypto", + "dgram", + "diagnostics_channel", + "dns", + "domain", + "events", + "fs", + "fs/promises", + "http", + "http2", + "https", + "inspector", + "module", + "net", + "os", + "path", + "perf_hooks", + "process", + "punycode", + "querystring", + "readline", + "repl", + "stream", + "stream/consumers", + "stream/promises", + "stream/web", + "string_decoder", + "sys", + "timers", + "timers/promises", + "tls", + "trace_events", + "tty", + "url", + "util", + "v8", + "vm", + "wasi", + "worker_threads", + "zlib", +]; const prod = process.argv[2] === "production"; diff --git a/package-lock.json b/package-lock.json index 97fbd0c..eb72daa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,6 @@ "devDependencies": { "@types/node": "^22.0.0", "@typescript-eslint/parser": "^8.59.1", - "builtin-modules": "^4.0.0", "esbuild": "^0.25.5", "eslint": "^9.39.4", "eslint-plugin-obsidianmd": "^0.2.9", @@ -1410,19 +1409,6 @@ "node": "18 || 20 || >=22" } }, - "node_modules/builtin-modules": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-4.0.0.tgz", - "integrity": "sha512-p1n8zyCkt1BVrKNFymOHjcDSAl7oq/gUvfgULv2EblgpPVQlQr9yHnWjg9IJ2MhfwPqiYqMMrr01OY7yQoK2yA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/call-bind": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.9.tgz", diff --git a/package.json b/package.json index 8184645..d7456c3 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,6 @@ "devDependencies": { "@types/node": "^22.0.0", "@typescript-eslint/parser": "^8.59.1", - "builtin-modules": "^4.0.0", "esbuild": "^0.25.5", "eslint": "^9.39.4", "eslint-plugin-obsidianmd": "^0.2.9", From 03a3b25162c566a8d59829fbc5590eb7866b10e5 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 12 May 2026 18:13:51 +0000 Subject: [PATCH 2/3] Sync manifest.json description with package.json - Update manifest.json description to match package.json - Resolves mismatch warning in release --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index e588f96..471a942 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "name": "DocDrop", "version": "1.0.0", "minAppVersion": "1.0.0", - "description": "Convert PDF files to Markdown using Microsofts markitdown CLI.", + "description": "Obsidian plugin: Convert PDF files to Markdown using Microsofts markitdown CLI.", "author": "Rhys Gottwald", "authorUrl": "", "isDesktopOnly": true From 06b4c87576c7a29e236775695c239bc181303485 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 12 May 2026 18:15:26 +0000 Subject: [PATCH 3/3] Use Setting API for section descriptions instead of createEl - Replace direct paragraph element creation with Setting API setDesc() - Ensures consistent UI and proper use of Obsidian API - Fixes heading element linting error --- src/main.ts | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/main.ts b/src/main.ts index 87777ca..df42d66 100644 --- a/src/main.ts +++ b/src/main.ts @@ -225,14 +225,13 @@ class DocDropSettingTab extends PluginSettingTab { .setName("markitdown-ocr plugin (optional)") .setHeading(); - containerEl.createEl("p", { - text: + new Setting(containerEl) + .setDesc( "markitdown-ocr is a free, separately-installed plugin that uses an AI vision model (like " + "OpenAI's GPT-4o) to read text from images inside PDFs — useful for scanned documents or " + "PDFs that are just pictures of pages. Install it first with: pip install markitdown-ocr. " + - "You will need an OpenAI account (or a compatible service) to provide the AI.", - cls: "setting-item-description", - }); + "You will need an OpenAI account (or a compatible service) to provide the AI." + ); new Setting(containerEl) .setName("Enable markitdown-ocr") @@ -316,14 +315,13 @@ class DocDropSettingTab extends PluginSettingTab { .setName("Azure Document Intelligence (optional)") .setHeading(); - containerEl.createEl("p", { - text: + new Setting(containerEl) + .setDesc( "Document Intelligence is a paid Microsoft Azure cloud service that uses AI to read PDFs with " + "much higher accuracy than offline conversion — especially for scanned documents, handwriting, " + "tables, and complex layouts. Requires an Azure account. " + - "Leave these blank to use free offline conversion instead.", - cls: "setting-item-description", - }); + "Leave these blank to use free offline conversion instead." + ); new Setting(containerEl) // /skip -- "Document Intelligence" is a proper Microsoft product name