From 033dfd155277e0f3dd6137097a20d047ff06eb74 Mon Sep 17 00:00:00 2001 From: Ewan Croft Date: Sat, 7 Mar 2026 11:44:19 +0000 Subject: [PATCH] docs: point packages/tid and CONTRIBUTING to pkgs monorepo --- CONTRIBUTING.md | 10 ++++++---- packages/tid/README.md | 8 ++++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1d25446..02ed393 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -183,16 +183,18 @@ There's no formal CLA or contributor agreement — AGPL-3.0 covers contributions ## Publishing `@ewanc26/tid` -The `packages/tid/` directory is the source for the [`@ewanc26/tid`](https://www.npmjs.com/package/@ewanc26/tid) package. It is versioned and published independently from the main CLI. +> **Note:** `@ewanc26/tid` is now canonically maintained in the [`@ewanc26/pkgs`](https://github.com/ewanc26/pkgs) monorepo. The copy in `packages/tid/` here is kept for historical context. All version bumps, releases, and npm publishes should happen from there. -To cut a new release: +To cut a new release, work from the pkgs monorepo: ```sh -cd packages/tid +cd /path/to/pkgs +git subtree pull --prefix=packages/tid malachite malachite-split +cd packages/tid # Bump the version in package.json, then: pnpm build npm publish --access public --otp= ``` -The package has no runtime dependencies and must stay that way. If a change to `src/core/tid.ts` affects the public API of the package, update `packages/tid/src/index.ts` to match and bump the version accordingly (semver — patch for fixes, minor for new exports, major for breaking changes). +The package has no runtime dependencies and must stay that way. If a change to `src/core/tid.ts` in this repo affects the public API of the package, update `packages/tid/src/index.ts` in `pkgs` to match and bump the version accordingly (semver — patch for fixes, minor for new exports, major for breaking changes). diff --git a/packages/tid/README.md b/packages/tid/README.md index 2145c8b..8deced4 100644 --- a/packages/tid/README.md +++ b/packages/tid/README.md @@ -1,10 +1,12 @@ # @ewanc26/tid +> **Canonical source:** This package is now maintained in the [`@ewanc26/pkgs`](https://github.com/ewanc26/pkgs) monorepo under [`packages/tid`](https://github.com/ewanc26/pkgs/tree/main/packages/tid). This copy exists for historical context — please open issues and PRs there. + Zero-dependency [AT Protocol](https://atproto.com/) TID (Timestamp Identifier) generation for Node.js and browsers. This package is **written in TypeScript** and compiled to **plain JavaScript**, so it ships with type definitions for TypeScript users and runs anywhere the Web Crypto API is available — Node.js 20+, Deno, Bun, and modern browsers. -TIDs are 13-character, lexicographically sortable record keys used across the AT Protocol and Bluesky. They’re monotonic identifiers derived from a microsecond timestamp and a 5-bit clock ID. When multiple TIDs would otherwise share the same microsecond, this package avoids collisions by nudging the clock ID (initialised per JS context) so each generated TID stays unique and strictly increasing within that runtime. +TIDs are 13-character, lexicographically sortable record keys used across the AT Protocol and Bluesky. They're monotonic identifiers derived from a microsecond timestamp and a 5-bit clock ID. When multiple TIDs would otherwise share the same microsecond, this package avoids collisions by nudging the clock ID (initialised per JS context) so each generated TID stays unique and strictly increasing within that runtime. --- @@ -131,6 +133,8 @@ interface DecodedTid { ## Testing & development +Development happens in the [`@ewanc26/pkgs`](https://github.com/ewanc26/pkgs) monorepo. See the monorepo README for setup instructions. + * `resetTidClock()` is exported for tests to make deterministic TID generation possible. * The library has zero runtime deps and uses the Web Crypto API for secure randomness. When running in older environments, provide a compatible Web Crypto polyfill if necessary. @@ -138,4 +142,4 @@ interface DecodedTid { ## Licence -AGPL-3.0-only — same as [Malachite](https://github.com/ewanc26/malachite/tree/main). +AGPL-3.0-only — see the [pkgs monorepo licence](https://github.com/ewanc26/pkgs/blob/main/LICENSE). -- 2.51.2