Skip to content

Commit 9028aa6

Browse files
ybiquitousmarionebl
authored andcommitted
chore: publish only needed files
* feat: publish the minimum files to npm Add new test function to assert publishing files #144 * test: improve test according to feedbacks in review * refactor: derive strictly required files from package.json * chore: remove unused deps * chore: move unexpected to devDependencies * chore: convert pkg tests to utility * style: correct typo * chore: explicitly state published files
1 parent 5baf11d commit 9028aa6

File tree

32 files changed

+635
-651
lines changed

32 files changed

+635
-651
lines changed

@alias/commitlint-config-angular/package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22
"name": "commitlint-config-angular",
33
"version": "6.0.2",
44
"description": "Shareable commitlint config enforcing the angular commit convention",
5+
"files": ["index.js"],
56
"scripts": {
67
"test": "exit 0",
7-
"clean": "exit 0"
8+
"clean": "exit 0",
9+
"deps": "dep-check",
10+
"pkg": "pkg-check"
811
},
912
"xo": false,
1013
"repository": {
@@ -25,5 +28,8 @@
2528
"homepage": "https://github.com/marionebl/commitlint#readme",
2629
"dependencies": {
2730
"@commitlint/config-angular": "^6.0.2"
31+
},
32+
"devDependencies": {
33+
"@commitlint/utils": "^6.0.2"
2834
}
2935
}

@alias/commitlint-config-lerna-scopes/package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22
"name": "commitlint-config-lerna-scopes",
33
"version": "6.0.2",
44
"description": "Shareable commitlint config enforcing lerna package names as scopes",
5+
"files": ["index.js"],
56
"scripts": {
67
"test": "exit 0",
7-
"clean": "exit 0"
8+
"clean": "exit 0",
9+
"deps": "dep-check",
10+
"pkg": "pkg-check"
811
},
912
"xo": false,
1013
"repository": {
@@ -25,5 +28,8 @@
2528
"homepage": "https://github.com/marionebl/commitlint#readme",
2629
"dependencies": {
2730
"@commitlint/config-lerna-scopes": "^6.0.2"
31+
},
32+
"devDependencies": {
33+
"@commitlint/utils": "^6.0.2"
2834
}
2935
}

@alias/commitlint-config-patternplate/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22
"name": "commitlint-config-patternplate",
33
"version": "6.0.2",
44
"description": "Lint your commits, patternplate-style",
5+
"files": ["index.js"],
56
"scripts": {
67
"test": "exit 0",
7-
"clean": "exit 0"
8+
"clean": "exit 0",
9+
"deps": "dep-check",
10+
"pkg": "pkg-check"
811
},
912
"xo": false,
1013
"repository": {
@@ -24,6 +27,7 @@
2427
},
2528
"homepage": "https://github.com/marionebl/commitlint#readme",
2629
"dependencies": {
27-
"@commitlint/config-patternplate": "^6.0.2"
30+
"@commitlint/config-patternplate": "^6.0.2",
31+
"@commitlint/utils": "^6.0.2"
2832
}
2933
}

@alias/commitlint/package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22
"name": "commitlint",
33
"version": "6.0.2",
44
"description": "Lint your commit messages",
5+
"files": ["cli.js"],
56
"bin": {
67
"commitlint": "cli.js"
78
},
9+
"scripts": {
10+
"deps": "dep-check",
11+
"pkg": "pkg-check --skip-main"
12+
},
813
"xo": false,
914
"engines": {
1015
"node": ">=4"
@@ -31,5 +36,8 @@
3136
"@commitlint/cli": "^6.0.2",
3237
"read-pkg": "3.0.0",
3338
"resolve-pkg": "1.0.0"
39+
},
40+
"devDependencies": {
41+
"@commitlint/utils": "^6.0.2"
3442
}
3543
}

@commitlint/cli/package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,19 @@
22
"name": "@commitlint/cli",
33
"version": "6.0.2",
44
"description": "Lint your commit messages",
5+
"files": [
6+
"index.js",
7+
"lib",
8+
"!*.test.js*"
9+
],
510
"bin": {
611
"commitlint": "./lib/cli.js"
712
},
813
"scripts": {
914
"build": "cross-env NODE_ENV=production babel src --out-dir lib --source-maps",
1015
"clean": "npx rimraf lib",
1116
"deps": "dep-check",
17+
"pkg": "pkg-check",
1218
"lint": "xo",
1319
"start": "concurrently \"ava -c 4 --verbose --watch\" \"yarn run watch\"",
1420
"test": "ava -c 4 --verbose",
@@ -58,9 +64,9 @@
5864
"babel-register": "6.26.0",
5965
"concurrently": "3.5.1",
6066
"cross-env": "5.1.1",
61-
"dependency-check": "2.10.0",
6267
"execa": "0.9.0",
6368
"mkdirp": "0.5.1",
69+
"pkg-dir": "2.0.0",
6470
"resolve-bin": "0.4.0",
6571
"rimraf": "2.6.2",
6672
"sander": "0.6.0",

@commitlint/config-angular-type-enum/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
"name": "@commitlint/config-angular-type-enum",
33
"version": "6.0.2",
44
"description": "Shareable commitlint config enforcing the angular commit convention types",
5+
"files": ["index.js"],
56
"scripts": {
67
"clean": "exit 0",
78
"deps": "dep-check",
9+
"pkg": "pkg-check",
810
"lint": "xo",
911
"start": "exit 0",
1012
"test": "exit 0"

@commitlint/config-angular/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
"name": "@commitlint/config-angular",
33
"version": "6.0.2",
44
"description": "Shareable commitlint config enforcing the angular commit convention",
5+
"files": ["index.js"],
56
"scripts": {
67
"clean": "exit 0",
78
"deps": "dep-check",
9+
"pkg": "pkg-check --skip-import",
810
"lint": "xo",
911
"start": "exit 0",
1012
"test": "exit 0"

@commitlint/config-conventional/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
"name": "@commitlint/config-conventional",
33
"version": "6.0.2",
44
"description": "Shareable commitlint config enforcing conventional commits",
5+
"files": ["index.js"],
56
"scripts": {
67
"clean": "exit 0",
78
"deps": "dep-check",
9+
"pkg": "pkg-check",
810
"lint": "xo",
911
"start": "exit 0",
1012
"test": "exit 0"

@commitlint/config-lerna-scopes/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
"name": "@commitlint/config-lerna-scopes",
33
"version": "6.0.2",
44
"description": "Shareable commitlint config enforcing lerna package names as scopes",
5+
"files": ["index.js"],
56
"scripts": {
67
"clean": "exit 0",
78
"lint": "xo",
89
"start": "ava --watch --verbose",
9-
"test": "ava --verbose"
10+
"test": "ava --verbose",
11+
"deps": "dep-check",
12+
"pkg": "pkg-check"
1013
},
1114
"xo": false,
1215
"ava": {
@@ -40,6 +43,7 @@
4043
},
4144
"devDependencies": {
4245
"@commitlint/test": "^6.0.2",
46+
"@commitlint/utils": "^6.0.2",
4347
"ava": "0.22.0",
4448
"xo": "0.18.2"
4549
}

@commitlint/config-patternplate/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
"name": "@commitlint/config-patternplate",
33
"version": "6.0.2",
44
"description": "Lint your commits, patternplate-style",
5+
"files": ["index.js"],
56
"scripts": {
67
"clean": "exit 0",
78
"deps": "dep-check",
9+
"pkg": "pkg-check --skip-import",
810
"lint": "xo",
911
"start": "exit 0",
1012
"test": "exit 0"

0 commit comments

Comments
 (0)