chore: migrate docsearch and imagescript to npm/jsr imports (#3732)

## Summary
- **docsearch**: Replaced `esm.sh` URL with `npm:@docsearch/js@^3.5.2`.
Added a type cast workaround in `SearchButton.tsx` since Deno's type
checker treats this npm package as CJS (missing `"type": "module"`).
- **imagescript**: Replaced `deno.land/x` URL with
`jsr:@matmen/imagescript@^1.3.0`. Clean swap, no code changes needed.

These were legacy URL-based imports from before Deno had native `npm:`
and `jsr:` support.

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bartek Iwańczuk
2026-03-28 11:44:37 +00:00
committed by GitHub
co-authored by Claude Opus 4.6
parent 25e6357e1a
commit 220368aa15
3 changed files with 200 additions and 33 deletions
+2 -2
View File
@@ -54,7 +54,7 @@
"@types/node": "npm:@types/node@^24.3.0",
"@types/pg": "npm:@types/pg@^8.15.5",
"@types/prismjs": "npm:@types/prismjs@^1.26.5",
"docsearch": "https://esm.sh/@docsearch/js@3.5.2?target=es2020",
"docsearch": "npm:@docsearch/js@^3.5.2",
"esbuild": "npm:esbuild@0.25.7",
"esbuild-wasm": "npm:esbuild-wasm@0.25.7",
"fresh": "jsr:@fresh/core@^2.0.0",
@@ -91,7 +91,7 @@
"@std/front-matter": "jsr:@std/front-matter@^1.0.5",
"github-slugger": "npm:github-slugger@^2.0.0",
"imagescript": "https://deno.land/x/imagescript@1.3.0/mod.ts",
"imagescript": "jsr:@matmen/imagescript@^1.3.0",
"marked": "npm:marked@^15.0.11",
"marked-mangle": "npm:marked-mangle@^1.1.9",
"prismjs": "npm:prismjs@^1.29.0",