Skip to content

Commit 0365195

Browse files
all: update to latest Node, package versions
1 parent 703b7b1 commit 0365195

File tree

3 files changed

+13
-16
lines changed

3 files changed

+13
-16
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
strategy:
1313
matrix:
14-
node-version: [18, 20]
14+
node-version: [22, 24]
1515

1616
steps:
1717
- uses: actions/checkout@v4
@@ -22,19 +22,19 @@ jobs:
2222
node-version: ${{ matrix.node-version }}
2323

2424
- name: Cache dependencies
25-
uses: actions/cache@v3
25+
uses: actions/cache@v4
2626
with:
2727
path: node_modules
28-
key: node${{ matrix.node-version }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
28+
key: node${{ matrix.node-version }}-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
2929

3030
- name: Install dependencies
31-
run: yarn --frozen-lockfile
31+
run: npm ci
3232

3333
- name: Build TypeScript
34-
run: yarn build
34+
run: npm run build
3535

3636
- name: Lint files
37-
run: yarn lint
37+
run: npm run lint
3838

3939
- name: Run tests
40-
run: yarn test
40+
run: npm test

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged

package.json

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,15 @@
2121
"src"
2222
],
2323
"scripts": {
24-
"prepublishOnly": "yarn clean && yarn build",
24+
"prepare": "husky",
25+
"prepublishOnly": "npm run clean && npm run build",
2526
"test": "FORCE_COLOR=1 jest",
2627
"lint": "eslint '**/*.ts'",
2728
"build": "tsc",
2829
"clean": "rimraf dist"
2930
},
3031
"engines": {
31-
"node": ">=10"
32+
"node": ">=22"
3233
},
3334
"dependencies": {
3435
"chalk": "^4.1.2",
@@ -47,10 +48,10 @@
4748
"@typescript-eslint/parser": "^6.14.0",
4849
"eslint": "^8.55.0",
4950
"eslint-config-prettier": "^9.1.0",
50-
"husky": "^4.2.3",
51+
"husky": "^9.1.7",
5152
"jest": "^29.7.0",
5253
"jest-date-mock": "^1.0.8",
53-
"lint-staged": "^10.0.9",
54+
"lint-staged": "^15.2.11",
5455
"prettier": "^2.0.2",
5556
"rimraf": "^3.0.0",
5657
"ts-jest": "^29.1.1",
@@ -97,11 +98,6 @@
9798
"<rootDir>/dist/"
9899
]
99100
},
100-
"husky": {
101-
"hooks": {
102-
"pre-commit": "lint-staged"
103-
}
104-
},
105101
"lint-staged": {
106102
"*.ts": [
107103
"eslint --fix",

0 commit comments

Comments
 (0)