当前位置:网站首页>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版本号
边栏推荐
- 当产业互联网时代真正发展完善之后,将会在每一个场景见证巨头的诞生
- Call Huawei order service to verify the purchase token interface and return connection reset
- The most complete regular practical guide of the whole network. You're welcome to take it away
- 创新引领方向 华为智慧生活全场景新品齐发
- dotnet-exec 0.6.0 released
- Deux nombres se remplacent
- 那些一门心思研究自动化测试的人,最后都怎样了?
- Arbitrum: two-dimensional cost
- Ruby tutorial
- Expose testing outsourcing companies. You may have heard such a voice about outsourcing
猜你喜欢

Basic operations of database and table ----- create index

Complete knapsack problem (template)

那些一门心思研究自动化测试的人,最后都怎样了?

揭露测试外包公司,关于外包,你或许听到过这样的声音

leetcode494,474

【大型电商项目开发】性能压测-性能监控-堆内存与垃圾回收-39

Single step debugging of master data reading of SAP commerce cloud products

College degree, what about 33 year old Baoma? I still sell and test, and my monthly income is 13K+

"Upside down salary", "equal replacement of graduates" these phenomena show that the testing industry has

潘多拉 IOT 开发板学习(RT-Thread)—— 实验4 蜂鸣器+马达实验【按键外部中断】(学习笔记)
随机推荐
“薪資倒掛”、“畢業生平替” 這些現象說明測試行業已經...
What if the programmer's SQL data script coding ability is weak and Bi can't do it?
Digital DP template
TS quick start - functions
Global and Chinese market of network connected IC card smart water meters 2022-2028: Research Report on technology, participants, trends, market size and share
【微处理器】基于FPGA的微处理器VHDL开发
NPM install error forced installation
Several simplified forms of lambda expression
Global and Chinese markets of radiation linear accelerators 2022-2028: Research Report on technology, participants, trends, market size and share
7. Scala process control
“薪资倒挂”、“毕业生平替” 这些现象说明测试行业已经...
Grabbing and sorting out external articles -- status bar [4]
Global and Chinese markets for industrial X-ray testing equipment 2022-2028: Research Report on technology, participants, trends, market size and share
4. Scala writes HelloWorld in idea, in-depth analysis of accompanying objects, and association of source packages
2022.07.03 (LC 6109 number of people who know secrets)
Hand drawn video website
Actual combat simulation │ JWT login authentication
各大主流编程语言性能PK,结果出乎意料
[development of large e-commerce projects] performance pressure test - Performance Monitoring - heap memory and garbage collection -39
Basic operations of database and table ----- create index