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

repl: define import.meta.main and import.meta.url #15720

Open
kitsonk opened this issue Sep 1, 2022 · 2 comments
Open

repl: define import.meta.main and import.meta.url #15720

kitsonk opened this issue Sep 1, 2022 · 2 comments
Labels
help wanted community help requested repl related to the Read-Eval-Print-Loop functionality of Deno suggestion suggestions for new features (yet to be agreed)

Comments

@kitsonk
Copy link
Contributor

kitsonk commented Sep 1, 2022

When checking something quickly in the REPL, like creating a new URL, it would be handy if import.meta.main and import.meta.url were accessible and assigned values.

@kitsonk kitsonk added repl related to the Read-Eval-Print-Loop functionality of Deno suggestion suggestions for new features (yet to be agreed) labels Sep 1, 2022
@bartlomieju
Copy link
Member

I guess it makes sense, even though REPL is not really a module context. import.meta.resolve() should work as well in such case.

@bartlomieju bartlomieju added the help wanted community help requested label Sep 4, 2022
@kitsonk
Copy link
Contributor Author

kitsonk commented Sep 5, 2022

It isn't, but we support both import statements and dynamic import in the non-module context. Especially when you want to copy pasta something quickly to see if the logic works, we have added a lot of stuff to make that happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted community help requested repl related to the Read-Eval-Print-Loop functionality of Deno suggestion suggestions for new features (yet to be agreed)
Projects
None yet
Development

No branches or pull requests

2 participants