Skip to content

Commit 6e4418d

Browse files
feat: Node.js v22 & ESM
1 parent e1d53ae commit 6e4418d

6 files changed

Lines changed: 143 additions & 127 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Basic template for robust development of TypeScript apps with:
44

5-
- [Node.js](https://nodejs.org/docs/latest-v20.x/api/index.html) - Latest LTS version of Node. Currently it's **LTS/Iron** (v20).
5+
- [Node.js](https://nodejs.org/docs/latest-v22.x/api/index.html) - Latest LTS version of Node. Currently it's **LTS/Jod** (v22.14.0).
66
- [pnpm](https://pnpm.io/) - Fast, disk space efficient package manager.
77
- [TypeScript](https://www.typescriptlang.org/) - JavaScript with syntax for types.
88
- [ESM Modules](https://nodejs.org/api/esm.html) - modern JavaScript modules.
@@ -13,7 +13,7 @@ Basic template for robust development of TypeScript apps with:
1313
## Available Scripts
1414

1515
- `start`
16-
- `start:watch`
16+
- `dev`
1717
- `clean`
1818
- `lint`
1919
- `format`

__tests__/main.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { describe, it } from 'node:test'
22
import { strictEqual } from 'node:assert'
33

4-
import { getPetByKind, myPets } from '../src/main'
5-
import { PetKind } from '../src/types'
4+
import { getPetByKind, myPets } from '../src/main.js'
5+
import { PetKind } from '../src/types.js'
66

77
describe('Pets Functions', () => {
88
describe('When providing', () => {

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
33
"organizeImports": {
44
"enabled": true
55
},

package.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
"description": "Basic template for robust development of TypeScript apps",
66
"main": "build/src/main.js",
77
"homepage": "https://github.com/PoProstuWitold/node-ts-template",
8+
"type": "module",
89
"engines": {
910
"node": ">=22.x",
10-
"pnpm": ">=9.x"
11+
"pnpm": ">=10.x"
1112
},
1213
"scripts": {
1314
"start": "node build/src/main.js",
14-
"start:watch": "NODE_ENV='development' node --watch --import tsx src/main.ts",
15+
"dev": "NODE_ENV='development' node --watch --import tsx src/main.ts",
1516
"clean": "rimraf coverage build tmp",
1617
"lint": "pnpm biome lint --write ./src",
1718
"format": "pnpm biome format --write ./src",
@@ -32,13 +33,18 @@
3233
"license": "MIT",
3334
"devDependencies": {
3435
"@biomejs/biome": "^1.9.4",
35-
"@types/node": "^22.13.4",
36+
"@types/node": "^22.13.11",
3637
"rimraf": "^6.0.1",
37-
"tsx": "^4.19.2",
38-
"typescript": "^5.7.3"
38+
"tsx": "^4.19.3",
39+
"typescript": "^5.8.2"
3940
},
4041
"volta": {
4142
"node": "22.14.0",
42-
"pnpm": "10.4.0"
43+
"pnpm": "10.6.5"
44+
},
45+
"pnpm": {
46+
"onlyBuiltDependencies": [
47+
"esbuild"
48+
]
4349
}
4450
}

0 commit comments

Comments
 (0)