当前位置:网站首页>node工程中package.json文件作用是什么?里面的^尖括号和~波浪号是什么意思?
node工程中package.json文件作用是什么?里面的^尖括号和~波浪号是什么意思?
2022-07-05 01:04:00 【魏波-】
1、package.json文件的作用是什么?
package.json是包的说明文件,主要有以下3个作用:
(1)相当于你本地项目的一个文档说明。
(2)允许你指定你项目中所使用的node包的版本。
(3)构建你的项目更加容易,便于给其他人共享。
2、package.json文件中^尖括号和~波浪号是什么意思?
根据package文件作用的第二条可知:该文件中指定了项目中所使用的node包的版本,在package.json里面dependencies依赖包的版本号前面的符号有两种,一种是~,一种是^。
(1)^表示:匹配最近的一个大版本比如1.0.2 将会匹配到1.x.x,但不包括2.x.x
(2)~表示:匹配最近的小版本比如~1.0.2将会匹配1.0.x版本,但不匹配1.1.0
PS:软件版本号x.y.z的含义:
z :表示一些小的bugfix, 更改z的号,
y :表示一些大的版本更改,比如一些API的变化
x :表示一些设计的变动及模块的重构之类的,会升级x版本号
边栏推荐
- Complete knapsack problem (template)
- Hand drawn video website
- Learn C language from scratch day 024
- Talking about JVM 4: class loading mechanism
- Robley's global and Chinese markets 2022-2028: technology, participants, trends, market size and share Research Report
- Identifiers and keywords
- pycharm专业版下载安装教程
- [pure tone hearing test] pure tone hearing test system based on MATLAB
- 小程序直播 + 电商,想做新零售电商就用它吧!
- Introduction to the gtid mode of MySQL master-slave replication
猜你喜欢
【C】 (written examination questions) pointer and array, pointer
Visual explanation of Newton iteration method
7. Scala process control
ROS command line tool
Basic operations of database and table ----- delete index
Detailed explanation of multi-mode input event distribution mechanism
Chia Tai International Futures: what is the master account and how to open it?
Reasons and solutions of redis cache penetration and avalanche
小程序直播 + 电商,想做新零售电商就用它吧!
Poap: the adoption entrance of NFT?
随机推荐
华为百万聘请数据治理专家!背后的千亿市场值得关注
[circuit design] optocoupler use and circuit design summary
leetcode494,474
There is a new Post-00 exam king in the testing department. I really can't do it in my old age. I have
[STM32] (I) overview and GPIO introduction
Hand drawn video website
Distributed base theory
FEG founder rox:smartdefi will be the benchmark of the entire decentralized financial market
Ruby tutorial
Global and Chinese market of nutrient analyzer 2022-2028: Research Report on technology, participants, trends, market size and share
【FPGA教程案例9】基于vivado核的时钟管理器设计与实现
视频网站手绘
Basic operation of database and table ----- phased test II
Maximum number of "balloons"
[development of large e-commerce projects] performance pressure test - Optimization - impact of middleware on performance -40
Discrete mathematics: propositional symbolization of predicate logic
Compare whether two lists are equal
Poap: the adoption entrance of NFT?
Oracle case: SMON rollback exception causes instance crash
当产业互联网时代真正发展完善之后,将会在每一个场景见证巨头的诞生