Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli, typegate): explicitly import DenoRuntime.import modules from path #564

Merged
merged 8 commits into from Jan 23, 2024

Conversation

Yohe-Am
Copy link
Contributor

@Yohe-Am Yohe-Am commented Jan 23, 2024

When using the dynamic import function, if you provide it a raw path like /foo/bar/baz and deno detects the current module's loaded from a remote host, it'll convert it to a http url. Reasonable behavior but it turned out to be the cause of #560.

This pr fixes this issue along with:

  • Puts contents of main.ts in a try/catch block for better error logging.
  • Fixes minor permission bugs with the bundled runtime.

Motivation and context

#560

Migration notes

No changes required

Checklist

  • The change come with new or modified tests
  • Hard-to-understand functions have explanatory comments
  • End-user documentation is updated to reflect the change

@Yohe-Am
Copy link
Contributor Author

Yohe-Am commented Jan 23, 2024

Not sure how to test this though. Should I break ground on tests for the cli bundled typegate?

zifeo
zifeo previously approved these changes Jan 23, 2024
@zifeo
Copy link
Member

zifeo commented Jan 23, 2024

@Yohe-Am I believe this is small enough, entry point are not usually very testable :)

@Yohe-Am Yohe-Am merged commit caaabaa into main Jan 23, 2024
9 checks passed
@Yohe-Am Yohe-Am deleted the fix/bundled-typegate-tmp-dir branch January 23, 2024 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DenoRuntime.import is unable to locate modules when used from cli bundled typegate
3 participants