From 44c926281a9a626bb2111cd401e6a9694e2956d6 Mon Sep 17 00:00:00 2001 From: Matthew Elwell Date: Tue, 6 Oct 2026 10:05:14 +0200 Subject: [PATCH] chore: stop tracking generated utils/version.ts utils/version.ts is a build artifact generated by write-version.js, and .gitignore:45 says so. It was nonetheless committed in the same PR that added the ignore rule (#332), so the rule has never had any effect: the file is tracked, shows as modified after every build, and its committed contents drifted to 11.0.0 against a 12.4.0 package. Published packages were never affected - publish.yml and pull-request.yml both run `npm run build`, whose prebuild step regenerates the file from lib/flagsmith/package.json. The published @flagsmith/flagsmith@12.4.0 correctly embeds 12.4.0. Untrack it so the ignore rule applies. Nothing generated it on install, so `npm test` and `npm run typecheck` would fail on a fresh clone with "Cannot find module './utils/version'"; generating it from `prepare` fixes that, since npm runs prepare after `npm i`. Co-Authored-By: Claude Opus 5 (1M context) --- package.json | 2 +- utils/version.ts | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 utils/version.ts diff --git a/package.json b/package.json index 244af1d..bb4c7d6 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "prepublish": "npx in-publish && npm run build || echo", "test": "jest --env=jsdom", "checknodeversion": "npx ls-engines", - "prepare": "husky", + "prepare": "husky && npm run prebuild", "precommit": "npm run typecheck && npm run prebuild" }, "repository": { diff --git a/utils/version.ts b/utils/version.ts deleted file mode 100644 index d22ac37..0000000 --- a/utils/version.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Auto-generated by write-version.js -export const SDK_VERSION = "11.0.0";