From 104ca29708efd8d5693be306f118aacc782812a6 Mon Sep 17 00:00:00 2001 From: Christian Mattsson Date: Tue, 17 Feb 2026 22:37:10 +0100 Subject: [PATCH] fix: remove postinstall chmod that breaks Windows npm install npm automatically sets the executable bit on files declared in the `bin` field when installing a package, making the `chmod +x` in postinstall redundant. The script also broke on Windows since `chmod` and `true` are not available in cmd.exe. Closes #610 --- pkgs/cli/package.json | 86 +++++++++++++++++++++---------------------- 1 file changed, 42 insertions(+), 44 deletions(-) diff --git a/pkgs/cli/package.json b/pkgs/cli/package.json index 6589f6c95..017c68472 100644 --- a/pkgs/cli/package.json +++ b/pkgs/cli/package.json @@ -1,44 +1,42 @@ -{ - "name": "pgflow", - "version": "0.13.3", - "license": "Apache-2.0", - "repository": { - "type": "git", - "url": "https://github.com/pgflow-dev/pgflow", - "directory": "pkgs/cli" - }, - "type": "module", - "main": "./dist/index.js", - "typings": "./dist/index.d.ts", - "bin": "./dist/index.js", - "exports": { - "./package.json": "./package.json", - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js" - } - }, - "types": "./dist/index.d.ts", - "module": "./dist/index.js", - "devDependencies": { - "@types/node": "^22.14.1", - "tsx": "^4.19.3" - }, - "dependencies": { - "@clack/prompts": "^0.10.1", - "@commander-js/extra-typings": "^13.1.0", - "@decimalturn/toml-patch": "0.3.7", - "@pgflow/core": "workspace:*", - "chalk": "^5.4.1", - "commander": "^13.1.0" - }, - "publishConfig": { - "access": "public" - }, - "files": [ - "dist" - ], - "scripts": { - "postinstall": "chmod +x dist/index.js || true" - } -} +{ + "name": "pgflow", + "version": "0.13.3", + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/pgflow-dev/pgflow", + "directory": "pkgs/cli" + }, + "type": "module", + "main": "./dist/index.js", + "typings": "./dist/index.d.ts", + "bin": "./dist/index.js", + "exports": { + "./package.json": "./package.json", + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js" + } + }, + "types": "./dist/index.d.ts", + "module": "./dist/index.js", + "devDependencies": { + "@types/node": "^22.14.1", + "tsx": "^4.19.3" + }, + "dependencies": { + "@clack/prompts": "^0.10.1", + "@commander-js/extra-typings": "^13.1.0", + "@decimalturn/toml-patch": "0.3.7", + "@pgflow/core": "workspace:*", + "chalk": "^5.4.1", + "commander": "^13.1.0" + }, + "publishConfig": { + "access": "public" + }, + "files": [ + "dist" + ], + "scripts": {} +}