Skip to content

Commit 9735fc1

Browse files
committed
Upgrading
1 parent bbbc7b9 commit 9735fc1

File tree

7 files changed

+424
-1141
lines changed

7 files changed

+424
-1141
lines changed

.github/workflows/main.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Run Unit Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v3
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: 23
22+
23+
- name: Install dependencies
24+
run: yarn install
25+
26+
- name: Run unit tests
27+
run: yarn ut

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v21.6.2
1+
v23.0.0

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# TypeScript and ESLint template
1+
# TypeScript template
22

3-
My opinionated TypeScript and ESLint template.
3+
My opinionated TypeScript template that sets up a project with EsLint, testing, package manager, CI/CD, and more.
44

55
- Using ESLint's new configuration system - https://eslint.org/docs/latest/use/configure/configuration-files-new
66
- Using Yarn as it simplifies adding arguments when running scripts.

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,27 @@
2525
"start": "node dist/src/index.js",
2626
"test": "yarn lint && yarn ut",
2727
"update-dependencies": "npx npm-check-updates -u && yarn && yarn dedupe",
28-
"ut": "vitest",
28+
"ut": "node --experimental-test-coverage --import tsx --test src/**/*.test.ts",
2929
"watch": "tsc -w"
3030
},
3131
"devDependencies": {
32-
"@stylistic/eslint-plugin": "^2.2.2",
33-
"@types/node": "^20.14.5",
34-
"@typescript-eslint/eslint-plugin": "^7.13.1",
35-
"@typescript-eslint/parser": "^7.13.1",
36-
"eslint": "^9.5.0",
32+
"@stylistic/eslint-plugin": "^2.9.0",
33+
"@types/node": "^22.7.7",
34+
"@typescript-eslint/eslint-plugin": "^8.10.0",
35+
"@typescript-eslint/parser": "^8.10.0",
36+
"eslint": "^9.13.0",
3737
"eslint-plugin-ban": "^1.6.0",
38-
"eslint-plugin-simple-import-sort": "^12.1.0",
39-
"eslint-plugin-unused-imports": "^4.0.0",
38+
"eslint-plugin-simple-import-sort": "^12.1.1",
39+
"eslint-plugin-unused-imports": "^4.1.4",
4040
"ts-node": "^10.9.2",
41-
"typescript": "^5.4.5",
42-
"vitest": "^1.6.0"
41+
"tsx": "^4.19.1",
42+
"typescript": "^5.6.3"
4343
},
44-
"packageManager": "yarn@4.3.0",
44+
"packageManager": "yarn@4.5.0",
4545
"engines": {
46-
"node": ">=21.6.2"
46+
"node": ">=23.0.0"
4747
},
4848
"dependencies": {
49-
"solid-js": "^1.8.17"
49+
"solid-js": "^1.9.2"
5050
}
5151
}

src/spec/index.spec.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/tests/index.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import assert from "node:assert/strict"
2+
import { test } from "node:test"
3+
4+
import { addTwoNumbers } from "../utils/addTwoNumbers.js"
5+
import { multiplyTwoNumbers } from "../utils/multiplyTwoNumbers.js"
6+
7+
await test("addTwoNumbers(5, 10) should return 15", () => {
8+
const result = addTwoNumbers(5, 10)
9+
assert.strictEqual(result, 15)
10+
})
11+
12+
await test("multiplyTwoNumbers(5, 10) should return 50", () => {
13+
const result = multiplyTwoNumbers(5, 10)
14+
assert.strictEqual(result, 50)
15+
})

0 commit comments

Comments
 (0)