Skip to content

Commit

Permalink
🧑‍💻 로컬 deploy script 하나로 통일, devDependency 최신화 (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
woohm402 authored May 16, 2024
1 parent 353de68 commit aa8256b
Show file tree
Hide file tree
Showing 14 changed files with 2,487 additions and 1,453 deletions.
5 changes: 1 addition & 4 deletions apps/friends-react-native/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
module.exports = {
root: true,
extends: ['@react-native', 'snutt'],
plugins: ['jest'],
extends: ['@react-native', 'plugin:prettier/recommended'],
rules: {
'react/react-in-jsx-scope': 'off',
curly: 'off',
},
};
53 changes: 27 additions & 26 deletions apps/friends-react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@
"start:assets": "serve -s public -l 8082",
"start": "APP_ENV=local react-native start",
"build:android": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output dist/android.jsbundle --assets-dest android/com/wafflestudio/snutt-staging/src/main/res/",
"build:ios": "react-native bundle --dev false --entry-file index.js --bundle-output dist/ios.jsbundle --assets-dest ./ios --platform ios",
"deploy:dev": "scripts/deploy.sh dev",
"deploy:prod": "echo prod 배포는 github 에서 직접 릴리즈를 생성해 주세요."
"build:ios": "react-native bundle --dev false --entry-file index.js --bundle-output dist/ios.jsbundle --assets-dest ./ios --platform ios"
},
"dependencies": {
"@react-native-async-storage/async-storage": "1.19.8",
"@react-navigation/drawer": "6.6.3",
"@react-navigation/native": "6.1.7",
"@tanstack/react-query": "5.8.7",
"react": "18.2.0",
"react": "18.3.1",
"react-native": "0.72.3",
"react-native-gesture-handler": "2.12.0",
"react-native-modal": "13.0.1",
Expand All @@ -28,29 +26,32 @@
"react-native-svg": "13.11.0"
},
"devDependencies": {
"@babel/core": "7.23.7",
"@babel/preset-env": "7.23.7",
"@babel/runtime": "7.23.7",
"@react-native/eslint-config": "0.74.0",
"@react-native/metro-config": "0.73.2",
"@tsconfig/react-native": "3.0.2",
"@types/jest": "29.5.4",
"@babel/core": "7.24.5",
"@babel/preset-env": "7.24.5",
"@babel/runtime": "7.24.5",
"@react-native/eslint-config": "0.74.83",
"@react-native/metro-config": "0.74.83",
"@tsconfig/react-native": "3.0.5",
"@types/jest": "29.5.12",
"@types/metro-config": "0.76.3",
"@types/react": "18.2.46",
"@types/react-native-dotenv": "0.2.0",
"@types/react-test-renderer": "18.0.0",
"babel-jest": "29.2.1",
"eslint-config-snutt": "*",
"eslint-plugin-jest": "27.6.1",
"jest": "29.2.1",
"metro-react-native-babel-preset": "0.76.5",
"react-native-dotenv": "3.4.9",
"react-native-svg-transformer": "1.1.0",
"react-test-renderer": "18.2.0",
"serve": "14.2.1",
"ts-jest": "29.1.1",
"ts-node": "10.9.1",
"typescript": "5.2.2"
"@types/react": "18.3.2",
"@types/react-native-dotenv": "0.2.2",
"@types/react-test-renderer": "18.3.0",
"babel-jest": "29.7.0",
"eslint": "8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "28.5.0",
"eslint-plugin-prettier": "5.1.3",
"jest": "29.7.0",
"metro-react-native-babel-preset": "0.77.0",
"prettier": "3.2.5",
"react-native-dotenv": "3.4.11",
"react-native-svg-transformer": "1.4.0",
"react-test-renderer": "18.3.1",
"serve": "14.2.3",
"ts-jest": "29.1.2",
"ts-node": "10.9.2",
"typescript": "5.4.5"
},
"engines": {
"node": ">=16"
Expand Down
4 changes: 2 additions & 2 deletions apps/friends-react-native/src/app/components/Carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export const Carousel = <K extends string>({ items, gap, width, current, setCurr
newPosition > currentIndex + 0.2
? currentIndex + 1
: newPosition < currentIndex - 0.2
? currentIndex - 1
: currentIndex;
? currentIndex - 1
: currentIndex;
setIsScrolling(false);
setCurrent(items.at(newPage)?.key);
};
Expand Down
2 changes: 1 addition & 1 deletion apps/snutt-ev-webview/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
extends: ['next/core-web-vitals', 'snutt'],
extends: ['next/core-web-vitals', 'plugin:prettier/recommended'],
};
25 changes: 14 additions & 11 deletions apps/snutt-ev-webview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,22 @@
"e2e": "playwright test"
},
"dependencies": {
"js-cookie": "^3.0.5",
"next": "14.0.4",
"react": "18.2.0",
"react-dom": "18.2.0"
"js-cookie": "3.0.5",
"next": "14.2.3",
"react": "18.3.1",
"react-dom": "18.3.1"
},
"devDependencies": {
"@playwright/test": "1.40.1",
"@types/js-cookie": "^3.0.6",
"@types/node": "18.11.18",
"@types/react": "18.2.46",
"@types/react-dom": "18.2.18",
"eslint-config-next": "14.0.4",
"eslint-config-snutt": "*",
"typescript": "5.2.2"
"@types/js-cookie": "3.0.6",
"@types/node": "20.12.12",
"@types/react": "18.3.2",
"@types/react-dom": "18.3.0",
"eslint": "8.57.0",
"eslint-config-next": "14.2.3",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.1.3",
"prettier": "3.2.5",
"typescript": "5.4.5"
}
}
56 changes: 27 additions & 29 deletions apps/snutt-webclient/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,47 +13,45 @@
"preview:test": "vite preview --mode test",
"test:e2e": "playwright test",
"test": "jest",
"lint": "npx eslint ./src",
"deploy:dev": "scripts/deploy.sh dev",
"deploy:prod": "echo prod 배포는 github 에서 직접 릴리즈를 생성해 주세요."
"lint": "npx eslint ./src"
},
"dependencies": {
"@tanstack/react-query": "5.14.1",
"@tanstack/react-query-devtools": "5.14.1",
"@tanstack/react-query": "5.36.2",
"@tanstack/react-query-devtools": "5.36.2",
"@wafflestudio/truffle-browser": "0.2.1",
"dayjs": "1.11.10",
"msw": "2.0.11",
"react": "18.2.0",
"react-dom": "18.2.0",
"dayjs": "1.11.11",
"msw": "2.3.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-facebook-login": "4.1.1",
"react-router-dom": "6.21.0",
"styled-components": "6.1.1"
"react-router-dom": "6.23.1",
"styled-components": "6.1.11"
},
"devDependencies": {
"@jest/globals": "29.7.0",
"@playwright/test": "1.40.1",
"@tanstack/eslint-plugin-query": "^5.12.1",
"@types/node": "20.10.5",
"@types/react": "18.2.45",
"@types/react-dom": "18.2.18",
"@types/react-facebook-login": "4.1.10",
"@tanstack/eslint-plugin-query": "5.35.6",
"@types/node": "20.12.12",
"@types/react": "18.3.2",
"@types/react-dom": "18.3.0",
"@types/react-facebook-login": "4.1.11",
"@types/styled-components": "5.1.34",
"@typescript-eslint/eslint-plugin": "6.14.0",
"@typescript-eslint/parser": "6.14.0",
"@vitejs/plugin-react-swc": "3.5.0",
"eslint": "8.56.0",
"@typescript-eslint/eslint-plugin": "7.9.0",
"@typescript-eslint/parser": "7.9.0",
"@vitejs/plugin-react-swc": "3.6.0",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.0.1",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-simple-import-sort": "10.0.0",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-react": "7.34.1",
"eslint-plugin-react-hooks": "4.6.2",
"eslint-plugin-simple-import-sort": "12.1.0",
"jest": "29.7.0",
"prettier": "3.1.1",
"serve": "^14.2.1",
"ts-jest": "29.1.1",
"prettier": "3.2.5",
"serve": "14.2.3",
"ts-jest": "29.1.2",
"ts-node": "10.9.2",
"typescript": "5.3.3",
"vite": "5.0.10"
"typescript": "5.4.5",
"vite": "5.2.11"
},
"msw": {
"workerDirectory": "public"
Expand Down
19 changes: 8 additions & 11 deletions apps/snutt-webclient/public/mockServiceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
/* tslint:disable */

/**
* Mock Service Worker (2.0.11).
* Mock Service Worker.
* @see https://github.com/mswjs/msw
* - Please do NOT modify this file.
* - Please do NOT serve this file on production.
*/

const INTEGRITY_CHECKSUM = 'c5f7f8e188b673ea4e677df7ea3c5a39'
const PACKAGE_VERSION = '2.3.0'
const INTEGRITY_CHECKSUM = '26357c79639bfa20d64c0efca2a87423'
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
const activeClientIds = new Set()

Expand Down Expand Up @@ -48,7 +49,10 @@ self.addEventListener('message', async function (event) {
case 'INTEGRITY_CHECK_REQUEST': {
sendToClient(client, {
type: 'INTEGRITY_CHECK_RESPONSE',
payload: INTEGRITY_CHECKSUM,
payload: {
packageVersion: PACKAGE_VERSION,
checksum: INTEGRITY_CHECKSUM,
},
})
break
}
Expand Down Expand Up @@ -202,13 +206,6 @@ async function getResponse(event, client, requestId) {
return passthrough()
}

// Bypass requests with the explicit bypass header.
// Such requests can be issued by "ctx.fetch()".
const mswIntention = request.headers.get('x-msw-intention')
if (['bypass', 'passthrough'].includes(mswIntention)) {
return passthrough()
}

// Notify the client that a request has been intercepted.
const requestBuffer = await request.arrayBuffer()
const clientMessage = await sendToClient(
Expand Down Expand Up @@ -240,7 +237,7 @@ async function getResponse(event, client, requestId) {
return respondWithMock(clientMessage.data)
}

case 'MOCK_NOT_FOUND': {
case 'PASSTHROUGH': {
return passthrough()
}
}
Expand Down
30 changes: 0 additions & 30 deletions apps/snutt-webclient/scripts/deploy.sh

This file was deleted.

2 changes: 1 addition & 1 deletion apps/snutt-webclient/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async function startApp() {

if (ENV.APP_ENV === 'test') {
const { worker } = await import('@/mocks/browser');
worker.start({ onUnhandledRequest: 'bypass' });
await worker.start({ onUnhandledRequest: 'bypass' });
}

import('@/assets/members').then(({ members }) => {
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
"scripts": {
"lint": "turbo run lint",
"test": "turbo run test",
"tsc": "turbo run tsc"
"tsc": "turbo run tsc",
"deploy:friends-react-native": "./scripts/deploy.sh friends-react-native",
"deploy:snutt-webclient": "./scripts/deploy.sh snutt-webclient"
},
"dependencies": {
"turbo": "1.10.12"
"turbo": "1.13.3"
},
"workspaces": [
"apps/*",
"packages/*"
"apps/*"
]
}
13 changes: 0 additions & 13 deletions packages/eslint-config-snutt/index.js

This file was deleted.

14 changes: 0 additions & 14 deletions packages/eslint-config-snutt/package.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
#!/bin/sh

env=$1
app=$1

if [ "$app" != "snutt-webclient" ] && [ "$app" != "friends-react-native" ]; then
echo
echo "\033[31mInvalid app name.\033[0m"
echo
exit 1
fi

today=$(date +%y.%m.%d)
tagFormat="friends-react-native-${env}-${today}-"
tagFormat="${app}-dev-${today}-"

git fetch --all --tags
tagCount=$(git tag -l | grep -c $tagFormat)
Expand Down
Loading

0 comments on commit aa8256b

Please sign in to comment.