Socket
Socket
Sign inDemoInstall

conventional-release-setup

Package Overview
Dependencies
0
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.0 to 2.2.0

25

lib/index.js

@@ -64,19 +64,7 @@ #!/usr/bin/env node

packageJson.scripts = packageJson.scripts || {};
const { postinstall } = packageJson.scripts;
const huskyInstall = 'husky install';
packageJson.scripts.postinstall = postinstall
? `${huskyInstall} && ${postinstall}`
: huskyInstall;
if (!packageJson.private) {
devDependencies.push('pinst');
const { postpublish, prepublishOnly } = packageJson.scripts;
const pinstEnable = 'pinst --enable';
packageJson.scripts.postpublish = postpublish
? `${pinstEnable} && ${postpublish}`
: pinstEnable;
const pinstDisable = 'pinst --disable';
packageJson.scripts.prepublishOnly = prepublishOnly
? `${pinstDisable} && ${prepublishOnly}`
: pinstDisable;
}
const { prepare } = packageJson.scripts;
const huskyInit = 'husky';
packageJson.scripts.prepare = prepare
? `${huskyInit} && ${prepare}`
: huskyInit;
write(packageJsonPath, packageJson);

@@ -104,5 +92,4 @@ /**

log('Adding hooks...');
(0, utils_1.exec)(`npx ${huskyInstall}`);
(0, utils_1.exec)(`npx ${huskyInit}`);
const huskyCommitMsgPath = '.husky/commit-msg';
(0, utils_1.exec)(`npx husky add ${huskyCommitMsgPath} ''`);
(0, utils_1.exec)(`echo 'npx commitlint --edit $1' >> ${huskyCommitMsgPath}`);

@@ -109,0 +96,0 @@ (0, utils_1.exec)(`git add ${huskyCommitMsgPath}`);

{
"name": "conventional-release-setup",
"version": "2.1.0",
"version": "2.2.0",
"description": "Sets up package for committing/releasing with conventional commits.",

@@ -13,5 +13,4 @@ "author": "Mark <mark@remarkablemark.org>",

"lint:tsc": "tsc --noEmit",
"_postinstall": "husky install",
"postpublish": "pinst --enable",
"prepublishOnly": "pinst --disable && npm run lint && npm run test:ci && npm run clean && npm run build",
"prepare": "husky",
"prepublishOnly": "npm run lint && npm run test:ci && npm run clean && npm run build",
"test": "jest -u",

@@ -33,15 +32,14 @@ "test:ci": "CI=true jest --ci --colors --coverage"

"devDependencies": {
"@commitlint/cli": "18.4.4",
"@commitlint/config-conventional": "18.4.4",
"@commitlint/cli": "18.6.0",
"@commitlint/config-conventional": "18.6.0",
"@types/jest": "29.5.11",
"@typescript-eslint/eslint-plugin": "6.18.1",
"@typescript-eslint/parser": "6.18.1",
"@typescript-eslint/eslint-plugin": "6.19.1",
"@typescript-eslint/parser": "6.19.1",
"eslint": "8.56.0",
"eslint-plugin-prettier": "5.1.3",
"husky": "8.0.3",
"husky": "9.0.6",
"jest": "29.7.0",
"lint-staged": "15.2.0",
"pinst": "3.0.0",
"prettier": "3.2.2",
"ts-jest": "29.1.1",
"prettier": "3.2.4",
"ts-jest": "29.1.2",
"typescript": "5.3.3"

@@ -48,0 +46,0 @@ },

@@ -54,10 +54,2 @@ # conventional-release-setup

If the package is not `private`, then the script:
- updates `package.json` scripts:
- prepends `pinst --enable` to `postpublish`
- prepends `pinst --disable` to `prepublishOnly`
- installs devDependency:
- [pinst](https://www.npmjs.com/package/pinst) - lets you have `postinstall` hook that runs only in dev
## Release

@@ -64,0 +56,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc