From a6c77bf5895334a17f1435474590ca4a539778ad Mon Sep 17 00:00:00 2001 From: petroved Date: Mon, 16 Nov 2026 21:13:21 +0000 Subject: [PATCH] docs: correct runtime dependencies; drop markup-generator from dependencies Co-authored-by: petroved --- AGENTS.md | 4 ++-- README.md | 11 +++++++++-- docs/email-quality-toolkit.md | 2 +- llms-full.txt | 2 +- llms.txt | 2 +- package-lock.json | 3 +-- package.json | 3 +-- 7 files changed, 16 insertions(+), 11 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index bf36d03..6ae9d72 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,6 @@ # Agent notes for template-runtime-display -`@llazyemail/template-runtime-display` is a stateless runtime that renders a whole HTML email from named parts, plus the fragment functions those parts call. No DOM, no I/O, no runtime dependencies. Custom code is just another part. When a part throws, the trace names it. +`@llazyemail/template-runtime-display` is a stateless runtime that renders a whole HTML email from named parts, plus the fragment functions those parts call. No DOM, no I/O. Its only runtime dependency is `@llazyemail/render-template`. Custom code is just another part. When a part throws, the trace names it. The package is stateless, so loading the ESM and CJS builds in one process is safe. @@ -150,7 +150,7 @@ The Light / Dark preview pins `color-scheme` on the root of each previewed docum - `head` always emits charset `utf-8`, the viewport meta, a ``, and the hidden preview `<div>`. - Props and slots are interpolated raw. This package has no escape step. Keep it that way unless the task asks for escaping. - `bodyText`, `content`, and slot strings are allowed to contain HTML. -- Zero runtime dependencies. Dev tooling stays in `devDependencies`. +- One runtime dependency: `@llazyemail/render-template`. Do not add others. Dev tooling (including `markup-generator`, used only by tests and `scripts/generate.mjs`) stays in `devDependencies`. - Public types ship from `src/index.ts` through tsup `dts`. Keep `tsconfig` `types` empty so `@types/node` cannot leak into `.d.ts`. ## Add a fragment diff --git a/README.md b/README.md index 7670bd6..38d5f48 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ npx template-runtime-display inspect ./letter.mjs --fail-on error # also exit 1 [![CI](https://github.com/LLazyEmail/template-runtime-display/actions/workflows/ci.yml/badge.svg)](https://github.com/LLazyEmail/template-runtime-display/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -Requires **Node.js 24+**. No runtime dependencies. No template registry. Strings you pass are interpolated as HTML. +Requires **Node.js 24+**. One runtime dependency, [`@llazyemail/render-template`](https://github.com/LLazyEmail/render-template), which supplies the part/compose runtime and `RenderError` (see [Dependencies](#dependencies)). No template registry. Strings you pass are interpolated as HTML. - Agent guide: [AGENTS.md](./AGENTS.md) - Short index: [llms.txt](./llms.txt) @@ -91,7 +91,14 @@ console.log(formatDiff(diffRenders(before, after))); ## Package ecosystem and Lit -This package builds on `@llazyemail/render-template` (currently pinned via GitHub ref `github:LLazyEmail/render-template#0.3.0` in `package.json`). Prefer a published version from GitHub Packages when one is available and compatible, to reduce install fragility. +### Dependencies + +| Package | Where | Why | +| ----------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `@llazyemail/render-template` | `dependencies` | The part/compose runtime. `RenderError`, `RenderOptions`, `RenderJob` and `renderMany` come from it and are re-exported. Installed for every consumer. | +| `markup-generator` | `devDependencies` | Only used by `test/write.test.ts` and `npm run generate` (`scripts/generate.mjs`) to write rendered HTML to disk. Not installed for consumers. | + +`@llazyemail/render-template` is currently pinned via the GitHub ref `github:LLazyEmail/render-template#0.3.0` in `package.json`. Prefer a published version from GitHub Packages when one is available and compatible, to reduce install fragility. Parts must return **strings**. Lit `TemplateResult`s are not supported inside parts. diff --git a/docs/email-quality-toolkit.md b/docs/email-quality-toolkit.md index f28be79..a352f34 100644 --- a/docs/email-quality-toolkit.md +++ b/docs/email-quality-toolkit.md @@ -112,7 +112,7 @@ Gmail clips messages over ~102 KB of HTML, and the "View entire message" link hi ### Constraints (from AGENTS.md) -- Zero runtime dependencies: HTML is scanned with small tokenizers and regexes over the markup we generate, not a DOM library. Document that this is a linter for emails (mostly table markup and inline styles), not a general HTML parser, and keep a list of known blind spots in the README. +- No new runtime dependencies (the package already depends only on `@llazyemail/render-template`): HTML is scanned with small tokenizers and regexes over the markup we generate, not a DOM library. Document that this is a linter for emails (mostly table markup and inline styles), not a general HTML parser, and keep a list of known blind spots in the README. - No template registry. Rules are an array of functions passed in. - `escapeHtml` is still not applied to props. The linter should _report_ unescaped `<` and `&` in text positions rather than fixing them. - 100% coverage on new executable files. diff --git a/llms-full.txt b/llms-full.txt index f9296a1..8ec0233 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -1,7 +1,7 @@ # @llazyemail/template-runtime-display API Package: `@llazyemail/template-runtime-display`. -Node 24+. Named exports only. No default export. No runtime dependencies. No template registry. +Node 24+. Named exports only. No default export. One runtime dependency (`@llazyemail/render-template`). No template registry. Import the package root. Builds: ESM `dist/index.js`, CJS `dist/index.cjs`, browser IIFE `dist/index.global.js` (global `TemplateRuntimeDisplay`), types `dist/index.d.ts`. The runtime is synchronous and stateless. Callers own templates. The same template, props, and slots return the same HTML, including whitespace. Trace `ms` may differ. Omitted optional strings become `''`. Rendered HTML does not contain the word `undefined`. Prop values and slot strings are concatenated as HTML with no escape step. diff --git a/llms.txt b/llms.txt index a1db1e7..4d9c54b 100644 --- a/llms.txt +++ b/llms.txt @@ -1,6 +1,6 @@ # @llazyemail/template-runtime-display -> Stateless runtime that renders a whole HTML email from named parts and reports the part that broke. Ships an HTML inspector and a `template-runtime-display` CLI (`dev`, `inspect`). No runtime dependencies. Node 24+. Named exports only. No template registry. +> Stateless runtime that renders a whole HTML email from named parts and reports the part that broke. Ships an HTML inspector and a `template-runtime-display` CLI (`dev`, `inspect`). One runtime dependency (`@llazyemail/render-template`). Node 24+. Named exports only. No template registry. - Repo: https://github.com/LLazyEmail/template-runtime-display - Registry: https://npm.pkg.github.com (scope `@llazyemail`) diff --git a/package-lock.json b/package-lock.json index db7a4a7..4d97b1f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,8 +9,7 @@ "version": "1.2.1", "license": "MIT", "dependencies": { - "@llazyemail/render-template": "github:LLazyEmail/render-template#0.3.0", - "markup-generator": "^4.1.0" + "@llazyemail/render-template": "github:LLazyEmail/render-template#0.3.0" }, "bin": { "template-runtime-display": "dist/cli.js" diff --git a/package.json b/package.json index 146f15d..fb1a2a3 100644 --- a/package.json +++ b/package.json @@ -157,7 +157,6 @@ "live-reload" ], "dependencies": { - "@llazyemail/render-template": "github:LLazyEmail/render-template#0.3.0", - "markup-generator": "^4.1.0" + "@llazyemail/render-template": "github:LLazyEmail/render-template#0.3.0" } }