Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(deps): bump husky from 4.3.8 to 5.1.1 #869

Merged
merged 1 commit into from
Feb 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit "$1"
4 changes: 4 additions & 0 deletions .husky/post-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run release:dry-run
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install lint-staged
3 changes: 1 addition & 2 deletions lib/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,14 @@ const initCommand = (baseDir, logger) => {
});

/**
* @param {"husky" | "lint-staged" | "standard-version" | "remarkConfig"} key
* @param {"lint-staged" | "standard-version" | "remarkConfig"} key
*/
const updateOtherKey = (key) => {
if (!(key in packageInfo)) {
packageInfo[key] = {};
}
Object.assign(packageInfo[key], originalPackage[key]);
};
updateOtherKey("husky");
updateOtherKey("lint-staged");
updateOtherKey("standard-version");
updateOtherKey("remarkConfig");
Expand Down
156 changes: 20 additions & 136 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 7 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"eslint": "^7.11.0",
"husky": "^4.3.0",
"husky": "^5.1.1",
"lint-staged": "^10.4.0",
"npm-run-all": "^4.1.5",
"pinst": "^2.1.6",
"prettier": "^2.1.2",
"remark-cli": "^9.0.0",
"remark-lint-no-heading-punctuation": "^2.0.1",
Expand Down Expand Up @@ -71,18 +72,14 @@
"clean": "git clean -dx --force --exclude=node_modules",
"prerelease": "git switch main && git pull && npm ci && npm run clean && npm test && npm run lint && npm run clean",
"release": "standard-version",
"release:dry-run": "standard-version --dry-run"
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "lint-staged",
"post-commit": "npm run release:dry-run"
}
"release:dry-run": "standard-version --dry-run",
"postinstall": "husky install",
"prepublishOnly": "pinst --disable",
"postpublish": "pinst --enable"
},
"lint-staged": {
"*.{js,jsx,mjs,ts,tsx}": "eslint --fix",
"!(*.snap)": "prettier --write",
"!(*.snap|.husky/**)": "prettier --write",
"!(CHANGELOG).md": "remark --frail"
},
"standard-version": {
Expand Down
24 changes: 8 additions & 16 deletions test/__snapshots__/init.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,8 @@ Object {
],
"root": true,
},
"husky": Object {
"hooks": Object {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"post-commit": "npm run release:dry-run",
"pre-commit": "lint-staged",
},
},
"lint-staged": Object {
"!(*.snap)": "prettier --write",
"!(*.snap|.husky/**)": "prettier --write",
"!(CHANGELOG).md": "remark --frail",
"*.css": "xyz",
"*.{js,jsx,mjs,ts,tsx}": "eslint --fix",
Expand Down Expand Up @@ -57,6 +50,9 @@ Object {
"lint:md": "remark . --frail",
"lint:md:fix": "remark . --output",
"lint:types": "tsc --noEmit",
"postinstall": "husky install",
"postpublish": "pinst --enable",
"prepublishOnly": "pinst --disable",
"prerelease": "git switch main && git pull && npm ci && npm run clean && npm test && npm run lint && npm run clean",
"prettier": "prettier --ignore-path .gitignore .",
"prettier:check": "npm run prettier -- --check",
Expand Down Expand Up @@ -96,15 +92,8 @@ Object {
],
"root": true,
},
"husky": Object {
"hooks": Object {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"post-commit": "npm run release:dry-run",
"pre-commit": "lint-staged",
},
},
"lint-staged": Object {
"!(*.snap)": "prettier --write",
"!(*.snap|.husky/**)": "prettier --write",
"!(CHANGELOG).md": "remark --frail",
"*.{js,jsx,mjs,ts,tsx}": "eslint --fix",
},
Expand Down Expand Up @@ -132,6 +121,9 @@ Object {
"lint:md": "remark . --frail",
"lint:md:fix": "remark . --output",
"lint:types": "tsc --noEmit",
"postinstall": "husky install",
"postpublish": "pinst --enable",
"prepublishOnly": "pinst --disable",
"prerelease": "git switch main && git pull && npm ci && npm run clean && npm test && npm run lint && npm run clean",
"prettier": "prettier --ignore-path .gitignore .",
"prettier:check": "npm run prettier -- --check",
Expand Down