我们何时以及如何升级create-react-app
添加到package.json
的依赖项?
今天我运行了npx create-react-app my-app --template typescript
,它添加了以下依赖项:
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"@types/jest": "^24.0.0",
"@types/node": "^12.0.0",
"@types/react": "^16.9.0",
"@types/react-dom": "^16.9.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "3.4.3",
"typescript": "~3.7.2"
}
即使某些版本有较新的版本:
我们可以随时升级任何依赖项,还是将它们绑定到react-scripts
的特定版本?如果是后者,我们如何知道何时升级以及升级到哪个版本?