Files
meshcore-analyzer/package.json
Kpa-clawbot d5b300a8ba fix: derive version from git tags instead of package.json (#486)
## Summary

Fixes #485 — the app version was derived from `package.json` via
Node.js, which is a meaningless artifact for this Go project. This
caused version mismatches (e.g., v3.3.0 release showing "3.2.0") when
someone forgot to bump `package.json`.

## Changes

### `manage.sh`
- **Line 43**: Replace `node -p "require('./package.json').version"`
with `git describe --tags --match "v*"` — version is now derived
automatically from git tags
- **Line 515**: Add `--force` to `git fetch origin --tags` in setup
command
- **Line 1320**: Add `--force` to `git fetch origin --tags` in update
command — prevents "would clobber existing tag" errors when tags are
moved

### `package.json`
- Version field set to `0.0.0-use-git-tags` to make it clear this is not
the source of truth. File kept because npm scripts and devDependencies
are still used for testing.

## How it works

`git describe --tags --match "v*"` produces:
- `v3.3.0` — when on an exact tag
- `v3.3.0-3-gabcdef1` — when 3 commits after a tag (useful for
debugging)
- Falls back to `unknown` if no tags exist

## Testing

- All Go tests pass (`cmd/server`, `cmd/ingestor`)
- All frontend unit tests pass (254/254)
- No changes to application logic — only build-time version derivation

Co-authored-by: you <you@example.com>
2026-04-02 00:53:38 -07:00

27 lines
933 B
JSON

{
"name": "meshcore-analyzer",
"version": "0.0.0-use-git-tags",
"description": "Community-run alternative to the closed-source `analyzer.letsmesh.net`. MQTT packet collection + open-source web analyzer for the Bay Area MeshCore mesh.",
"main": "index.js",
"scripts": {
"test": "npx c8 --reporter=text --reporter=text-summary sh test-all.sh",
"test:unit": "node test-packet-filter.js && node test-aging.js && node test-frontend-helpers.js",
"test:coverage": "npx c8 --reporter=text --reporter=html sh test-all.sh",
"test:full-coverage": "sh scripts/combined-coverage.sh"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@michaelhart/meshcore-decoder": "^0.2.7",
"better-sqlite3": "^12.8.0",
"express": "^5.2.1",
"mqtt": "^5.15.0",
"ws": "^8.19.0"
},
"devDependencies": {
"nyc": "^18.0.0",
"playwright": "^1.58.2",
"supertest": "^7.2.2"
}
}