Open moderation opened 3 weeks ago
Thanks for bringing this to our attention. Actually the Deno runtime version used by Deno Deploy is 1.44.4 (of course we are aiming to upgrade this to the current latest version 1.46.0). The problem here is more like the user agent hasn't updated appropriately. We will fix this to make sure this is kept in sync with the actual runtime version.
A little confused. The navigator
object is part of the runtime - https://docs.deno.com/api/web/~/Navigator.userAgent. I would expect that the navigator.userAgent
would return the version of the actual runtime and not an external platform level configuration.
https://deno.com/deploy/changelog#2023-03-08 reports that Deno.version
should be available however in a playground
Deno.serve((req: Request) => new Response("Hello World"));
console.log(navigator.userAgent);
console.log(Deno.version);
console.log(Deno.version.deno);
console.log(JSON.stringify(Deno.version.deno));
returns
Deno/1.41.0
{ deno: "", v8: "", typescript: "" }
""
Is there a way to determine / verify the runtime version accurately?
On Deno Deploy, we run a slightly tweaked version of the Deno runtime. navigator.userAgent
is one such example - the value of this field is set differently between Deno CLI and Deno Deploy.
In a nutshell, Deno (as a CLI tool) is made up of multiple layers:
And Deno Deploy's runtime is built by using v8, deno_core, and some (not all!) of the extensions. Because setting a navigator.userAgent
value happens in the "runtime" layer, this value may be different between CLI and Deploy.
Deno.version
on Deno Deploy now returns a placeholder, just to make sure that any program that accesses this property doesn't get unexpected undefined
. We definitely can improve this to return the same version as user agent shows. I'm going to add this enhancement to our backlog.
Is there a way to determine / verify the runtime version accurately?
Currently no reliable way, as we forgot to update navigator.userAgent
.
We will make sure to update navigator.userAgent
whenever we update underlying Deno runtime on Deploy, and also let Deno.version
return a correct value instead of a placeholder. Once these are done, you can rely on navigator.userAgent
and Deno.version
to know the runtime version.
@magurotuna thanks so much for a detailed response. Makes sense in terms of current status and I look forward to the updates
What problem are you trying to solve?
I regularly update a Deno Deploy app and use the following code to return the Deploy version. This used to regularly udpate as new versions of Deno were released. It hasn't updated since
1.41.0
This code returns
deno/1.41.0
todayDescribe the solution you'd like
https://github.com/denoland/deno/releases/tag/v1.41.0 was released on Feb 21 2024.
1.41.1
was released on Feb 291.41.2
was released on Mar 81.41.3
was released on Mar 14Latest releases is
1.45.5
.The solution I'd like is to have Deno Deploy track latest releases or be able to specify what version to leverage in config.
Describe alternatives you've considered
Is Deploy still an invest platform?
Documentation, Adoption, Migration Strategy
I suspect that https://github.com/denoland/deploy_feedback/issues/695 is due to the old version on Deploy