Skip to content

Commit

Permalink
Versioning management (novuhq#59)
Browse files Browse the repository at this point in the history
* Add lerna version script

* Remove version script from packages

* Update version

* v0.2.1

* Remove old changelogs

* Add husky and commit lint

* Add commitizen

* Revert changes
  • Loading branch information
scopsy authored Oct 20, 2021
1 parent cc4aa33 commit 755e173
Show file tree
Hide file tree
Showing 12 changed files with 414 additions and 50 deletions.
28 changes: 28 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"extends": ["@commitlint/config-angular"],
"rules": {
"subject-case": [
2,
"always",
["sentence-case", "start-case", "pascal-case", "upper-case", "lower-case"]
],
"type-enum": [
2,
"always",
[
"build",
"chore",
"ci",
"docs",
"feat",
"fix",
"perf",
"refactor",
"revert",
"style",
"test",
"sample"
]
]
}
}
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"npmClient": "yarn",
"useWorkspaces": true,
"packages": ["packages/*", "providers/*"],
"version": "0.0.0"
"version": "0.2.0"
}
33 changes: 31 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,30 @@
"scripts": {
"bootstrap": "lerna bootstrap",
"test": "lerna run test",
"build": "lerna run build"
"build": "lerna run build",
"version": "lerna version --conventional-commits --no-push",
"prepare": "husky install",
"commit": "cz"
},
"devDependencies": {
"@commitlint/cli": "13.2.1",
"@commitlint/config-angular": "^13.2.0",
"@types/jest": "^27.0.2",
"@types/node": "16.7.2",
"@typescript-eslint/eslint-plugin": "^4.0.1",
"@typescript-eslint/parser": "^4.0.1",
"commitizen": "^4.2.4",
"cspell": "^4.1.0",
"cz-conventional-changelog": "3.3.0",
"eslint": "^7.8.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-functional": "^3.0.2",
"eslint-plugin-import": "^2.22.0",
"husky": "^7.0.2",
"jest": "^27.1.0",
"lerna": "^3.22.1",
"lint-staged": "^11.2.3",
"prettier": "^2.1.1",
"ts-jest": "^27.0.5",
"ts-node": "^9.0.0",
Expand All @@ -27,5 +36,25 @@
"workspaces": [
"packages/*",
"providers/*"
]
],
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"prepare-commit-msg": "exec < /dev/tty && git cz --hook || true",
"commit-msg": "commitlint -c .commitlintrc.json -E HUSKY_GIT_PARAMS"
}
},
"lint-staged": {
"packages/**/*.{ts,json}": [
"prettier --ignore-path ./.prettierignore --write"
],
"providers/**/*.{ts,json}": [
"prettier --ignore-path ./.prettierignore --write"
]
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}
3 changes: 1 addition & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@
"doc:html": "typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --out build/docs",
"doc:json": "typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --json build/docs/typedoc.json",
"doc:publish": "gh-pages -m \"[ci skip] Updates\" -d build/docs",
"version": "standard-version",
"reset-hard": "git clean -dfx && git reset --hard && yarn",
"prepare-release": "run-s reset-hard test version"
"prepare-release": "run-s reset-hard test"
},
"engines": {
"node": ">=10"
Expand Down
3 changes: 1 addition & 2 deletions providers/emailjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@
"doc:html": "typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --out build/docs",
"doc:json": "typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --json build/docs/typedoc.json",
"doc:publish": "gh-pages -m \"[ci skip] Updates\" -d build/docs",
"version": "standard-version",
"reset-hard": "git clean -dfx && git reset --hard && yarn",
"prepare-release": "run-s reset-hard test version"
"prepare-release": "run-s reset-hard test"
},
"engines": {
"node": ">=10"
Expand Down
3 changes: 1 addition & 2 deletions providers/mailgun/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@
"doc:html": "typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --out build/docs",
"doc:json": "typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --json build/docs/typedoc.json",
"doc:publish": "gh-pages -m \"[ci skip] Updates\" -d build/docs",
"version": "standard-version",
"reset-hard": "git clean -dfx && git reset --hard && yarn",
"prepare-release": "run-s reset-hard test version"
"prepare-release": "run-s reset-hard test"
},
"engines": {
"node": ">=10"
Expand Down
3 changes: 1 addition & 2 deletions providers/nodemailer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@
"doc:html": "typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --out build/docs",
"doc:json": "typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --json build/docs/typedoc.json",
"doc:publish": "gh-pages -m \"[ci skip] Updates\" -d build/docs",
"version": "standard-version",
"reset-hard": "git clean -dfx && git reset --hard && yarn",
"prepare-release": "run-s reset-hard test version"
"prepare-release": "run-s reset-hard test"
},
"engines": {
"node": ">=10"
Expand Down
3 changes: 1 addition & 2 deletions providers/plivo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@
"doc:html": "typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --out build/docs",
"doc:json": "typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --json build/docs/typedoc.json",
"doc:publish": "gh-pages -m \"[ci skip] Updates\" -d build/docs",
"version": "standard-version",
"reset-hard": "git clean -dfx && git reset --hard && yarn",
"prepare-release": "run-s reset-hard test version"
"prepare-release": "run-s reset-hard test"
},
"engines": {
"node": ">=10"
Expand Down
3 changes: 1 addition & 2 deletions providers/postmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@
"doc:html": "typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --out build/docs",
"doc:json": "typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --json build/docs/typedoc.json",
"doc:publish": "gh-pages -m \"[ci skip] Updates\" -d build/docs",
"version": "standard-version",
"reset-hard": "git clean -dfx && git reset --hard && yarn",
"prepare-release": "run-s reset-hard test version"
"prepare-release": "run-s reset-hard test"
},
"engines": {
"node": ">=10"
Expand Down
3 changes: 1 addition & 2 deletions providers/sendgrid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@
"doc:html": "typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --out build/docs",
"doc:json": "typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --json build/docs/typedoc.json",
"doc:publish": "gh-pages -m \"[ci skip] Updates\" -d build/docs",
"version": "standard-version",
"reset-hard": "git clean -dfx && git reset --hard && yarn",
"prepare-release": "run-s reset-hard test version"
"prepare-release": "run-s reset-hard test"
},
"engines": {
"node": ">=10"
Expand Down
3 changes: 1 addition & 2 deletions providers/twilio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@
"doc:html": "typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --out build/docs",
"doc:json": "typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --json build/docs/typedoc.json",
"doc:publish": "gh-pages -m \"[ci skip] Updates\" -d build/docs",
"version": "standard-version",
"reset-hard": "git clean -dfx && git reset --hard && yarn",
"prepare-release": "run-s reset-hard test version"
"prepare-release": "run-s reset-hard test"
},
"engines": {
"node": ">=10"
Expand Down
Loading

0 comments on commit 755e173

Please sign in to comment.