Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[공통] ts-monorepo-template 를 최신화합니다. #10

Merged
merged 15 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v3
with:
version: 8
version: 9.1.1
run_install: true
- run: pnpm run prettier

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요거 쓰지말고 대신 package.json의 engine 따라가게하실수 있을까여?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네잉

- run: pnpm run lint
Expand All @@ -23,6 +23,6 @@ jobs:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v3
with:
version: 8
version: 9.1.1
run_install: true
- run: pnpm run test
45 changes: 45 additions & 0 deletions .github/workflows/detect-changed-packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: detect changed packages

on:
pull_request:
branches: ['**']
types: [opened, reopened, labeled, unlabeled, synchronize]

concurrency:
group: detect-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
detect:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
token: ${{ secrets.ACTION_TOKEN }}
fetch-depth: 0

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: setup pnpm and install dependencies
uses: pnpm/action-setup@v3
with:
version: 9.1.1
run_install: true

- name: install dependencies
run: pnpm install --frozen-lockfile

- name: 'detect changed packages'
uses: NaverPayDev/changeset-actions/detect-add@main
with:
github_token: ${{ secrets.ACTION_TOKEN }}
packages_dir: packages,share
skip_label: skip-detect-change
skip_branches: main
formatting_script: pnpm run markdownlint:fix
32 changes: 20 additions & 12 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,33 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
token: ${{ secrets.ACTION_TOKEN }}
fetch-depth: 0

- name: Setup Node.js 20.x
uses: actions/setup-node@v3
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: '20.x'

- name: Install dependencies
- name: setup pnpm and install dependencies
uses: pnpm/action-setup@v3
with:
version: 8
version: 9.1.1
run_install: true

- name: Create Release Pull Request or Publish to npm
- name: Create Release Pull Request
id: changesets
uses: changesets/action@v1
uses: NaverPayDev/changeset-actions/publish@main
with:
title: '🚀 version changed packages'
commit: '📦 bump changed packages version'
publish: pnpm release
github_token: ${{ secrets.ACTION_TOKEN }}
npm_token: ${{ secrets.NPM_TOKEN }}
git_username: npayfebot
git_email: npay.fe.bot@navercorp.com
publish_script: pnpm release
pr_title: '🚀 version changed packages'
commit_message: '📦 bump changed packages version'
create_github_release_tag: true
formatting_script: pnpm run markdownlint:fix
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}
17 changes: 0 additions & 17 deletions .github/workflows/size-limit.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

3 changes: 3 additions & 0 deletions .lefthook/commit-msg/commit-helper.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
COMMIT_MSG_FILE=$1

npx --yes @naverpay/commit-helper@latest $1
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.github
.changeset
.husky
.husky
.lefthook
18 changes: 0 additions & 18 deletions .size-limit.js

This file was deleted.

12 changes: 12 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
pre-commit:
parallel: true
commands:
lint:
skip:
- ref: main
- ref: develop
run: npx lint-staged
commit-msg:
scripts:
"commit-helper.sh":
runner: bash
31 changes: 18 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
{
"name": "ts-monorepo-template",
"author": "@NaverPayDev/frontend",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/NaverPayDev/ts-monorepo-template.git"
},
"description": "ts-monorepo-template",
"version": "0.0.0",
"keywords": [
"naver",
"naver-financial",
"monorepo",
"monorepo-template",
"template",
"typescript"
],
"scripts": {
"start": "turbo run start",
"build": "turbo run build",
Expand All @@ -26,17 +34,14 @@
"**/*.{ts,tsx,js,jsx}": "eslint"
},
"devDependencies": {
"@changesets/cli": "^2.26.2",
"@naverpay/eslint-config": "^0.2.0",
"@naverpay/markdown-lint": "^0.0.2",
"@naverpay/prettier-config": "^0.0.2",
"@size-limit/preset-big-lib": "^11.0.2",
"glob": "^9.3.4",
"husky": "^8.0.3",
"lint-staged": "^15.0.1",
"size-limit": "^11.0.2",
"turbo": "^1.10.16",
"typescript": "^5.2.2"
"@changesets/cli": "^2.27.9",
"@naverpay/eslint-config": "^1.0.7",
"@naverpay/markdown-lint": "^0.0.3",
"@naverpay/prettier-config": "^1.0.0",
"lefthook": "^1.8.2",
"lint-staged": "^15.2.10",
"turbo": "^2.2.3",
"typescript": "^5.6.3"
},
"packageManager": "pnpm@8.14.3"
"packageManager": "pnpm@9.1.1"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요거 저희 베이스 이미지 최신인 9.12.3으로 하시죠~

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네넵 그럼 이거 로컬에서 corepack enabled 처리 해야되는거죠??

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

node 도 22로 올릴까요?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네넵 그럼 이거 로컬에서 corepack enabled 처리 해야되는거죠??

네네 그리고 step 에 corepack enable 추가하시면 될듯

node 도 22로 올릴까요?

굿굿

}
Loading
Loading