Skip to content

Commit 022dafe

Browse files
committed
chore: switch to yarn
1 parent dcfad61 commit 022dafe

File tree

16 files changed

+7460
-55
lines changed

16 files changed

+7460
-55
lines changed

.travis.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,13 @@ node_js:
33
- '8'
44
- '6'
55
- '4'
6+
install:
7+
- npm install -g npx
8+
- npx yarn install
9+
- npx lerna bootstrap
10+
- npm --version
11+
- yarn --version
12+
- npx --version
13+
script:
14+
- npx yarn build
15+
- npx yarn test

.yarnrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
workspaces-experimental "true"
2+
registry "https://registry.npmjs.org/"

@alias/commitlint/cli.js

100644100755
File mode changed.

@commitlint/cli/package.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@
66
"commitlint": "./lib/cli.js"
77
},
88
"scripts": {
9-
"build": "cross-env NODE_ENV=production babel src --out-dir lib --source-maps",
10-
"clean": "rimraf lib",
11-
"prepublish": "npm run build",
12-
"prestart": "dep-check && npm run build",
13-
"pretest": "dep-check && npm run build",
14-
"start": "concurrently \"ava -c 4 --verbose --watch\" \"npm run watch\"",
15-
"test": "ava -c 4 $AVA_VERBOSE",
16-
"watch": "babel src --out-dir lib --watch --source-maps"
9+
"build": "npx cross-env NODE_ENV=production npx babel src --out-dir lib --source-maps",
10+
"clean": "npx rimraf lib",
11+
"prestart": "dep-check && npx yarn run build",
12+
"pretest": "dep-check && npx yarn run build",
13+
"start": "npx concurrently \"npx ava -c 4 --verbose --watch\" \"npx yarn run watch\"",
14+
"test": "npx ava -c 4 $AVA_VERBOSE",
15+
"watch": "npx babel src --out-dir lib --watch --source-maps"
1716
},
1817
"ava": {
1918
"files": [

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
"version": "4.2.0",
44
"description": "Shareable commitlint config enforcing lerna package names as scopes",
55
"scripts": {
6-
"pretest": "dep-check",
7-
"start": "ava --watch --verbose",
8-
"test": "ava $AVA_VERBOSE",
6+
"start": "npx ava --watch --verbose",
7+
"test": "npx ava $AVA_VERBOSE",
98
"clean": "exit 0"
109
},
1110
"xo": false,
@@ -40,7 +39,6 @@
4039
},
4140
"devDependencies": {
4241
"@commitlint/test": "^4.2.0",
43-
"@commitlint/utils": "^4.2.0",
4442
"ava": "^0.22.0"
4543
}
4644
}

