Replies: 1 comment
-
You can skip adding a version if:
You should always use a version or version constraint together with a lockfile if:
We strongly recommend going with the versioned approach for any serious project. Only consider going without versions if it's a short lived prototype that only a single developer hacks on. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Deno community,
since the launch of JSR 🎉 I've noticed, that you don't have to (or even should?) specify a version when importing a dependency.
![image](https://private-user-images.githubusercontent.com/21290928/378412424-d766fe55-c107-4b9e-9142-2d8ca475a135.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNzc3MjgsIm5iZiI6MTczOTM3NzQyOCwicGF0aCI6Ii8yMTI5MDkyOC8zNzg0MTI0MjQtZDc2NmZlNTUtYzEwNy00YjllLTkxNDItMmQ4Y2E0NzVhMTM1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDE2MjM0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI3ZWY2ZjdiZjliM2U4OTEzYzE5ZDBkNWU4Y2U4YmI2MDUzMDM0ZDU4MzhmYzQ5ODMwZWUwZDM5NWJjYTVkZWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.xGcK0jzAjdo6CN0q4t7jkVH9raQA7rnZI63PlbDKOd8)
You just
import { dirname } from 'jsr:@std/path';
and it will resolve to the latest version by default.When compared to
deno.land
it's recommended that you specify a version.Otherwise you get squiggly lines on the import:
The resolution works completely fine either way:
I quite like not having to specify a version, as it checks for the newest dependencies on each run (if you don't use a lockfile).
But why is there a difference in how versions are expected?
Is the warning for "Implicitly using latest version..." necessary?
Kind regards
Beta Was this translation helpful? Give feedback.
All reactions