From 2a599281f9591fa5f542ae9bee7a9533d3fcab11 Mon Sep 17 00:00:00 2001 From: Kostiantyn Dvornik Date: Tue, 18 Aug 2026 14:45:35 +0300 Subject: [PATCH] fix: run full build before npm publish via prepublishOnly The js/publish action never ran a build step - it relied entirely on dist/ already being committed to git. Since dist/ was gitignored in #52, `npm publish` on merge to main shipped an EMPTY dist/ - nothing in that CI job's steps (install, test) builds it. This already shipped a broken @mat3ra/utils@2026.8.18-0 to npm. Adding prepublishOnly (an npm lifecycle hook npm publish runs automatically) running the same transpile script already used and verified by release-wip.yml. --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index bb817d7..288c7a4 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "prettier": "prettier --check src/js tests/js", "test": "nyc --reporter=text mocha --recursive --bail tests/js", "transpile": "tsc -p tsconfig-transpile.json", - "build:constants": "node scripts/build_constants.js" + "build:constants": "node scripts/build_constants.js", + "prepublishOnly": "npm run transpile" }, "author": "Exabyte Inc.", "license": "ISC",