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

Merge 4.0 #625

Merged
merged 73 commits into from
Jan 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
2c18faf
Adds support for repository-local huskyrc files (#510)
arcanis Jul 24, 2019
ac24464
Adds support for repository-local huskyrc files (#510)
arcanis Jul 24, 2019
0bab597
wip
typicode Jul 28, 2019
e4e6853
wip
typicode Jul 28, 2019
4754cc2
wip
typicode Jul 28, 2019
ff61877
wip
typicode Jul 28, 2019
2537f3e
wip
typicode Jul 28, 2019
5b74eb4
wip
typicode Jul 29, 2019
c315fe5
wip
typicode Jul 29, 2019
b5f6694
wip
typicode Jul 29, 2019
bf471c3
wip
typicode Jul 29, 2019
3e45df7
wip
typicode Jul 30, 2019
b37b512
wip
typicode Jul 30, 2019
c7e2c2e
wip
typicode Jul 30, 2019
a5bbbe0
wip
typicode Jul 30, 2019
c2f3f2b
wip
typicode Jul 31, 2019
3ab22f0
wip
typicode Jul 31, 2019
561229e
wip
typicode Jul 31, 2019
6f2e829
wip
typicode Aug 1, 2019
f1fdf7c
wip
typicode Aug 1, 2019
0511dbe
wip
typicode Aug 1, 2019
b12f13b
wip
typicode Aug 1, 2019
662097a
wip
typicode Aug 1, 2019
c345471
wip
typicode Aug 1, 2019
ddde279
wip
typicode Aug 1, 2019
1379ed1
wip
typicode Aug 1, 2019
c1dd81c
wip
typicode Aug 1, 2019
61b55f7
wip
typicode Aug 1, 2019
3fe05fb
wip
typicode Aug 1, 2019
a6a4b8b
wip
typicode Aug 1, 2019
087389e
wip
typicode Aug 1, 2019
a5760fc
wip
typicode Aug 2, 2019
900691a
wip
typicode Aug 5, 2019
e7eb01b
wip
typicode Aug 5, 2019
1f94867
wip
typicode Aug 14, 2019
0e51fdb
4.0.0-0
typicode Aug 14, 2019
20b46c2
Merge branch 'pm' into next
typicode Aug 14, 2019
a54ee73
wip
typicode Aug 14, 2019
de372d5
update snapshots
typicode Aug 14, 2019
e0bb2b9
Update README.md
typicode Aug 14, 2019
17c7f2f
Fixes "yarn run" (#562)
arcanis Aug 15, 2019
b1a3fd5
fix CI
typicode Aug 15, 2019
50e4fb4
update install.sh
typicode Aug 15, 2019
f2337ed
rm time command
typicode Aug 15, 2019
318eecb
4.0.0-beta.1
typicode Aug 15, 2019
b5a065b
Merge branch 'master' into next
typicode Sep 2, 2019
c154457
Merge branch 'master' into next
typicode Sep 28, 2019
c961c6a
Update snapshot
typicode Sep 28, 2019
026f479
4.0.0-beta.2
typicode Sep 28, 2019
822caa0
lint fix
typicode Sep 28, 2019
fd7c5e8
Merge branch 'master' into next
typicode Oct 12, 2019
0aea79a
use spawnSync and SHELL env for runner (#590)
typicode Oct 12, 2019
ae67291
Merge branch 'master' into next
typicode Oct 12, 2019
0c08f8d
rely on cwd rather than runner script path (#591)
typicode Oct 12, 2019
7f8f09d
remove execa dependency (#592)
typicode Oct 12, 2019
fb29094
rename file
typicode Oct 12, 2019
73e158b
update messages
typicode Oct 12, 2019
fe20f3d
4.0.0-beta.3
typicode Oct 12, 2019
e140b7a
update package.json
typicode Oct 12, 2019
26f7f1b
remove run-node dependency
typicode Oct 13, 2019
c8c467a
rely on INIT_CWD instead of husky script path (#593)
typicode Oct 14, 2019
a72c725
clean installer code
typicode Oct 14, 2019
720b87b
refactor and clean
typicode Oct 15, 2019
99e1078
es2017 target
typicode Oct 18, 2019
b79ee44
use prefix for relative path
typicode Oct 18, 2019
b4352d9
rm read-pkg
typicode Oct 18, 2019
95890ec
4.0.0-beta.4
typicode Oct 18, 2019
47dbe7e
typo
typicode Oct 18, 2019
4b2d40b
refactor
typicode Oct 19, 2019
4fe7660
4.0.0-beta.5
typicode Oct 21, 2019
6311e17
Merge branch 'master' into next
typicode Nov 18, 2019
e7f76bb
Drop Node 8 support
typicode Dec 26, 2019
1894c07
Update .travis.yml
typicode Dec 26, 2019
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
28 changes: 13 additions & 15 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
module.exports = {
"parser": "@typescript-eslint/parser",
"extends": [
"xo-space/esnext",
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/@typescript-eslint"
parser: '@typescript-eslint/parser',
extends: [
'xo-space/esnext',
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/@typescript-eslint'
],
"plugins": [
"@typescript-eslint",
"prettier"
],
"rules": {
"prettier/prettier": "error"
plugins: ['@typescript-eslint', 'prettier'],
rules: {
'capitalized-comments': 'off',
'prettier/prettier': 'error'
},
"env": {
"jest": true,
"node": true,
env: {
jest: true,
node: true
}
}
6 changes: 2 additions & 4 deletions .huskyrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"skipCI": false,
"hooks": {
"pre-commit": "npm test",
"post-checkout": "rm -f ci-post-checkout && echo \"running CI post-checkout test\" && node scripts/ci-post-checkout-script"
"commit-msg": "echo \"commit-msg hook from Husky\" && echo $HUSKY_GIT_PARAMS > hook-params"
}
}
}
5 changes: 2 additions & 3 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
.gitattributes
.github
.eslintrc
.huskyrc
.prettierrc
.travis.yml
appveyor.yml
ci-post-checkout
preprocessor.js
scripts
src
tsconfig.json
typings
docs-util.js
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"semi": false,
"singleQuote": true
}
}
22 changes: 2 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,12 @@ os:
language: node_js
node_js:
- "node"
- "8"
- "10"
cache:
directories:
- "node_modules"
env:
- HUSKY_DEBUG=1
script:
- sh ./scripts/test-install.sh
- npm test

# Install hooks locally
- npm run devinstall
- cat .git/hooks/post-checkout

# Test HUSKY_SKIP_HOOKS
- HUSKY_SKIP_HOOKS=1 time git checkout
- node scripts/ci-husky-skip-hooks-check

# Test post-checkout hook
- time git checkout
- node scripts/ci-post-checkout-check

# Should not fail due to missing script
- node scripts/ci-break-path.js
- time git checkout

# Test uninstall
- npm run devuninstall
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Husky can prevent bad `git commit`, `git push` and more 🐶 _woof!_
## Install

```sh
npm install husky --save-dev
npm install husky@next --save-dev
```

```js
Expand Down
21 changes: 1 addition & 20 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,8 @@ test_script:
- npm --version

# Run tests
- sh ./scripts/test-install.sh
- npm test

# Install hooks locally
- npm run devinstall
- cat .git/hooks/post-checkout

# Test HUSKY_SKIP_HOOKS
- ps: $env:HUSKY_SKIP_HOOKS=1
- node scripts/ci-husky-skip-hooks-check
- ps: $env:HUSKY_SKIP_HOOKS=0

# Test post-checkout hook
- git checkout
- node scripts/ci-post-checkout-check

# Should not fail due to missing script
- node scripts/ci-break-path.js
- git checkout

# Test uninstall
- npm run devuninstall

# Don't actually build.
build: off
14 changes: 11 additions & 3 deletions husky.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
/* eslint-disable */
// @ts-ignore
const pleaseUpgradeNode = require('please-upgrade-node')
const pkg = require('./package.json')

// Node version isn't supported, skip install
pleaseUpgradeNode(pkg, {
exitCode: 0,
message: function(requiredVersion) {
return 'Husky requires Node ' + requiredVersion + ', skipping Git hooks installation.'
return (
'Husky requires Node ' +
requiredVersion +
', skipping Git hooks installation.'
)
}
})

// Node version is supported, continue
require('./lib/installer/bin')

try {
require('./lib/installer/bin')
} catch (e) {
console.log('missing lib directory')
}
Loading