@commitlint/core/package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44
"description": "Lint your commit messages",
55
"main": "lib/index.js",
66
"scripts": {
7-
"build": "cross-env NODE_ENV=production babel src --out-dir lib --source-maps",
8-
"clean": "rimraf lib",
9-
"prepublish": "npm run build",
7+
"build": "npx cross-env NODE_ENV=production npx babel src --out-dir lib --source-maps",
8+
"clean": "npx rimraf lib",
109
"pretest": "dep-check",
11-
"start": "concurrently \"ava -c 4 --verbose --watch\" \"npm run watch\"",
12-
"test": "ava -c 4 $AVA_VERBOSE",
13-
"watch": "babel src --out-dir lib --watch --source-maps"
10+
"start": "npx concurrently \"npx ava -c 4 --verbose --watch\" \"npx yarn run watch\"",
11+
"test": "npx ava -c 4 $AVA_VERBOSE",
12+
"watch": "npx babel src --out-dir lib --watch --source-maps"
1413
},
1514
"ava": {
1615
"files": [

@commitlint/prompt-cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"commit": "./cli.js"
77
},
88
"scripts": {
9-
"clean": "rimraf lib",
9+
"clean": "npx rimraf lib",
1010
"commit": "$npm_package_bin_commit",
1111
"pretest": "dep-check"
1212
},

@commitlint/prompt/package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44
"description": "commitizen prompt using commitlint.config.js",
55
"main": "./lib/index.js",
66
"scripts": {
7-
"build": "cross-env NODE_ENV=production babel src --out-dir lib --source-maps",
8-
"clean": "rimraf lib",
9-
"commit": "git-cz",
10-
"prepublish": "npm run build",
7+
"build": "npx cross-env NODE_ENV=production npx babel src --out-dir lib --source-maps",
8+
"clean": "npx rimraf lib",
9+
"commit": "npx git-cz",
1110
"pretest": "dep-check",
12-
"start": "concurrently \"ava --watch --verbose\" \"npm run watch\"",
13-
"test": "ava $AVA_VERBOSE",
14-
"watch": "babel src --out-dir lib --watch --source-maps"
11+
"start": "npx concurrently \"npx ava --watch --verbose\" \"npx yarn run watch\"",
12+
"test": "npx ava $AVA_VERBOSE",
13+
"watch": "npx babel src --out-dir lib --watch --source-maps"
1514
},
1615
"ava": {
1716
"babel": "inherit",

@packages/babel-preset-commitlint/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"main": "index.js",
66
"scripts": {
77
"pretest": "dep-check",
8-
"start": "ava --watch --verbose",
9-
"test": "ava $AVA_VERBOSE"
8+
"start": "npx ava --watch --verbose",
9+
"test": "npx ava $AVA_VERBOSE"
1010
},
1111
"ava": {
1212
"files": [

@packages/test/package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@
66
"private": true,
77
"scripts": {
88
"pretest": "dep-check",
9-
"start": "concurrently \"ava --watch --verbose\" \"npm run watch\"",
10-
"test": "ava $AVA_VERBOSE",
11-
"build": "cross-env NODE_ENV=production babel src --out-dir lib --source-maps",
12-
"watch": "babel src --out-dir lib --watch --source-maps",
13-
"clean": "rimraf lib",
14-
"prepublish": "npm run build"
9+
"start": "npx concurrently \"npx ava --watch --verbose\" \"npx yarn run watch\"",
10+
"test": "npx ava $AVA_VERBOSE",
11+
"build": "npx cross-env NODE_ENV=production npx babel src --out-dir lib --source-maps",
12+
"watch": "npx babel src --out-dir lib --watch --source-maps",
13+
"clean": "npx rimraf lib"
1514
},
1615
"ava": {
1716
"files": [

@packages/utils/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
"build": "exit 0",
1010
"clean": "exit 0",
1111
"start": "exit 0",
12-
"test": "exit 0",
13-
"prepublish": "npm test"
12+
"test": "exit 0"
1413
},
1514
"ava": {
1615
"files": [

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,19 @@ Copyright by @marionebl. All `commitlint` packages are released under the MIT li
8484
```sh
8585
git clone [email protected]:marionebl/commitlint.git
8686
cd commitlint
87-
npx npm install
88-
npx npm start # run tests, again on change
89-
npx npm run build # run build tasks
87+
npx yarn install
88+
npx yarn run build # run build tasks
89+
npx yarn start # run tests, again on change
9090
```
9191

9292
### Publishing a release
9393

9494
```sh
95-
npx npm run clean
96-
npx npm install
97-
npx npm test
98-
npx npm run publish
95+
npx yarn run clean
96+
npx yarn install
97+
npx yarn run build
98+
npx yarn test
99+
npx yarn run publish
99100
```
100101

101102

appveyor.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@ install:
55
- ps: Install-Product node $env:nodejs_version
66
- set CI=true
77
- set PATH=%APPDATA%\npm;%PATH%
8-
- npm install
8+
- npm install -g npx
9+
- npx yarn install
10+
- npx lerna bootstrap
11+
- npm --version
12+
- yarn --version
13+
- npx --version
914
matrix:
1015
fast_finish: true
1116
build: off
1217
version: '{build}'
1318
test_script:
14-
- node --version
15-
- npm --version
16-
- npm test
19+
- npx yarn build
20+
- npx yarn test

lerna.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
{
22
"lerna": "2.0.0",
3-
"packages": [
4-
"@alias/*",
5-
"@commitlint/*",
6-
"@packages/*"
7-
],
3+
"npmClient": "yarn",
4+
"useWorkspaces": true,
85
"version": "4.2.0"
96
}

package.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"commit": "npx -p @commitlint/prompt-cli commit",
1111
"commitmsg": "npx commitlint -e $GIT_PARAMS",
1212
"docs": "npx docsify serve docs",
13-
"postinstall": "npx lerna bootstrap",
1413
"precommit": "lint-staged",
1514
"pretest": "npx xo",
1615
"publish": "npx lerna publish --conventional-commits",
@@ -39,6 +38,11 @@
3938
"ava/no-ignored-test-files": "off"
4039
}
4140
},
41+
"workspaces": [
42+
"@alias/*",
43+
"@commitlint/*",
44+
"@packages/*"
45+
],
4246
"engines": {
4347
"node": ">=4"
4448
},
@@ -67,13 +71,15 @@
6771
},
6872
"devDependencies": {
6973
"docsify-cli": "^4.1.8",
74+
"eslint": "^4.8.0",
7075
"eslint-config-prettier": "^2.3.0",
7176
"husky": "^0.14.3",
72-
"lerna": "^2.0.0",
77+
"lerna": "^2.4.0",
7378
"lint-staged": "^4.0.1",
7479
"npx": "^9.6.0",
7580
"prettier": "^1.5.2",
7681
"trevor": "^2.3.0",
77-
"xo": "^0.18.2"
82+
"xo": "^0.18.2",
83+
"yarn": "^1.2.1"
7884
}
7985
}

0 commit comments

Comments
 (0)