Skip to content

Commit b4f2e5e

Browse files
committed
feat!: move to esm
1 parent 3fd015f commit b4f2e5e

18 files changed

+4489
-4100
lines changed
File renamed without changes.

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20
1+
20.19.0

package.json

Lines changed: 20 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,20 @@
66
"repository": "shellscape/loglevelnext",
77
"author": "Andrew Powell <[email protected]>",
88
"homepage": "https://github.com/shellscape/loglevelnext",
9-
"main": "./dist/index.js",
109
"module": "./dist/index.mjs",
10+
"type": "module",
1111
"exports": {
1212
".": {
13-
"import": {
14-
"types": "./dist/index.d.ts",
15-
"default": "./dist/index.mjs"
16-
},
17-
"require": {
18-
"types": "./dist/index.d.ts",
19-
"default": "./dist/index.js"
20-
}
13+
"types": "./dist/index.d.ts",
14+
"default": "./dist/index.mjs"
2115
}
2216
},
2317
"engines": {
24-
"node": ">= 18"
18+
"node": ">= 20.19.0"
2519
},
2620
"scripts": {
27-
"build": "tsup src/index.ts --format esm,cjs --dts",
28-
"ci:coverage": "nyc pnpm test && nyc report --reporter=text-lcov > coverage.lcov",
21+
"build": "tsc --project tsconfig.json --noEmit false",
22+
"ci:coverage": "vitest run --coverage && vitest coverage report --reporter=lcov",
2923
"commitlint": "commitlint",
3024
"commitmsg": "commitlint -e $GIT_PARAMS",
3125
"lint": "pnpm lint:docs && pnpm lint:json && pnpm lint:package && pnpm lint:js",
@@ -34,10 +28,9 @@
3428
"lint:js": "eslint --fix --cache src test",
3529
"lint:json": "prettier --write tsconfig.*.json",
3630
"lint:package": "prettier --write **/package.json --plugin=prettier-plugin-package",
37-
"prebuild": "tsc --project tsconfig.json",
3831
"prepublishOnly": "pnpm build",
3932
"security": "pnpm audit --audit-level high",
40-
"test": "FORCE_COLOR=3 ava"
33+
"test": "vitest run"
4134
},
4235
"files": [
4336
"dist",
@@ -61,35 +54,24 @@
6154
"trace",
6255
"warn"
6356
],
57+
"dependencies": {
58+
"tsx": "^4.20.3"
59+
},
6460
"devDependencies": {
65-
"@commitlint/cli": "17.8.0",
66-
"@commitlint/config-conventional": "17.8.0",
67-
"@types/node": "^20.8.6",
68-
"@types/sinon": "^10.0.2",
69-
"ava": "^5.3.1",
70-
"chalk": "^4.0.0",
61+
"@commitlint/cli": "19.8.1",
62+
"@commitlint/config-conventional": "19.8.1",
63+
"@types/node": "^24.1.0",
64+
"@types/sinon": "^17.0.4",
65+
"chalk": "^5.4.1",
7166
"eslint-config-shellscape": "^6.0.1",
72-
"husky": "^8.0.3",
73-
"lint-staged": "15.0.1",
74-
"nyc": "^15.0.1",
67+
"husky": "^9.1.7",
68+
"lint-staged": "16.1.2",
7569
"pre-commit": "^1.2.2",
76-
"sinon": "11.1.1",
77-
"ts-node": "^10.0.0",
78-
"tsup": "^7.2.0",
79-
"typescript": "^5.2.2"
70+
"sinon": "21.0.0",
71+
"typescript": "^5.2.2",
72+
"vitest": "^2.1.4"
8073
},
8174
"types": "./dist/index.d.ts",
82-
"ava": {
83-
"extensions": [
84-
"ts"
85-
],
86-
"require": [
87-
"ts-node/register"
88-
],
89-
"files": [
90-
"test/*.ts"
91-
]
92-
},
9375
"husky": {
9476
"hooks": {
9577
"pre-commit": "lint-staged"

0 commit comments

Comments
 (0)