Changelog
1.0.0-rc.2
The second release candidate, under next. One addition, so Matt's portfolio sub-sites can run it before 1.0:
base(anddata-base): the path an app lives under when it shares its host with another, such asexample.com/tools/x/besideexample.com/. A page reached from the same host but outsidebasenow counts as a visit, with that hostname as its referrer, so a click from the main site into the tool is counted. Withoutbase, nothing changes. The beacon sends nothing new.
1.0.0-rc.1
The release candidate for 1.0, on npm under the next tag (npm install peepless@next). It runs on
real apps for two weeks; if nothing needs to break, it becomes 1.0.0 with one change: the starters import peepless@1. No code
changes from 0.5.0.
docs/semver.md: what 1.0 promises for the exports, the beacon, the counter names, the tables and the bot and source lists.docs/migrating.md: every breaking change since 0.1, in one place.- Prereleases publish under
next, sonpm install peeplesskeeps getting the last release.
0.5.0
0.5 is the site: mattblack.space/tools/peepless. Nothing in the package's API changes.
- The reference is generated: the HTTP half from
openapi.yaml(with every replayed example and what it counts), the functions from the package's own source and doc comments. The counters page isdocs/counters.md. - The site counts itself with peepless and shows its own last 30 days on a public stats page, from a small
endpoint on
readCountsandsummarizethat folds countries with fewer than 10 visits into "others". homepageinpackage.jsonpoints at the site.- The CHANGELOG, README,
llms.txtandSECURITY.mdopen on the site as appendices. - Fixed: the client keeps its engaged-visit state per project, so two apps on one origin
(
example.com/andexample.com/tools/x/) no longer share it and miss each other'shuman.
0.4.0
0.4 runs anywhere, for real.
Breaking
- Node 20 or later (
engines.nodeis>=20). 18 is past end of life and wasn't tested.
Added
postgresStore(query)for any Postgres, given a function that runs SQL (pg, postgres.js, Neon), and its migrationstarters/postgres/0001_peepless.sql.d1Store(db)for Cloudflare D1, its migration and a Cloudflare Workers starter (starters/cloudflare/).- A SvelteKit starter. Every starter is now typechecked in CI against the package's own types.
peepless/testing:testStore(makeStore)checks a store keeps the store contract. All four built-in stores pass it in CI against real databases (PGlite, Miniflare's D1, and Supabase's SQL functions).docs/stores.mdexplains how to write one.- Campaign tags:
campaignson a project and on the client. On a visit tagged?ref=or?utm_source=, a listed tag counts asvia:<tag>and anything else asvia:other. The client sendsotherfor an unlisted tag, so a raw value never leaves the browser. Adds the beacon fieldvia. respectGPC: true(anddata-respect-gpc): send nothing when Global Privacy Control is on. Off by default; the README says why.Reasongains'gpc'.createHandleroptionsaddress(req)(which header the rate limit trusts) andisBot(ua)(replace or wrap the built-in filter). The README now says plainly that the rate limit is per instance.- The server is smoke-tested on Deno, Bun and workerd as well as Node.
0.3.0
0.3 reads the numbers back. It is also the first release with the 0.2 changes below, which were never published on their own: read their breaking lines when upgrading from 0.1.
ReadableStore(Storeplusread(project, since, until));supabaseStorereads throughpeepless_counts, paging past Supabase's 1,000-row cap, andmemoryStorereads too.readCounts(store, { project, since, until })andsummarize(rows, range?): totals, sources, campaigns, countries, pages, events and a per-day series, with zeros for quiet days. TypesCountRow,Summary,DayTotals.createStatsHandler({ store, token }):GET ?project=&since=&until=with a bearer token answers aSummaryas JSON. A wrong or missing token gets 401; without a token of 16+ characters it answers 503. Inopenapi.yaml, with replayed examples, and in both starters (app/api/peepless/stats/route.ts,functions/peepless-stats).npx peepless report(the last 30 days in the terminal) andnpx peepless doctor(table, key and a test beacon that counts nothing). Node only; nothing added to the browser bundle.memoryStorecounts a counter named twice in one call once, aspeepless_adddoes.
0.2.0 (not published; shipped in 0.3.0)
0.2 decides the public surface. Breaking changes are allowed before 1.0; each has a line here saying what to change.
Breaking
peeplessno longer exportsrouteOf,blocked,readIgnoreParam,ignored,DEFAULT_ENDPOINTorDEFAULT_IGNORE_PARAM. UseisOptedOut()in place ofignored(), andstart(...).reasonin place ofblocked(host). The others were internal; copy them if you relied on them.peepless/serverno longer exportscheckProjects,EVENTorutcDay.createHandlerstill checks its projects and throws on a mistake, so call it to validate a config.history.replaceStateto a new path now counts a page view, aspushStatedoes (Next.jsrouter.replace, React Routernavigate(to, { replace: true })). AreplaceStatethat only changes the query or hash still doesn't.- A page restored from the back/forward cache now counts a page view (not a visit).
- The localhost console hint names the reason by its code (
not-live), and suggestsdebug: true.
Added
hosttakes a list of hostnames, anddata-hosta space-separated list.optOut(),optIn()andisOptedOut(), also onwindow.peepless. Opting in or out takes effect at once.debug: true(anddata-debug): log each beacon instead of sending it, on any host.- What
startreturns hascountingandreason(aReason:no-browser,automated,not-live,no-beacon,opted-outordebug). start<'a' | 'b'>()narrowstrackon what it returns to those event names. Types only.trackcalls made beforestartare held (up to 20) and sent once it runs; off the live site they're dropped.openapi.yaml(OpenAPI 3.1) describes the beacon endpoint and ships in the package (peepless/openapi.yaml).npm run checkreplays its examples againstcreateHandler.docs/counters.md: the grammar of counter names, and the rule that from 1.0 they never change meaning.npm run checkcompares every public export withscripts/exports.txt.
Fixed
- The README gave the rate limit as per project; it is per address per project. The size is now "under 2 KB" everywhere, which the build checks.
0.1.1
- First release published by the release workflow, with npm provenance. No code changes from 0.1.0.
0.1.0
- First release: the browser client (
peepless, and the drop-indist/peepless.js), the server handler (peepless/server) with the bot filter and country counts, the Supabase and Next.js starters, andllms.txt.