From 387c9d9b3443d5d934e58cf3d8c4498ead326ba1 Mon Sep 17 00:00:00 2001 From: Valentin Kiselev Date: Mon, 8 Jul 2024 11:17:10 +0300 Subject: [PATCH] 1.6.21: fix npm resolving --- docs/install.md | 2 +- internal/version/version.go | 2 +- packaging/npm-bundled/package.json | 2 +- packaging/npm-installer/package.json | 2 +- .../npm/lefthook-darwin-arm64/package.json | 2 +- .../npm/lefthook-darwin-x64/package.json | 2 +- .../npm/lefthook-freebsd-arm64/package.json | 2 +- .../npm/lefthook-freebsd-x64/package.json | 2 +- .../npm/lefthook-linux-arm64/package.json | 2 +- packaging/npm/lefthook-linux-x64/package.json | 2 +- .../npm/lefthook-windows-arm64/package.json | 2 +- .../npm/lefthook-windows-x64/package.json | 2 +- packaging/npm/lefthook/bin/index.js | 17 ++++++++++++++ packaging/npm/lefthook/package.json | 22 +++++++++++-------- packaging/pack.rb | 2 +- packaging/rubygems/lefthook.gemspec | 2 +- 16 files changed, 44 insertions(+), 23 deletions(-) create mode 100644 packaging/npm/lefthook/bin/index.js diff --git a/docs/install.md b/docs/install.md index 1a5f1f16..efba7156 100644 --- a/docs/install.md +++ b/docs/install.md @@ -81,7 +81,7 @@ You can find the Swift wrapper plugin [here](https://github.com/csjones/lefthook Utilize lefthook in your Swift project using Swift Package Manager: ```swift -.package(url: "https://github.com/csjones/lefthook-plugin.git", exact: "1.6.19"), +.package(url: "https://github.com/csjones/lefthook-plugin.git", exact: "1.6.21"), ``` Or, with [mint](https://github.com/yonaskolb/Mint): diff --git a/internal/version/version.go b/internal/version/version.go index 323b7d45..c8583e3f 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -8,7 +8,7 @@ import ( "strconv" ) -const version = "1.6.19" +const version = "1.6.21" var ( // Is set via -X github.com/evilmartians/lefthook/internal/version.commit={commit}. diff --git a/packaging/npm-bundled/package.json b/packaging/npm-bundled/package.json index 11e3dfe1..33e9d7b6 100644 --- a/packaging/npm-bundled/package.json +++ b/packaging/npm-bundled/package.json @@ -1,6 +1,6 @@ { "name": "@evilmartians/lefthook", - "version": "1.6.19", + "version": "1.6.21", "description": "Simple git hooks manager", "main": "bin/index.js", "bin": { diff --git a/packaging/npm-installer/package.json b/packaging/npm-installer/package.json index d4516269..dae654d0 100644 --- a/packaging/npm-installer/package.json +++ b/packaging/npm-installer/package.json @@ -1,6 +1,6 @@ { "name": "@evilmartians/lefthook-installer", - "version": "1.6.19", + "version": "1.6.21", "description": "Simple git hooks manager", "main": "bin/index.js", "bin": { diff --git a/packaging/npm/lefthook-darwin-arm64/package.json b/packaging/npm/lefthook-darwin-arm64/package.json index 764d3a9b..9f770207 100644 --- a/packaging/npm/lefthook-darwin-arm64/package.json +++ b/packaging/npm/lefthook-darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "lefthook-darwin-arm64", - "version": "1.6.19", + "version": "1.6.21", "description": "The macOS ARM 64-bit binary for lefthook, git hooks manager.", "bin": { "lefthook": "bin/lefthook" diff --git a/packaging/npm/lefthook-darwin-x64/package.json b/packaging/npm/lefthook-darwin-x64/package.json index 3fd5e785..89ade213 100644 --- a/packaging/npm/lefthook-darwin-x64/package.json +++ b/packaging/npm/lefthook-darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "lefthook-darwin-x64", - "version": "1.6.19", + "version": "1.6.21", "description": "The macOS 64-bit binary for lefthook, git hooks manager.", "bin": { "lefthook": "bin/lefthook" diff --git a/packaging/npm/lefthook-freebsd-arm64/package.json b/packaging/npm/lefthook-freebsd-arm64/package.json index be79a37c..89ecd764 100644 --- a/packaging/npm/lefthook-freebsd-arm64/package.json +++ b/packaging/npm/lefthook-freebsd-arm64/package.json @@ -1,6 +1,6 @@ { "name": "lefthook-freebsd-arm64", - "version": "1.6.19", + "version": "1.6.21", "description": "The FreeBSD ARM 64-bit binary for lefthook, git hooks manager.", "bin": { "lefthook": "bin/lefthook" diff --git a/packaging/npm/lefthook-freebsd-x64/package.json b/packaging/npm/lefthook-freebsd-x64/package.json index 153c5ec7..f40b05f0 100644 --- a/packaging/npm/lefthook-freebsd-x64/package.json +++ b/packaging/npm/lefthook-freebsd-x64/package.json @@ -1,6 +1,6 @@ { "name": "lefthook-freebsd-x64", - "version": "1.6.19", + "version": "1.6.21", "description": "The FreeBSD 64-bit binary for lefthook, git hooks manager.", "bin": { "lefthook": "bin/lefthook" diff --git a/packaging/npm/lefthook-linux-arm64/package.json b/packaging/npm/lefthook-linux-arm64/package.json index ab00c78a..afc13ad2 100644 --- a/packaging/npm/lefthook-linux-arm64/package.json +++ b/packaging/npm/lefthook-linux-arm64/package.json @@ -1,6 +1,6 @@ { "name": "lefthook-linux-arm64", - "version": "1.6.19", + "version": "1.6.21", "description": "The Linux ARM 64-bit binary for lefthook, git hooks manager.", "bin": { "lefthook": "bin/lefthook" diff --git a/packaging/npm/lefthook-linux-x64/package.json b/packaging/npm/lefthook-linux-x64/package.json index 4fa5069b..b7a590ae 100644 --- a/packaging/npm/lefthook-linux-x64/package.json +++ b/packaging/npm/lefthook-linux-x64/package.json @@ -1,6 +1,6 @@ { "name": "lefthook-linux-x64", - "version": "1.6.19", + "version": "1.6.21", "description": "The Linux 64-bit binary for lefthook, git hooks manager.", "bin": { "lefthook": "bin/lefthook" diff --git a/packaging/npm/lefthook-windows-arm64/package.json b/packaging/npm/lefthook-windows-arm64/package.json index d53e6910..207b62ef 100644 --- a/packaging/npm/lefthook-windows-arm64/package.json +++ b/packaging/npm/lefthook-windows-arm64/package.json @@ -1,6 +1,6 @@ { "name": "lefthook-windows-arm64", - "version": "1.6.19", + "version": "1.6.21", "description": "The Windows ARM 64-bit binary for lefthook, git hooks manager.", "bin": { "lefthook": "bin/lefthook" diff --git a/packaging/npm/lefthook-windows-x64/package.json b/packaging/npm/lefthook-windows-x64/package.json index 00d14628..7c501727 100644 --- a/packaging/npm/lefthook-windows-x64/package.json +++ b/packaging/npm/lefthook-windows-x64/package.json @@ -1,6 +1,6 @@ { "name": "lefthook-windows-x64", - "version": "1.6.19", + "version": "1.6.21", "description": "The Windows 64-bit binary for lefthook, git hooks manager.", "bin": { "lefthook": "bin/lefthook" diff --git a/packaging/npm/lefthook/bin/index.js b/packaging/npm/lefthook/bin/index.js new file mode 100644 index 00000000..2e64e83e --- /dev/null +++ b/packaging/npm/lefthook/bin/index.js @@ -0,0 +1,17 @@ +#!/usr/bin/env node + +var spawn = require('child_process').spawn; +const { getExePath } = require('../get-exe'); + +var command_args = process.argv.slice(2); + +var child = spawn( + getExePath(), + command_args, + { stdio: "inherit" }); + +child.on('close', function (code) { + if (code !== 0) { + process.exit(1); + } +}); diff --git a/packaging/npm/lefthook/package.json b/packaging/npm/lefthook/package.json index 1c851028..585aa9bf 100644 --- a/packaging/npm/lefthook/package.json +++ b/packaging/npm/lefthook/package.json @@ -1,8 +1,12 @@ { "name": "lefthook", - "version": "1.6.19", + "version": "1.6.21", "description": "Simple git hooks manager", "repository": "https://github.com/evilmartians/lefthook", + "main": "bin/index.js", + "bin": { + "lefthook": "bin/index.js" + }, "keywords": [ "git", "hook", @@ -16,14 +20,14 @@ }, "homepage": "https://github.com/evilmartians/lefthook#readme", "optionalDependencies": { - "lefthook-darwin-arm64": "1.6.19", - "lefthook-darwin-x64": "1.6.19", - "lefthook-linux-arm64": "1.6.19", - "lefthook-linux-x64": "1.6.19", - "lefthook-freebsd-arm64": "1.6.19", - "lefthook-freebsd-x64": "1.6.19", - "lefthook-windows-arm64": "1.6.19", - "lefthook-windows-x64": "1.6.19" + "lefthook-darwin-arm64": "1.6.21", + "lefthook-darwin-x64": "1.6.21", + "lefthook-linux-arm64": "1.6.21", + "lefthook-linux-x64": "1.6.21", + "lefthook-freebsd-arm64": "1.6.21", + "lefthook-freebsd-x64": "1.6.21", + "lefthook-windows-arm64": "1.6.21", + "lefthook-windows-x64": "1.6.21" }, "scripts": { "postinstall": "node postinstall.js" diff --git a/packaging/pack.rb b/packaging/pack.rb index 97e78860..e07c3235 100755 --- a/packaging/pack.rb +++ b/packaging/pack.rb @@ -2,7 +2,7 @@ require "fileutils" -VERSION = "1.6.19" +VERSION = "1.6.21" ROOT = File.join(__dir__, "..") DIST = File.join(ROOT, "dist") diff --git a/packaging/rubygems/lefthook.gemspec b/packaging/rubygems/lefthook.gemspec index 61376e9c..0abfd821 100644 --- a/packaging/rubygems/lefthook.gemspec +++ b/packaging/rubygems/lefthook.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |spec| spec.name = "lefthook" - spec.version = "1.6.19" + spec.version = "1.6.21" spec.authors = ["A.A.Abroskin", "Evil Martians"] spec.email = ["lefthook@evilmartians.com"]