/tools/peepless/docs/semver/Appendix E of FWhat 1.0 promisesDaybook of peepless 1.0.0-rc.2Days kept in UTC
E
Appendix E · rendered from docs/semver.mddocs/semver.md on GitHub

What 1.0 promises

peepless follows semantic versioning from 1.0. This page says what that covers, part by part, because an analytics package has more surface than its function names: the beacon the browser sends, the names written into your database, and the tables themselves all outlive a release.

A major release (2.0) is the only place anything below may break. A minor release adds. A patch release fixes without adding.

The public API

Every name listed in scripts/exports.txt, from peepless, peepless/server and peepless/testing, with the types the TypeScript declarations give it. Also the drop-in script's data-* attributes and window.peepless.

  • A name is never removed or renamed, and a function never takes away an option or changes what one means.
  • New exports, new options and new fields on returned objects arrive in minor releases.
  • A type may get wider where you pass it in and narrower where you read it out, and only in ways that keep code that compiled before compiling.
  • Interfaces you implement (Store, ReadableStore) and the functions you pass in (address, isBot, country, a Query) never gain a required member or parameter outside a major. testStore only adds checks for rules the documented contract already had.
  • npm run check fails on any change to the list of export names that isn't committed on purpose. The types and the drop-in script's attributes are promised too, but checked by review, not by a snapshot.

Anything under src/internal/ is not public. It isn't in the package's exports map, so it can't be imported, and it changes whenever it needs to.

The contracts

These live in other people's databases and in other servers, so they move more slowly than code.

  • The HTTP API (openapi.yaml). Fields are only ever added. A server ignores fields it doesn't know, and a client never requires a newer server: a 1.x client talks to any 1.x server. So a 1.x client never sends a new built-in event (an older server would answer 400), and every beacon stays under the 1 KB an older server accepts. Status codes keep their meaning. The examples in the file are replayed against the real handlers on every check.
  • Counter names (docs/counters.md). A name, once written to someone's table, is never renamed and never given a new meaning. New names may arrive in a minor release. Days are UTC, and stay UTC.
  • The SQL schema (peepless.counts, peepless_add, peepless_counts, the Postgres and D1 migrations). Postgres and D1 get a new numbered migration that is safe to run twice; Supabase's schema.sql stays one file that is safe to re-run and only ever adds. Never an edit that breaks an existing table.
  • llms.txt. Coding assistants follow it literally, so its steps change only with the code they describe.

The lists

The built-in bot filter (isBot) and source list (SOURCES) are data, not API. Adding a bot or a source changes how counts split (a visit that was from:other becomes from:bluesky), never what an existing name means, and ships in a minor release with a CHANGELOG line. Removing a source happens only in a major.

What isn't covered

  • Exact byte sizes and timings: the client stays under its 2 KB budget, but its size moves.
  • Log and error message wording, including the error text in a 4xx body. Status codes are covered.
  • The starters: they're examples to copy, and change whenever a better way exists.
  • Runtime support: the Node floor rises only in a major. Deno, Bun and workerd are tested on their current versions.