From 56ae5995696f7566e4ced80cc0096ae4be891259 Mon Sep 17 00:00:00 2001 From: Aleksejs Gordejevs Date: Sat, 22 Aug 2026 10:23:18 +0300 Subject: [PATCH] chore: release v2.2.3 The v2.2.3 tag was pushed onto the PR #209 merge commit while package.json still read 2.2.2, so npm rejected the publish with "You cannot publish over the previously published versions: 2.2.2". Bump package.json to 2.2.3 and close the Unreleased changelog section. Also add a pre-flight step to the publish workflow that compares the git tag against package.json before npm ci / tests / audit run, so a future mismatch fails in seconds with an actionable message instead of surfacing as a registry error at the dry-run step. Co-Authored-By: Claude Opus 5 --- .github/workflows/publish.yml | 11 +++++++++++ CHANGELOG.md | 2 +- package.json | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 33e2d08..662b69b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -24,6 +24,17 @@ jobs: node-version: 24 package-manager-cache: false + - name: Verify tag matches package version + run: | + TAG_VERSION="${GITHUB_REF_NAME#v}" + PKG_VERSION=$(node -p "require('./package.json').version") + if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then + echo "::error::Tag ${GITHUB_REF_NAME} does not match package.json version ${PKG_VERSION}." + echo "::error::Create a 'chore: release v${PKG_VERSION}' style commit that bumps package.json, then tag that commit." + exit 1 + fi + echo "Tag ${GITHUB_REF_NAME} matches package.json version ${PKG_VERSION}." + - name: Install dependencies run: npm ci diff --git a/CHANGELOG.md b/CHANGELOG.md index e58ca55..1869105 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## Unreleased +## 2.2.3 - 2026-08-22 - Detect headless Chrome. The list carried `chromeheadless`, which is the Karma launcher label; Chrome itself reports `HeadlessChrome/`. diff --git a/package.json b/package.json index ff6c48f..625e3ac 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "express-useragent", "description": "JS Library & ExpressJS user-agent middleware exposing", - "version": "2.2.2", + "version": "2.2.3", "homepage": "https://github.com/biggora/express-useragent/", "repository": { "type": "git",