
현재 중인 react native프로젝트의 package.json중 일부
{
"name": "secreto",
"main": "expo-router/entry",
"version": "1.0.0",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"test": "jest --watchAll",
"lint": "expo lint",
"build": "expo build"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"@expo/ngrok": "^4.1.3",
"@expo/vector-icons": "^14.0.2",
"@react-native-community/netinfo": "11.4.1",
"@react-navigation/bottom-tabs": "^7.2.0",
"@react-navigation/native": "^7.0.14",
"@shopify/flash-list": "1.7.6",
"@tanstack/react-query": "^5.74.4",
"expo": "^53.0.5",
"expo-blur": "~14.1.4",
"expo-constants": "~17.1.5",
...
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@gorhom/bottom-sheet": "^5.1.2",
"@react-native-async-storage/async-storage": "^2.1.2",
"@react-native-community/datetimepicker": "^8.3.0",
"@react-native-community/slider": "^4.5.6",
"@types/jest": "^29.5.12",
"@types/react": "~19.0.10",
...
},
"private": true
}
scripts 객체는 자주 사용되는 개발 명령어를 정의하고, 이를 짧은 이름으로 실행할 수 있도록 해줌
"scripts": {
"start": "expo start",
// npm run start
"android": "expo start --android",
// npm run android
"ios": "expo start --ios",
// npm run ios
"web": "expo start --web",
// npm run web
"test": "jest --watchAll",
// npm test
"lint": "expo lint",
"build": "expo build"
}
^와 ~는 패키지 매니저(npm 또는 yarn)가 자동으로 업데이트할 수 있는 버전의 범위를 지정하는 데 사용.^ (Caret)"^4.1.3"은 4.x.x 범위 내에서 가장 최신 버전을 사용하겠다는 의미.4.1.4, 4.2.0 등으로 자동 업데이트될 수 있지만, 주요 버전이 바뀌는 5.0.0으로는 업데이트되지 않음.~ (Tilde)"~14.1.4"는 14.1.x 범위 내에서 가장 최신 버전을 사용하겠다는 의미.14.1.5 등으로 자동 업데이트될 수 있지만, 마이너 버전이 바뀌는 14.2.0이나 주요 버전이 바뀌는 15.0.0으로는 업데이트되지 않음."11.4.1", "19.0.0")^나 ~ 없이 정확한 버전이 명시된 경우에는 해당 버전만 사용하며, 자동 업데이트되지 않음.