当前位置:网站首页>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版本号
边栏推荐
- POAP:NFT的采用入口?
- Global and Chinese market of optical densitometers 2022-2028: Research Report on technology, participants, trends, market size and share
- 测试部新来了个00后卷王,上了年纪的我真的干不过了,已经...
- Reasons and solutions of redis cache penetration and avalanche
- const、volatile和restrict的作用和用法总结
- [Yocto RM]11 - Features
- 7. Scala process control
- Operator explanation
- Getting started with Paxos
- Maximum number of "balloons"
猜你喜欢
各大主流编程语言性能PK,结果出乎意料
leetcode494,474
Complete knapsack problem (template)
Insert sort of sort
Implementation steps of master detail detail layout mode of SAP ui5 application
pycharm专业版下载安装教程
【大型电商项目开发】性能压测-性能监控-堆内存与垃圾回收-39
Basic operations of database and table ----- create index
Pycharm professional download and installation tutorial
1189. Maximum number of "balloons"
随机推荐
NPM install error forced installation
SAP ui5 application development tutorial 106 - how to improve the readability of SAP ui5 application routing URL trial version
"Upside down salary", "equal replacement of graduates" these phenomena show that the testing industry has
Relationship between classes and objects
Basic operation of database and table ----- the concept of index
The performance of major mainstream programming languages is PK, and the results are unexpected
【C】 (written examination questions) pointer and array, pointer
ROS command line tool
大专学历,33岁宝妈又怎样?我照样销售转测试,月入13k+
【Unity】InputSystem
Playwright recording
【FPGA教程案例10】基于Verilog的复数乘法器设计与实现
User login function: simple but difficult
LeetCode周赛 + AcWing周赛(T4/T3)分析对比
各大主流编程语言性能PK,结果出乎意料
[pure tone hearing test] pure tone hearing test system based on MATLAB
Take you ten days to easily complete the go micro service series (IX. link tracking)
潘多拉 IOT 开发板学习(RT-Thread)—— 实验4 蜂鸣器+马达实验【按键外部中断】(学习笔记)
[wave modeling 1] theoretical analysis and MATLAB simulation of wave modeling
[Yocto RM]11 - Features