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

Deno section #809

Closed
wants to merge 1 commit into from
Closed

Conversation

vladimyr
Copy link
Contributor

Description

Show Deno version if the folder contains conventional Deno-specific files.

Screenshot

@Runrioter
Copy link
Member

Now deno is not GA, so we may wait a while.

Early deno version:

➜ deno --version
deno: 0.2.8
v8: 7.2.502.16
typescript: 3.2.1

Now deno version:

➜ deno --version
deno 1.0.0-rc2
v8 8.4.300
typescript 3.8.3

Note the missing : char

Use deno -V print the only deno version

➜ deno -V
deno 1.0.0-rc2

Personally, I don't like the unofficial dvm. Just deno binary is enough.

BTW, please test your code.

sections/deno.zsh Outdated Show resolved Hide resolved
@vladimyr
Copy link
Contributor Author

Now deno is not GA, so we may wait a while.

Sure, I wholeheartedly agree and this is just a preparation step for possible future demand.

Note the missing : char

Why is it important, the delimiter is kept the same?

Use deno -V print the only deno version

Nice, thank you! Do you happen to know was it there from the beginning or added later on? 🤔

Personally, I don't like the unofficial dvm. Just deno binary is enough.

All vm -s are unofficial, aren't they? This is done in the same vein as the node section which does include nvm support.

BTW, please test your code.

I forgot to test it without dvm, my bad 🙃

Thanks for the quick review! 👍

@vladimyr
Copy link
Contributor Author

Use deno -V print the only deno version

Nice, thank you! Do you happen to know was it there from the beginning or added later on? 🤔

The -V flag (short version) has introduced in v0.25.0 thus the only failsafe way to get deno version is:

$ deno --version | head -n1 | cut -d' ' -f2

🤔

Show Deno version if folder contains conventional Deno-specific files.
Copy link
Member

@denysdovhan denysdovhan left a comment

Choose a reason for hiding this comment

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

Thanks for contributing!

The code looks good. Please add tests for this section.

@denysdovhan denysdovhan added frozen Progress is temporarily frozen until resolving the specific issue. new-feature A PR that implement feature (section, specific behavior, etc). under-discussion labels Jun 30, 2021
@binyamin
Copy link

  • Deno has a config file, deno.json or deno.jsonc. The section should be shown if that file exists.
  • Why does this code need to check dvm? It doesn't really matter how deno gets there. According to justjavac/dvm#83, the deno command would resolve to a dvm installation if it exists, and a system installation if it doesn't.
  • Deno CLI is now at v1.25.3, so I think it's safe to use deno -V instead of deno --version, and make use of the shorter output.

@denysdovhan denysdovhan removed the frozen Progress is temporarily frozen until resolving the specific issue. label Sep 21, 2022
@denysdovhan
Copy link
Member

Merged in c43f8c5

@denysdovhan
Copy link
Member

denysdovhan commented Sep 21, 2022

Thanks for contributing! Authorship is preserved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature A PR that implement feature (section, specific behavior, etc).
Development

Successfully merging this pull request may close these issues.

None yet

4 participants