webring 1.10.0 → 1.10.1-dev.9326

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.10.1](https://github.com/shepherdjerred/monorepo/compare/webring-v1.10.0...webring-v1.10.1) (2026-08-13)
9
+
10
+ No library behavior changes. `src/`, the runtime dependencies, and the published `package.json` metadata are identical to `1.10.0`. The shipped `README.md` — the page you see on npm — did get a substantive documentation pass.
11
+
12
+ - `README.md` now documents every `Configuration` key in a table, and clarifies which fields are genuinely required: because the exported `Configuration` type is the Zod _output_ type, the schema's defaults for `number` and `truncate` are already applied in the type, so both must be passed explicitly alongside `sources`. Only `cache` and `shuffle` may be omitted. The Quick Start snippet was corrected to match ([9a546a4](https://github.com/shepherdjerred/monorepo/commit/9a546a4b05cccbc469ab8ce5ef5104ef7f40a34f))
13
+ - `README.md` logo images render again. They pointed at `cdn.rawgit.com` under the retired standalone `shepherdjerred/webring` repo, which now 404s, and are served from the monorepo instead. The generated API docs link moved from `shepherdjerred.github.io/webring` to [webring.sjer.red](https://webring.sjer.red) ([9a546a4](https://github.com/shepherdjerred/monorepo/commit/9a546a4b05cccbc469ab8ce5ef5104ef7f40a34f))
14
+ - The analytics snippet injected into the generated TypeDoc site was retuned — history-change pageviews, heatmaps, dead clicks, and web-vitals/network timing on; session recording re-enabled with all inputs masked; person profiles now persisted; DNT still respected ([f56bf21](https://github.com/shepherdjerred/monorepo/commit/f56bf21a9e4dbf0855fb1f95b7c41015069f299c)). Only `posthog.js` changed, and it is not part of the published npm tarball.
15
+
8
16
  ## [1.10.0](https://github.com/shepherdjerred/monorepo/compare/webring-v1.9.0...webring-v1.10.0) (2026-08-10)
9
17
 
10
18
  No library behavior changes. The shipped code is identical to `1.9.0`; this release exists only because of repo-level housekeeping that release-please picked up.
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  <div align="center">
2
2
  <picture>
3
- <source media="(prefers-color-scheme: dark)" srcset="https://cdn.rawgit.com/shepherdjerred/webring/main/assets/logo-dark.png">
4
- <source media="(prefers-color-scheme: light)" srcset="https://cdn.rawgit.com/shepherdjerred/webring/main/assets/logo-light.png">
5
- <img alt="webring logo" src="https://cdn.rawgit.com/shepherdjerred/webring/main/assets/logo-light.png" height=150>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/shepherdjerred/monorepo/main/packages/webring/assets/logo-dark.png">
4
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/shepherdjerred/monorepo/main/packages/webring/assets/logo-light.png">
5
+ <img alt="webring logo" src="https://raw.githubusercontent.com/shepherdjerred/monorepo/main/packages/webring/assets/logo-light.png" height=150>
6
6
  </picture>
7
7
 
8
8
  [![webring](https://img.shields.io/npm/v/webring.svg)](https://www.npmjs.com/package/webring)
@@ -27,7 +27,7 @@ npm i webring
27
27
 
28
28
  ## Quick Start
29
29
 
30
- This library is intended to be used with a static site generator. I use this with [Astro](https://astro.build/) on my [personal website](https://github.com/shepherdjerred/monorepo/blob/1220ebef2e43956ba385402ed8529870e9084de8/src/components/BlogWebring.astro#L17-L22).
30
+ This library is intended to be used with a static site generator. I use it with [Astro](https://astro.build/) on my personal website — see [`packages/sjer.red/src/webring.ts`](https://github.com/shepherdjerred/monorepo/blob/main/packages/sjer.red/src/webring.ts) for a real consumer.
31
31
 
32
32
  ```typescript
33
33
  import { run } from "webring";
@@ -47,6 +47,8 @@ const result = await run({
47
47
  title: "Jake Lazaroff",
48
48
  },
49
49
  ],
50
+ number: 3,
51
+ truncate: 300,
50
52
  });
51
53
 
52
54
  console.log(result);
@@ -80,13 +82,33 @@ console.log(result);
80
82
 
81
83
  ## Configuration
82
84
 
83
- `webring` is configured by passing in a `Configuration` object into the `run` method.
84
-
85
- All possible configuration values can be seen by looking at the [`typedoc` site](https://shepherdjerred.github.io/webring/types/Configuration.html).
85
+ `webring` is configured by passing a `Configuration` object into `run`. The
86
+ exported `Configuration` type is the Zod _output_ type, so the schema's
87
+ defaults for `number` and `truncate` are already applied in the type: those two
88
+ fields are **required** on the object you pass in, alongside `sources`. Only
89
+ `cache` and `shuffle` may be omitted.
90
+
91
+ | Key | Type | Required | Description |
92
+ | ------------------------------ | -------------------- | -------- | --------------------------------------------------------------------- |
93
+ | `sources` | `Source[]` | yes | Feeds to fetch. Each has a `url`, a `title`, and an optional `filter` |
94
+ | `number` | `number` | yes | Return the n latest updates across all sources |
95
+ | `truncate` | `number` | yes | Preview length in characters, applied after HTML sanitization |
96
+ | `cache` | `CacheConfiguration` | no | Enable caching by providing this object; omit it to disable caching |
97
+ | `cache.cache_file` | `string` | no | File used as the cache. Defaults to `"cache.json"` |
98
+ | `cache.cache_duration_minutes` | `number` | no | How long a cached result is reused. Defaults to `60` |
99
+ | `shuffle` | `boolean` | no | Randomize the output order. Omitted behaves as `false` |
100
+
101
+ The `cache.*` defaults above are the only ones `run` fills in at runtime: it
102
+ parses the object with `CachedConfigurationSchema`, which succeeds only when
103
+ `cache` is present. Without a `cache` key the object is used as given, so
104
+ `number` and `truncate` must carry real values rather than relying on the
105
+ schema.
106
+
107
+ Full generated API documentation: [webring.sjer.red](https://webring.sjer.red) (e.g. [`Configuration`](https://webring.sjer.red/types/Configuration.html)).
86
108
 
87
109
  ## Example
88
110
 
89
- An example of using this project with Astro is located in `example`. The relevant file is [`src/pages/blog/[...slug].astro`](https://github.com/shepherdjerred/monorepo/blob/main/packages/webring/example/src/pages/blog/%5B...slug%5D.astro#L18).
111
+ An example of using this project with Astro is located in `example`. The relevant file is [`src/pages/blog/[...slug].astro`](https://github.com/shepherdjerred/monorepo/blob/main/packages/webring/example/src/pages/blog/%5B...slug%5D.astro).
90
112
 
91
113
  ```typescript
92
114
  ---
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "url": "https://github.com/shepherdjerred/monorepo/issues"
18
18
  },
19
19
  "type": "module",
20
- "version": "1.10.0",
20
+ "version": "1.10.1-dev.9326",
21
21
  "scripts": {
22
22
  "lint": "eslint src --cache",
23
23
  "build": "PATH=node_modules/@typescript/native/bin:$PATH tsc",