What Do These Signs Means in Node.JS Packages?
ฝัง
- เผยแพร่เมื่อ 8 ก.พ. 2025
- Confused about the caret (^) and tilde (~) symbols in your package.json file? 🤔 In this video, I'll explain what these symbols mean, how they affect your dependency updates, and when to use each one. Whether you're a beginner or looking for a quick refresher, this guide will help you master package.json versioning in under a minute! 🚀
📌 Topics Covered:
What does ^ mean in package.json?
What does ~ mean in package.json?
The key differences between caret and tilde.
💡 If you find this video helpful, don’t forget to like, comment, and subscribe for more developer tips and tricks!
💖 Become a member to support me: / @sakuradev
Great! Now you have saved me some future confusion 😆
Glad to hear it! 👍
In the package.json file, you can use a 'resolutions' section to supplement the 'dependencies' section and effectively lock package versions. I recently discovered this method while seeking to maintain older versions of specific packages.
Interesting, I will try this
That's for specifying a version for dependency X, if any other dependency in your project requires X, you can make sure a specific version of dependency X is used across your project.
So the 'resolutions'-section is not needed to lock most libraries to a specific version. You can simply use '=' for the version of your dependency, like:
"dependency-a": "=1.2.3"
@@crateer you will find that '=' is not respected by, yarn up "*"
Sir, please, if possible, create a new video series including Next.js and NestJS, focusing on building multiple apps like an admin panel, marketing page, user panel, auth gateway API, admin panel API, and user panel API. Show how to set up shared libraries and packages, use a monorepo architecture, and set up the project with the latest version of Nx workspace. 🙏🙏😢
Hi I am recording one video on these topics. It's long video so it might take little while to upload it
@@SakuraDev Thank you so much, sir! 🙏🥺 I really appreciate it and can't wait to watch the video. Take your time, and thanks again for your effort! ❤🥺
@@lakshitha_sandamal You're so kind! 🥺🙏 Thank you for your patience and support-it really means the world to me! ❤ I hope you enjoy the video when it’s ready. 😊 Stay awesome! 🔥🔥
@@SakuraDev To be honest, sir, it's because of your videos that I learned NestJS. I watch all your videos ☺️ as soon as I get the notification 🤗.
Great insights, make it a short for better reach
I'll keep that in mind for future videos!
Warning that not all packages utilize semver so ^ can be risky business