当前位置:网站首页>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版本号
边栏推荐
- Mongodb series learning notes tutorial summary
- 创新引领方向 华为智慧生活全场景新品齐发
- [selenium automation] common notes
- What if the programmer's SQL data script coding ability is weak and Bi can't do it?
- Compare whether two lists are equal
- [FPGA tutorial case 9] design and implementation of clock manager based on vivado core
- 分布式BASE理论
- 【Unity】InputSystem
- Basic operation of database and table ----- the concept of index
- Digital DP template
猜你喜欢

26.2 billion! These universities in Guangdong Province have received heavy support

【纯音听力测试】基于MATLAB的纯音听力测试系统

Recursive execution mechanism

pycharm专业版下载安装教程

Arbitrum: two-dimensional cost

Huawei employs millions of data governance experts! The 100 billion market behind it deserves attention

How to use words to describe breaking change in Spartacus UI of SAP e-commerce cloud

Parameter passing mechanism of member methods

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

【海浪建模3】三维随机真实海浪建模以及海浪发电机建模matlab仿真
随机推荐
Operator explanation
RB technology stack
Basic concept and usage of redis
Open3d uses GICP to register point clouds
全栈开发提效神器——ApiFox(Postman + Swagger + Mock + JMeter)
Basic operation of database and table ----- the concept of index
小程序直播 + 电商,想做新零售电商就用它吧!
107. Some details of SAP ui5 overflow toolbar container control and resize event processing
Research Report on the overall scale, major producers, major regions, products and application segmentation of agricultural automatic steering system in the global market in 2022
The performance of major mainstream programming languages is PK, and the results are unexpected
2022.07.03 (lc_6111_counts the number of ways to place houses)
【海浪建模1】海浪建模的理论分析和matlab仿真
The difference between string STR and new string
[Yocto RM]11 - Features
Safety learning week4
MySQL uses the explain tool to view the execution plan
Apifox (postman + swagger + mock + JMeter), an artifact of full stack development and efficiency improvement
【大型电商项目开发】性能压测-优化-中间件对性能的影响-40
【大型电商项目开发】性能压测-性能监控-堆内存与垃圾回收-39
Chia Tai International Futures: what is the master account and how to open it?