zx icon indicating copy to clipboard operation
zx copied to clipboard

Add feature that fixes unanalyzable-dynamic-import to work correctly with jsr.io

Open DanielPickens opened this issue 1 year ago • 1 comments

Description Add a new feature method to node:URL async functionMain that fixes unanalyzable-dynamic-import to work correctly with jsr.io and adds extended functionality for ImportGlobalRequire to parse deps of import paths on origin when call reference is calling from object reference value calls that are not multi inheritated to await url method for property object:pathToFileURL to call filepath from .toString() method call and allow for analyzable-dynamic-imports to work correctly with jsr.io filepath imports.

Why is this needed: This would fix the issue of unanalyzable-dynamic-import to work correctly with jsr.io not getting called dynamically to recognize dynamic import paths so that dynamic imports can have methods that allow for analyzable-dynamic-imports path object value fields that the jsr.io filepath imports can load configs onto the await functionMain asynchronously like:

const dynamicImport = new Function('modulePath', 'return import(modulePath)');
  await dynamicImport(url.pathToFileURL(filepath).toString());
}

What would you like to be added: This would add decoupling to a non-dynamic-import function so that the assorted function would work correctly with jsr.io import filepaths when called from a url() property object referenced value object context

Method referenced:

 await import(url.pathToFileURL(filepath).toString())
}

Who is this feature for? @google/src/cli.ts

DanielPickens avatar Dec 18 '24 00:12 DanielPickens

  • https://github.com/denoland/deno/pull/22623
  • https://github.com/jsr-io/jsr/issues/735
  • https://github.com/denoland/deno/issues/25360
  • https://github.com/denoland/deno/issues/8266

antongolub avatar Jan 20 '25 11:01 antongolub