Skip to content

Commit 02c0c3f

Browse files
authored
refactor: port resolve-extends to ts (#664)
* build: simplify repo cleaning * build: port execute-rule to ts * test: bring test cases up to speed * fix: add missing node typings
1 parent 285466b commit 02c0c3f

File tree

8 files changed

+678
-723
lines changed

8 files changed

+678
-723
lines changed

Diff for: @commitlint/format/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
},
3838
"license": "MIT",
3939
"devDependencies": {
40-
"@commitlint/test": "^8.0.0",
40+
"@commitlint/utils": "^8.0.0",
4141
"@types/jest": "24.0.13",
4242
"@types/lodash": "4.14.133",
4343
"concurrently": "3.5.1",

Diff for: @commitlint/resolve-extends/jest.config.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
preset: 'ts-jest',
3+
testEnvironment: 'node'
4+
};

Diff for: @commitlint/resolve-extends/package.json

+10-32
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,11 @@
77
"lib/"
88
],
99
"scripts": {
10-
"build": "cross-env NODE_ENV=production babel src --out-dir lib --source-maps",
10+
"build": "tsc",
1111
"deps": "dep-check",
1212
"pkg": "pkg-check",
13-
"start": "concurrently \"ava -c 4 --verbose --watch\" \"yarn run watch\"",
14-
"test": "ava -c 4 --verbose",
15-
"watch": "babel src --out-dir lib --watch --source-maps"
16-
},
17-
"ava": {
18-
"files": [
19-
"src/**/*.test.js",
20-
"!lib/**/*"
21-
],
22-
"source": [
23-
"src/**/*.js",
24-
"!lib/**/*"
25-
],
26-
"babel": "inherit",
27-
"require": [
28-
"babel-register"
29-
]
30-
},
31-
"babel": {
32-
"presets": [
33-
"babel-preset-commitlint"
34-
]
13+
"start": "concurrently \"jest --watchAll\" \"tsc -w\"",
14+
"test": "jest"
3515
},
3616
"engines": {
3717
"node": ">=4"
@@ -57,19 +37,17 @@
5737
"license": "MIT",
5838
"devDependencies": {
5939
"@commitlint/parse": "^8.0.0",
60-
"@commitlint/test": "^8.0.0",
6140
"@commitlint/utils": "^8.0.0",
62-
"@marionebl/sander": "0.6.1",
63-
"ava": "0.22.0",
64-
"babel-cli": "6.26.0",
65-
"babel-preset-commitlint": "^8.0.0",
66-
"babel-register": "6.26.0",
41+
"@types/jest": "24.0.13",
42+
"@types/lodash": "^4.14.130",
43+
"@types/resolve-from": "^5.0.1",
6744
"concurrently": "3.5.1",
68-
"cross-env": "5.1.1",
69-
"execa": "0.9.0"
45+
"jest": "24.8.0",
46+
"ts-jest": "24.0.2",
47+
"typescript": "3.4.5"
7048
},
7149
"dependencies": {
72-
"babel-runtime": "6.26.0",
50+
"@types/node": "^12.0.2",
7351
"import-fresh": "^3.0.0",
7452
"lodash": "4.17.11",
7553
"resolve-from": "^5.0.0",

Diff for: @commitlint/resolve-extends/src/index.test.js

-295
This file was deleted.

0 commit comments

Comments
 (0)