当前位置:网站首页>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版本号
边栏推荐
- Robley's global and Chinese markets 2022-2028: technology, participants, trends, market size and share Research Report
- [Yocto RM]11 - Features
- 4. Scala writes HelloWorld in idea, in-depth analysis of accompanying objects, and association of source packages
- Talking about JVM 4: class loading mechanism
- Apifox (postman + swagger + mock + JMeter), an artifact of full stack development and efficiency improvement
- Complete knapsack problem (template)
- Arbitrum: two-dimensional cost
- [wave modeling 3] three dimensional random real wave modeling and wave generator modeling matlab simulation
- [STM32] (I) overview and GPIO introduction
- Discrete mathematics: propositional symbolization of predicate logic
猜你喜欢
各大主流编程语言性能PK,结果出乎意料
What you learned in the eleventh week
skimage: imread & imsave & imshow
Visual explanation of Newton iteration method
[pure tone hearing test] pure tone hearing test system based on MATLAB
华为百万聘请数据治理专家!背后的千亿市场值得关注
pycharm专业版下载安装教程
4. Scala writes HelloWorld in idea, in-depth analysis of accompanying objects, and association of source packages
[untitled]
“薪資倒掛”、“畢業生平替” 這些現象說明測試行業已經...
随机推荐
Robley's global and Chinese markets 2022-2028: technology, participants, trends, market size and share Research Report
Several simplified forms of lambda expression
[Yocto RM]11 - Features
程序员SQL数据脚本编码能力弱,BI做不出来怎么办?
如果消费互联网比喻成「湖泊」的话,产业互联网则是广阔的「海洋」
Database performance optimization tool
Basic operation of database and table ----- the concept of index
"Upside down salary", "equal replacement of graduates" these phenomena show that the testing industry has
抓包整理外篇——————状态栏[ 四]
7. Scala process control
Playwright recording
Actual combat simulation │ JWT login authentication
Basic concept and usage of redis
[pure tone hearing test] pure tone hearing test system based on MATLAB
||Interview questions you will encounter
Daily practice (18): stack containing min function
分布式BASE理论
Reasons and solutions of redis cache penetration and avalanche
There is a new Post-00 exam king in the testing department. I really can't do it in my old age. I have
Deux nombres se remplacent