Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: typicode/husky
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v9.0.4
Choose a base ref
...
head repository: typicode/husky
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v9.0.5
Choose a head ref
  • 4 commits
  • 8 files changed
  • 2 contributors

Commits on Jan 25, 2024

  1. docs: update index.md

    typicode authored Jan 25, 2024
    Copy the full SHA
    e9526fd View commit details
  2. Copy the full SHA
    26697d1 View commit details
  3. fix: init error (#1353)

    * fix: init error
    
    * Update config.mts
    typicode authored Jan 25, 2024
    Copy the full SHA
    56619ec View commit details
  4. 9.0.5

    typicode committed Jan 25, 2024
    Copy the full SHA
    8314bef View commit details
Showing with 15 additions and 8 deletions.
  1. +1 −1 bin.js
  2. +2 −2 docs/how-to.md
  3. +1 −1 docs/index.md
  4. +2 −2 package-lock.json
  5. +1 −1 package.json
  6. +2 −1 test.sh
  7. +6 −0 test/7_init.sh
  8. 0 test/{7_time.sh → 8_time.sh}
2 changes: 1 addition & 1 deletion bin.js
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ let a = process.argv[2]
if (a == 'init') {
let p = 'package.json'
let d = JSON.parse(f.readFileSync(p))
(d.scripts ||= {}).prepare = 'husky'
;(d.scripts ||= {}).prepare = 'husky'
w('package.json', JSON.stringify(d, null, /\t/.test() ? '\t' : 2) + '\n')
process.stdout.write(i())
try { f.mkdirSync('.husky') } catch {}
4 changes: 2 additions & 2 deletions docs/how-to.md
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
Husky allows you to execute local commands before running hooks. It reads commands from these files:

- `$XDG_CONFIG_HOME/husky/init.sh`
- `~/.config/home/init.sh`
- `~/.config/husky/init.sh`
- `~/.huskyrc` (deprecated)

## Skipping Git Hooks
@@ -278,4 +278,4 @@ yarn test
bun test
```

:::
:::
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ Automatically **lint your commit messages**, **code**, and **run tests** upon co

Get started [here](/get-started).

See what's new in `v9` in the [Changelog](https://github.com/typicode/husky/releases/tag/v9.0.1) 🚀
[Check out the v9 changelog](https://github.com/typicode/husky/releases/tag/v9.0.1) to discover all the new and improved features! 🚀

## Sponsors

4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "husky",
"version": "9.0.4",
"version": "9.0.5",
"description": "Modern native Git hooks",
"keywords": [
"git",
3 changes: 2 additions & 1 deletion test.sh
Original file line number Diff line number Diff line change
@@ -8,4 +8,5 @@ sh test/3_from-sub-dir.sh
sh test/4_not-git-dir.sh
sh test/5_git_command_not_found.sh
sh test/6_command_not_found.sh
# sh test/7_time.sh
sh test/7_init.sh
# sh test/8_time.sh
6 changes: 6 additions & 0 deletions test/7_init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
. test/functions.sh
setup
install

npx --no-install husky init
File renamed without changes.