Skip to content

Commit 4896810

Browse files
authored
build: update infra (ikatyang#652)
1 parent ef5ce59 commit 4896810

23 files changed

+3157
-6085
lines changed

.gitattributes

-1
This file was deleted.

.github/actions/setup/action.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: setup
2+
description: setup
3+
runs:
4+
using: composite
5+
steps:
6+
- uses: pnpm/action-setup@v2
7+
- uses: actions/setup-node@v3
8+
with:
9+
cache: pnpm
10+
node-version: '18'
11+
registry-url: 'https://registry.npmjs.org'
12+
- run: pnpm install
13+
shell: bash

.github/workflows/lint.yml

-24
This file was deleted.

.github/workflows/test.yml

+21-18
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
1-
name: Test
2-
31
on:
4-
- push
5-
- pull_request
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
branches:
7+
- master
68

79
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: ./.github/actions/setup
15+
- run: pnpm run lint
16+
check:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v3
20+
- uses: ./.github/actions/setup
21+
- run: pnpm run check
822
test:
9-
name: Test
1023
runs-on: ubuntu-latest
1124
steps:
12-
- name: Checkout Repository
13-
uses: actions/checkout@v2
14-
15-
- name: Setup Node.js
16-
uses: actions/setup-node@v2-beta
17-
with:
18-
node-version: "16"
19-
20-
- name: Install Dependencies
21-
run: yarn
22-
23-
- name: Test
24-
run: yarn test --ci
25+
- uses: actions/checkout@v3
26+
- uses: ./.github/actions/setup
27+
- run: pnpm run test

.github/workflows/update.yml

+4-16
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,16 @@ name: Up to Date
22

33
on:
44
schedule:
5-
- cron: "0 0 * * *"
5+
- cron: '0 0 * * *'
66

77
jobs:
88
update:
99
name: Update
1010
runs-on: ubuntu-latest
1111
steps:
12-
- name: Checkout Repository
13-
uses: actions/checkout@v2
14-
with:
15-
fetch-depth: 0
16-
17-
- name: Setup Node.js
18-
uses: actions/setup-node@v2-beta
19-
with:
20-
node-version: "16"
21-
22-
- name: Install Dependencies
23-
run: yarn
24-
25-
- name: Generate Cheat Sheet
26-
run: yarn generate
12+
- uses: actions/checkout@v3
13+
- uses: ./.github/actions/setup
14+
- run: pnpm run generate
2715

2816
- name: Push New Cheat Sheet to Updated Branch
2917
run: |

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
node_modules/
1+
/.vscode/
2+
/node_modules/

.prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/pnpm-lock.yaml
2+
/README.md

.prettierrc.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
arrowParens: avoid
2+
semi: false
3+
singleQuote: true

package.json

+14-17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "emoji-cheat-sheet",
3+
"type": "module",
34
"version": "0.0.0-dev",
45
"private": true,
56
"repository": "ikatyang/emoji-cheat-sheet",
@@ -11,25 +12,21 @@
1112
},
1213
"license": "MIT",
1314
"scripts": {
14-
"lint": "tslint -p . --type-check",
15-
"test": "jest",
16-
"generate": "node ./scripts/generate.js > ./README.md"
17-
},
18-
"dependencies": {
19-
"request": "^2.88.0"
15+
"lint": "prettier --check .",
16+
"check": "tsc --noEmit",
17+
"test": "vitest",
18+
"generate": "vite-node ./scripts/generate.ts -- run > ./README.md"
2019
},
2120
"devDependencies": {
22-
"@types/jest": "24.0.18",
23-
"@types/node": "12.7.4",
24-
"@types/request": "2.48.2",
25-
"jest": "24.9.0",
26-
"jest-playback": "2.0.2",
27-
"prettier": "1.17.0",
28-
"tslint": "5.19.0",
29-
"tslint-plugin-prettier": "2.0.1",
30-
"typescript": "3.6.2"
21+
"jest-playback": "4.0.0",
22+
"prettier": "3.0.0",
23+
"typescript": "5.1.6",
24+
"vite": "4.4.6",
25+
"vite-node": "0.33.0",
26+
"vitest": "0.33.0"
3127
},
3228
"engines": {
33-
"node": ">= 12"
34-
}
29+
"node": ">=18"
30+
},
31+
"packageManager": "pnpm@8.6.6"
3532
}

0 commit comments

Comments
 (0)