From 544bccaf16bc3ed5c9bd4cfa91c8dc9124b23aff Mon Sep 17 00:00:00 2001 From: Darrin Nagengast Date: Fri, 20 Feb 2026 15:29:43 -0600 Subject: [PATCH 1/2] feat: protect against publishing of placeholder version --- scripts/update-version.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/update-version.js b/scripts/update-version.js index 330acbd..7c48482 100644 --- a/scripts/update-version.js +++ b/scripts/update-version.js @@ -8,6 +8,10 @@ const packageJsonPath = path.join(__dirname, '..', 'package.json') const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')) const version = packageJson.version +if (version === '0.0.0-development') { + throw new Error('Cannot publish with placeholder version. Ensure npm version is set correctly.') +} + // Read index.js const indexPath = path.join(__dirname, '..', 'index.js') const indexContent = fs.readFileSync(indexPath, 'utf8') From f8db55b360a339e6069e2cfb38b8755bd9186080 Mon Sep 17 00:00:00 2001 From: Darrin Nagengast Date: Fri, 20 Feb 2026 15:33:15 -0600 Subject: [PATCH 2/2] fix: check for missing version --- scripts/update-version.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-version.js b/scripts/update-version.js index 7c48482..abce956 100644 --- a/scripts/update-version.js +++ b/scripts/update-version.js @@ -8,7 +8,7 @@ const packageJsonPath = path.join(__dirname, '..', 'package.json') const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')) const version = packageJson.version -if (version === '0.0.0-development') { +if (!version || version === '0.0.0-development') { throw new Error('Cannot publish with placeholder version. Ensure npm version is set correctly.') }