asdf-community / asdf-deno Goto Github PK
View Code? Open in Web Editor NEWDeno plugin for the asdf version manager
Home Page: https://github.com/asdf-vm/asdf
License: Apache License 2.0
Deno plugin for the asdf version manager
Home Page: https://github.com/asdf-vm/asdf
License: Apache License 2.0
First of all thanks for this plugin
I'm using macOS big sur and when I try to install the latest version I get this error
∗ Downloading and installing deno...
\e[33mCleanup:\e[m Something went wrong!
21 /Users/marcoloyo/.asdf/plugins/deno/bin/install: curl --fail --silent --location --create-dirs --output "$source_path" "$download_url"
From what I see here,
Lines 26 to 28 in 6685b18
I think you can made it possible to install specific version of deno, by using cargo
.
cargo install --root "$install_path" --version "$version" deno --locked
The only caveat is this require cargo
to be installed, but I think that is a fair trade off. Since you could install those through asdf-rust as well.
if [ -n "$(command -v cargo)" ]; then
# cargo is available
fi
Hello there. Thanks for making this plugin!
I noticed that this plugin fails to install Deno v0.39.0.
$ asdf install deno 0.39.0
∗ Downloading and installing deno...
gzip: /home/uki00a/.asdf/installs/deno/0.39.0/bin/deno.gz: not in gzip format
Fail: Could not uncompress
Fail: An error occurred
I think this is probably due to the change of denoland/deno#4545.
Thanks.
OS:
Darwin Dorians-MacBook-Air.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:59:33 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T8112 arm64
SHELL:
fish, version 3.7.0
BASH VERSION:
3.2.57(1)-release
ASDF VERSION:
v0.13.1-0586b37
ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/Users/dorianmariefr/.asdf
ASDF_DIR=/Users/dorianmariefr/.asdf
ASDF_CONFIG_FILE=/Users/dorianmariefr/.asdfrc
ASDF INSTALLED PLUGINS:
deno https://github.com/asdf-community/asdf-deno.git master 0e14a50
nodejs https://github.com/asdf-vm/asdf-nodejs.git master c5b7c40
ruby https://github.com/asdf-vm/asdf-ruby.git master 7a22142
rust https://github.com/code-lever/asdf-rust.git master 95acf4f
yarn https://github.com/twuni/asdf-yarn.git main 376c540
asdf install deno 1.40.5
asdf: Warn: You have configured asdf to preserve downloaded files (with always_keep_download=yes or --keep-download). But
asdf: Warn: the current plugin (deno) does not support that. Downloaded files will not be preserved.
No warnings
❯ asdf info
OS:
Linux 6.7.3-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Feb 1 03:29:52 UTC 2024 x86_64 GNU/Linux
SHELL:
GNU bash, version 5.2.26(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
BASH VERSION:
5.2.26(1)-release
ASDF VERSION:
v0.14.0
ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/home/d/.asdf
ASDF_DIR=/home/d/.asdf
ASDF_CONFIG_FILE=/home/d/.asdfrc
ASDF INSTALLED PLUGINS:
deno https://github.com/asdf-community/asdf-deno.git master 0e14a50
nodejs https://github.com/asdf-vm/asdf-nodejs.git master c5b7c40
rust https://github.com/asdf-community/asdf-rust.git master 8436012
Like the instructions say
asdf plugin-add deno https://github.com/asdf-community/asdf-deno.git
asdf global deno latest
The error I get is:
❯ asdf global deno latest
version 1.40.4 is not installed for deno
To be installed, Rust and Nodejs work.
On the script installer manual page it says:
The installation root is determined, in order of precedence:
--root
optionDENO_INSTALL_ROOT
environment variable$HOME/.deno
However, when installing scripts using an asdf-installed version of deno, they are installed to $ASDF_DIR/installs/deno/<CURRENT_VERSION>/.deno/bin
.
I am using macOS and the DENO_INSTALL_ROOT
variable is not set in my environment.
Example output:
> deno install --name denoscript main.ts
Download https://deno.land/x/[email protected]/mod.ts
Download https://deno.land/[email protected]/flags/mod.ts
Download https://deno.land/[email protected]/_util/assert.ts
Compile file:///path/redacted/for/privacy/main.ts
✅ Successfully installed denoscript
/path/redacted/for/privacy/.asdf/installs/deno/1.1.0/.deno/bin/denoscript
Hi,
Something that's really good in the asdf NodeJS plugin is the ability to install default packages when installing new versions of NodeJS.
This is pretty awesome for globally installed packages that one uses every day (ex: http-server
or npm-check-updates
).
Would you consider adding a similar feature in this plugin? 🙏
That would probably help users upgrade faster. I, for one, tend to postpone Deno upgrades because I know there are a couple more commands to run and I'm too lazy...
This is even more pronounced for people developing their own tooling in Deno since the installation must be done from the repository of the tool.
Since version 1.40.3, Deno releases include deno-aarch64-unknown-linux-gnu.zip
.
asdf-deno doesn't install it because uname -m
reports aarch64
, but it worked fine with this change:
case "$(uname -m)" in
x86_64) architecture="x86_64" ;;
+ aarch64) architecture="aarch64" ;;
I see that asdf-deno
is downloading and/or placing the distribution (zip
file) into .asdf/installs/deno/<deno_version>/bin/
— and unpacking it in the same location.
If that's the case, I believe a better approach could be to use a well-known temporary location (for the given operating system) and optionally, remove the distribution after a successful install.
When I try to run this command:
asdf install deno 1.0.0
I get the following error message:
gzip: /home/waveiro/.asdf/installs/deno/1.0.0/bin/deno.gz: not in gzip format
Fail: Could not uncompress
Fail: An error occurred
I'm using this version of asdf:
asdf --version
v0.7.8-4a3e3d6
Is this plugin supporting shims?
I am using deno v1.0.2, and I have installed velociraptor which is an alternative for npm scripts.
It provides a command vr
, which can be used globally.
However, the command itself doesn't work, until I add the following line of code to my .zshrc
file.
export PATH="/home/<user>/.deno/bin:$PATH"
Normally, when installing for example node or any package installed globally with npm/yarn, the shims would be located in this location:
$ which nodemon
/home/<user>/.asdf/shims/nodemon
I tried to troubleshoot this issue, and on the official documentation, I found this section:
https://asdf-vm.com/#/core-manage-asdf-vm?id=having-issues
I ensured that the sourcing file is at the bottom of my profile, but that wasn't the case.
Is it likely to be a problem with my configuration or this plugin doesn't add shims?
Additional info:
I am using WSL2 with Ubuntu (20.04 LTS) on my Windows10
Since the GitHub has an API limit of 100, asdf list-all deno
will only get the 100 latest releases.
See here: https://github.com/asdf-community/asdf-deno/blob/master/bin/list-all#L6
Getting the following output when trying to install v1.0.0 with asdf:
$ asdf install deno 1.0.0
∗ Downloading and installing deno...
gzip: /home/jeanlescure/.asdf/installs/deno/1.0.0/bin/deno.gz: not in gzip format
Fail: Could not uncompress
Fail: An error occurred
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.