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

refactor: Modules and Loader trait #3791

Merged
merged 4 commits into from Jan 25, 2020

Conversation

bartlomieju
Copy link
Member

This PR is further work towards workers.

  • move is_dyn_import argument from Loader::resolve to Loader::load - it was always kind of strange that resolve() checks permissions.
  • change argument type from &str to &ModuleSpecifier where applicable

Fixes #3786

@bartlomieju bartlomieju requested a review from ry January 25, 2020 17:00
file://[WILDCARD]/005_more_imports.ts
└─┬ file://[WILDCARD]/subdir/mod1.ts
└─┬ file://[WILDCARD]/subdir/subdir2/mod2.ts
└── file://[WILDCARD]/subdir/print_hello.ts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

let module_name = module_specifier.as_str();

if !self.modules.is_registered(module_name) {
load.add_import(module_specifier, referrer_specifier.clone());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow great clean up

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bartlomieju bartlomieju merged commit c824eb5 into denoland:master Jan 25, 2020
@bartlomieju bartlomieju deleted the fix_deno_info branch January 25, 2020 17:53
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.

dependency graph broken
2 participants