═══════════════════════════════════════════════════════════════════════ TODO #6 — size-limit budgets in CI ═══════════════════════════════════════════════════════════════════════ Adds .size-limit.cjs with budgets for 6 pilot @bytelyst/* packages, plus a Gitea Actions workflow (.gitea/workflows/size-limit.yml) that fails the build on any regression. Current measurements vs budget (all comfortably under): @bytelyst/api-client 793 B / 8 KB @bytelyst/auth-client 1.97 KB / 8 KB @bytelyst/celebrations 236 B / 6 KB @bytelyst/quick-actions 122 B / 6 KB @bytelyst/react-auth 2.71 KB / 10 KB @bytelyst/dashboard-shell 3.96 KB / 30 KB Scripts: pnpm size — measure + assert against budgets pnpm size:why — explain top contributors Deps: size-limit@^12.1.0, @size-limit/preset-small-lib@^12.1.0. Pilot scope (this commit): 6 packages. Full @bytelyst/* rollout is incremental — each entry added separately. ═══════════════════════════════════════════════════════════════════════ TODO #5 — Storybook canonical pattern ═══════════════════════════════════════════════════════════════════════ Discovery: @bytelyst/ui already has Storybook 8 with the @bytelyst/ addon-a11y addon configured and 5 .stories.tsx files. This commit: - Documents that setup as the canonical template (docs/STORYBOOK_TEMPLATE.md) including the .storybook/main.ts, preview.ts, package.json scripts, and an example story. - Catalogs which of the 8 visual @bytelyst/* packages need Storybook added (1/8 done — @bytelyst/ui). - Per docs/ROADMAP_2026_DECISIONS.md §9, hosting target is self-hosted Gitea Pages (no Chromatic). Full rollout to the other 7 packages stays open as incremental work. ═══════════════════════════════════════════════════════════════════════ TODO #4 — DTCG v3 token migration RFC ═══════════════════════════════════════════════════════════════════════ This is too large to land in a single commit. Drafted RFC instead: docs/rfc/0001-dtcg-v3-token-migration.md The RFC proposes a 4-PR sequence: PR 1 — Add converter + dual-emit (byte-identical assertion) PR 2 — Flip source of truth to DTCG JSON PR 3 — Introduce the component tier PR 4 — Multi-theme via DTCG token sets Estimate: 2 person-weeks total. Backward compatibility: --ml-* and --bl-* names preserved through all 4 PRs. Status: Draft, awaiting reviewers. Refs: learning_ai_uxui_web/docs/ROADMAP_2026.md §10 TODOs #4, #5, #6
69 lines
2.3 KiB
JavaScript
69 lines
2.3 KiB
JavaScript
/**
|
|
* ROADMAP TODO #6 — Bundle-size budgets for @bytelyst/* packages.
|
|
*
|
|
* Each entry measures the gzipped size of a package's built `dist/`
|
|
* output. The 'limit' field is the budget — PRs that exceed it fail CI.
|
|
*
|
|
* Initial budgets per learning_ai_uxui_web/docs/ROADMAP_2026.md §5
|
|
* "Performance budgets":
|
|
* - Pure-TS clients → 8 KB
|
|
* - Feature packs → 6 KB
|
|
* - UI primitive slices → ~1 KB per primitive (whole pkg < 30 KB)
|
|
* - Tokens / design-tokens → 12 KB (CSS heavy)
|
|
*
|
|
* Pilot scope (this commit): wire up 6 representative packages. Rollout
|
|
* to the rest of @bytelyst/* lands incrementally as packages stabilise.
|
|
*
|
|
* Run locally:
|
|
* pnpm -w size — full check
|
|
* pnpm -w size --why <name> — explain what's contributing
|
|
*
|
|
* To add a package:
|
|
* 1. Confirm the package has 'build' in its scripts and emits to dist/
|
|
* 2. Add an entry below with name, path, and limit
|
|
* 3. Run `pnpm -w size --update` to record the current baseline if
|
|
* you're starting under-budget (optional)
|
|
*/
|
|
module.exports = [
|
|
// ── Pure-TS clients (8 KB) ──────────────────────────────────────
|
|
{
|
|
name: '@bytelyst/api-client',
|
|
path: 'packages/api-client/dist/index.js',
|
|
limit: '8 KB',
|
|
gzip: true,
|
|
},
|
|
{
|
|
name: '@bytelyst/auth-client',
|
|
path: 'packages/auth-client/dist/index.js',
|
|
limit: '8 KB',
|
|
gzip: true,
|
|
},
|
|
// ── Feature packs (6 KB) ────────────────────────────────────────
|
|
{
|
|
name: '@bytelyst/celebrations',
|
|
path: 'packages/celebrations/dist/index.js',
|
|
limit: '6 KB',
|
|
gzip: true,
|
|
},
|
|
{
|
|
name: '@bytelyst/quick-actions',
|
|
path: 'packages/quick-actions/dist/index.js',
|
|
limit: '6 KB',
|
|
gzip: true,
|
|
},
|
|
// ── React bindings (10 KB — slightly higher for hooks + context) ─
|
|
{
|
|
name: '@bytelyst/react-auth',
|
|
path: 'packages/react-auth/dist/index.js',
|
|
limit: '10 KB',
|
|
gzip: true,
|
|
},
|
|
// ── Shells / composite UI (30 KB) ───────────────────────────────
|
|
{
|
|
name: '@bytelyst/dashboard-shell',
|
|
path: 'packages/dashboard-shell/dist/index.js',
|
|
limit: '30 KB',
|
|
gzip: true,
|
|
},
|
|
];
|