Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

husky-init

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

husky-init - npm Package Compare versions

Comparing version 6.1.1 to 7.0.0

lib/index.test.d.ts

10

lib/bin.js

@@ -5,13 +5,13 @@ #!/usr/bin/env node

Object.defineProperty(exports, "__esModule", { value: true });
const fs = require("fs");
const fs_1 = require("fs");
const husky_1 = require("husky");
const _1 = require(".");
const index_js_1 = require("./index.js");
const [, , arg] = process.argv;
console.log('husky-init updating package.json');
const str = fs.readFileSync('package.json', 'utf-8');
const str = fs_1.readFileSync('package.json', 'utf-8');
const pkg = JSON.parse(str);
_1.updatePkg(pkg, arg === '--yarn2');
index_js_1.updatePkg(pkg, arg === '--yarn2');
const regex = /^[ ]+|\t+/m;
const indent = (_a = regex.exec(str)) === null || _a === void 0 ? void 0 : _a[0];
fs.writeFileSync('package.json', `${JSON.stringify(pkg, null, indent)}\n`);
fs_1.writeFileSync('package.json', `${JSON.stringify(pkg, null, indent)}\n`);
husky_1.install();

@@ -18,0 +18,0 @@ husky_1.set('.husky/pre-commit', 'npm test');

@@ -22,3 +22,3 @@ "use strict";

pkg.devDependencies || (pkg.devDependencies = {});
pkg.devDependencies.husky = '^6.0.0';
pkg.devDependencies.husky = '^7.0.0';
if (isYarn2) {

@@ -25,0 +25,0 @@ pkg.scripts || (pkg.scripts = {});

{
"name": "husky-init",
"version": "6.1.1",
"description": "",
"version": "7.0.0",
"description": "Install and setup husky quickly",
"keywords": [
"husky",
"init",
"git",
"hooks",
"pre-commit"
],
"homepage": "https://typicode.github.io/husky",
"repository": "typicode/husky-init",
"funding": "https://github.com/sponsors/typicode",
"license": "MIT",
"author": "Typicode <typicode@gmail.com>",
"main": "lib/index.js",
"bin": "lib/bin.js",
"files": [
"lib",
"!lib/**/*.test.js"
],
"scripts": {
"build": "tsc",
"test": "npm run build && xv",
"lint": "eslint . --ext .ts --ignore-path .gitignore",
"prepare": "husky install"
},
"dependencies": {
"husky": "^6.0.0"
"husky": "^7.0.0"
},
"author": "Typicode <typicode@gmail.com>",
"license": "MIT",
"devDependencies": {
"type-fest": "^1.0.1"
"@tsconfig/node12": "^1.0.7",
"@types/node": "^15.3.1",
"@typicode/eslint-config": "^0.1.2",
"type-fest": "^1.2.1",
"typescript": "^4.2.3",
"xv": "^0.2.2"
},
"gitHead": "cb4e3b913e2d8963af3179650ed550d3a0e210f5"
"engines": {
"node": ">=12"
}
}

@@ -5,2 +5,8 @@ # husky-init

## See also
[auto-husky](https://github.com/g-script/auto-husky) - interactive mode and more options
## Usage
```shell

@@ -12,8 +18,7 @@ npx husky-init && npm install # npm

# Documentation
If `package.json` is in a subdirectory (e.g. not in the same directory as `.git`), please see https://typicode.github.io/husky/#/?id=custom-directory or use [auto-husky](https://github.com/g-script/auto-husky).
## Documentation
https://typicode.github.io/husky
## License
MIT
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc