File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 66 "@core/unknownutil" : " jsr:@core/unknownutil@^4.0.0" ,
77 "@denops/core" : " jsr:@denops/core@^7.0.0" ,
88 "@denops/vim-channel-command" : " jsr:@denops/vim-channel-command@^4.0.2" ,
9- "@lambdalisue/import-map-importer" : " jsr:@lambdalisue/import-map-importer@^0.4 .0" ,
9+ "@lambdalisue/import-map-importer" : " jsr:@lambdalisue/import-map-importer@^0.5 .0" ,
1010 "@lambdalisue/messagepack" : " jsr:@lambdalisue/messagepack@^1.0.1" ,
1111 "@lambdalisue/messagepack-rpc" : " jsr:@lambdalisue/messagepack-rpc@^2.4.1" ,
1212 "@lambdalisue/workerio" : " jsr:@lambdalisue/workerio@^4.0.1" ,
1313 "@milly/async-signal" : " jsr:@milly/async-signal@^1.0.0" ,
1414 "@nick/dispose" : " jsr:@nick/dispose@^1.1.0" ,
1515 "@std/async" : " jsr:@std/async@^1.0.1" ,
1616 "@std/cli" : " jsr:@std/cli@^1.0.1" ,
17+ "@std/jsonc" : " jsr:@std/jsonc@^1.0.2" ,
1718 "@std/path" : " jsr:@std/path@^1.0.2" ,
1819 "@std/semver" : " jsr:@std/semver@^1.0.1"
1920 }
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { toFileUrl } from "@std/path/to-file-url";
88import { fromFileUrl } from "@std/path/from-file-url" ;
99import { join } from "@std/path/join" ;
1010import { dirname } from "@std/path/dirname" ;
11+ import { parse as parseJsonc } from "@std/jsonc" ;
1112
1213type PluginModule = {
1314 main : Entrypoint ;
@@ -165,7 +166,12 @@ async function tryLoadImportMap(
165166 for ( const pattern of PATTERNS ) {
166167 const importMapPath = join ( parentDir , pattern ) ;
167168 try {
168- return await loadImportMap ( importMapPath ) ;
169+ return await loadImportMap ( importMapPath , {
170+ loader : ( path : string ) => {
171+ const content = Deno . readTextFileSync ( path ) ;
172+ return parseJsonc ( content ) ;
173+ } ,
174+ } ) ;
169175 } catch ( err : unknown ) {
170176 if ( err instanceof Deno . errors . NotFound ) {
171177 // Ignore NotFound errors and try the next pattern
You can’t perform that action at this time.
0 commit comments