google / google/zx

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

Open
#1,004 1 comment 0 reactions 1 assignee Claimed by @antongolub View on GitHub
Dominant language
JavaScript
Stars
45.7k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.