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.3
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.4
Choose a head ref
  • 5 commits
  • 4 files changed
  • 3 contributors

Commits on Jan 25, 2024

  1. chore: add .gitattributes

    typicode committed Jan 25, 2024
    Copy the full SHA
    ba89eff View commit details
  2. Copy the full SHA
    6b5d9df View commit details
  3. refactor: simplify (#1349)

    * refactor: simplify
    
    * indent
    typicode authored Jan 25, 2024
    Copy the full SHA
    f874dfb View commit details
  4. fix: fix init not work on pnpm #1334 (#1347)

    * fix: fix init not work on pnpm #1334
    
    * doc: pnpm users must run init on project root
    
    * Update bin.js
    
    * Update bin.js
    
    * Update get-started.md
    
    ---------
    
    Co-authored-by: 键来! <jmpecx@outlook.com>
    Co-authored-by: typicode <typicode@gmail.com>
    3 people authored Jan 25, 2024
    Copy the full SHA
    34ace26 View commit details
  5. 9.0.4

    typicode committed Jan 25, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1e57dc9 View commit details
Showing with 7 additions and 6 deletions.
  1. +1 −0 .gitattributes
  2. +3 −3 bin.js
  3. +2 −2 package-lock.json
  4. +1 −1 package.json
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.sh linguist-language=JavaScript
6 changes: 3 additions & 3 deletions bin.js
Original file line number Diff line number Diff line change
@@ -5,12 +5,12 @@ import i from './index.js'
let a = process.argv[2]

if (a == 'init') {
let p = process.env.npm_package_json
let p = 'package.json'
let d = JSON.parse(f.readFileSync(p))
d.scripts ||= {}
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 {}
w('.husky/pre-commit', process.env.npm_config_user_agent.split('/')[0] + ' test\n')
process.exit()
}
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.3",
"version": "9.0.4",
"description": "Modern native Git hooks",
"keywords": [
"git",