Deno Semver Redirect
Redirect Deno dependencies from semantic versions to the newest fitting version on deno.land/x. See also this Deno Issue.
How to use
Just change the import URL in your Deno Sources:
-import { Bot } from 'https://deno.land/x/[email protected]/mod.ts'
+import { Bot } from 'https://dsr.edjopato.de/grammy/0.3/mod.ts'
Version Requirements
These are all possible as version requirements:
>=1.0.0
<1.3.0
1.2.3 := >=1.2.3 <1.3.0
1.2 := >=1.2.0 <1.3.0
1 := >=1.0.0 <2.0.0
~1.2.3 := >=1.2.3 <1.3.0
~1.2 := >=1.2.0 <1.3.0
~1 := >=1.0.0 <2.0.0
^1.2.3 := >=1.2.3 <2.0.0
^0.2.3 := >=0.2.3 <0.3.0
^0.0.3 := >=0.0.3 <0.0.4
^0.0 := >=0.0.0 <0.1.0
^0 := >=0.0.0 <1.0.0
0.2.x := >=0.2.0 <0.3.0
0.x := >=0.0.0 <1.0.0
For the requested versions the semver crate is used. For more details check its documentation.
When the dependency you are using is prefixing its versions with v
(like v1.2.3
), the version requirement still has to be provided without the v
. The redirect then will include the v
prefix based on the package.