Skip to content

Commit

Permalink
chore: yarnをpnpmに置き換える (#DTB-1986) (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-se authored Jun 10, 2024
1 parent 7228e51 commit 033864b
Show file tree
Hide file tree
Showing 5 changed files with 4,217 additions and 3,497 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Check
on:
workflow_dispatch:
pull_request:
paths:
- "**.ts"
push:
branches:
- main
Expand All @@ -19,28 +17,27 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
cache-dependency-path: "yarn.lock"
cache: "pnpm"
- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install
- name: Type check
run: yarn type-check

run: pnpm type-check
lint:
name: lint
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
cache-dependency-path: "yarn.lock"
cache: "pnpm"
- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install
- name: Lint
run: yarn lint
run: pnpm lint
39 changes: 39 additions & 0 deletions .github/workflows/lint-pr-with-notion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Lint & Link PR with Notion
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
concurrency: # NOTE: 複数のPRでWorkflowが同時に実行されないように設定する必要がある
group: ${{ github.workflow }}
cancel-in-progress: false
env:
TZ: "Asia/Tokyo"

jobs:
lint-pr-with-notion:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Lint PR Title
id: lint-pr-title
uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
feat
fix
refactor
chore
ci
perf
docs
style
test
revert
subjectPattern: .+\s\(#\w+-\d+\)\s?$ # check if linked with Notion Task
17 changes: 7 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,17 @@
"description": "",
"license": "UNLICENSED",
"private": true,
"engines": {
"node": ">=20",
"yarn": ">=1.22"
},
"type": "module",
"scripts": {
"open:prod": "clasp_config_project=.clasp.prod.json clasp open",
"open:dev": "clasp_config_project=.clasp.dev.json clasp open",
"lint": "eslint src/**/*.ts",
"lint-fix": "yarn lint --fix",
"lint-fix": "pnpm lint --fix",
"format": "prettier --write src/**/*.ts",
"type-check": "tsc --noEmit",
"build": "node build.js",
"buildpush:prod": "yarn run build && cp appsscript.json build/appsscript.json && clasp_config_project=.clasp.prod.json clasp push --force",
"buildpush:dev": " yarn run build && cp appsscript.json build/appsscript.json && clasp_config_project=.clasp.dev.json clasp push --force",
"open:dev": "clasp_config_project=.clasp.dev.json clasp open",
"open:prod": "clasp_config_project=.clasp.prod.json clasp open",
"buildpush:prod": "pnpm run build && cp appsscript.json build/appsscript.json && clasp_config_project=.clasp.prod.json clasp push --force",
"buildpush:dev": " pnpm run build && cp appsscript.json build/appsscript.json && clasp_config_project=.clasp.dev.json clasp push --force",
"postinstall": "mkdir -p build && cp appsscript.json build/appsscript.json"
},
"dependencies": {},
Expand All @@ -34,5 +30,6 @@
"eslint-plugin-import": "^2.29.1",
"prettier": "^3.2.5",
"typescript": "^5.4.5"
}
},
"packageManager": "pnpm@9.2.0+sha512.98a80fd11c2e7096747762304106432b3ddc67dcf54b5a8c01c93f68a2cd5e05e6821849522a06fb76284d41a2660d5e334f2ee3bbf29183bf2e739b1dafa771"
}
Loading

0 comments on commit 033864b

Please sign in to comment.