Skip to content

line-ui-7qm.2.1: B1 — Scaffold Bun workspace (8 packages + 2 apps)#178

Merged
miguelramos merged 5 commits into
mainfrom
chore/line-ui-7qm-2-1
May 26, 2026
Merged

line-ui-7qm.2.1: B1 — Scaffold Bun workspace (8 packages + 2 apps)#178
miguelramos merged 5 commits into
mainfrom
chore/line-ui-7qm-2-1

Conversation

@miguelramos
Copy link
Copy Markdown
Member

line-ui-7qm.2.1: B1 — Scaffold Bun workspace layout

Authors the monorepo workspace skeleton per spec §4 + §5 + §6.B + §7.1 (post-AM-002). 8 @websublime/line-* packages plus 2 private apps, each with package.json, tsconfig.json, src/ placeholder, and README.md. bun install resolves all 10 workspaces.

What was done

  • Packages (packages/line-{tokens,colors,schemas,themes,utils,core,components,icons}/): package.json with verbatim §4 exports map + per-package sideEffects + publishConfig:{access:public} + placeholder scripts; tsconfig.json per the §7.1 per-package matrix (CSS-only → include:[]; tsc-built → composite:true + references; vite-built → noEmit:true); src/index.{ts|css} placeholder; README.md skeleton.
  • Apps (apps/{storybook,site}/): package.json with private:true (no exports map, no publishConfig); tsconfig.json with noEmit:true; src/index.ts placeholder; README.md skeleton.
  • Root: tsconfig.base.json rewritten verbatim per §7.1 canonical block (AM-002); tslib ^2.8.1 added to devDependencies per §6.A.3 AM-002 (required by importHelpers:true); legacy emitDeclarationOnly:true removed (was blocking tsc -b JS emit for B4 packages).

Files changed

tsconfig.base.json (rewrite), package.json (+tslib), bun.lock (regen), and 40 new files under packages/ + apps/. 43 files total.

Decisions

  1. Biome reformat applied to the new package.json files. The §4 spec uses column-aligned values; Biome 2.x reformats to single-space and expands inline objects. Map keys + string values are unchanged — only intra-line whitespace differs. Pre-commit hook (biome --staged) would fail otherwise. Acceptance criterion §9.1 "exports map matches §4 exactly (string-for-string)" is satisfied at the map-entries level.
  2. composite: true added to packages/line-tokens/tsconfig.json. The §7.1 matrix row for line-tokens lists only include:[], but the §7.1 invariant (line 1577) mandates composite:true for any package referenced by another via references. line-icons references ../line-tokens (matrix row line 1571), so line-tokens must be composite.

Deviations

None from the spec contract. One RISK flagged for B4: tsc -b packages/line-icons fails with TS18003 because line-tokens has include:[]. B1 applies the spec verbatim; resolution belongs to B4 / spec authors.

Out of scope (per DECISIONS comment)

Cross-package workspace:^ deps → B2 · Real build scripts → B4 · scripts/lint-layers.mjs → B3 · Changesets ignore array → B5 · Storybook addons → Stream F.

Authors the monorepo workspace skeleton per spec §4 + §5 + §6.B + §7.1:

- packages/{line-tokens,line-colors,line-schemas,line-themes,line-utils,
  line-core,line-components,line-icons}/ each with package.json (verbatim
  §4 exports map, sideEffects per §4.x, publishConfig:public, placeholder
  scripts), tsconfig.json (per-package overrides per §7.1 matrix), src/
  placeholder (TS or CSS per matrix), README.md skeleton.
- apps/{storybook,site}/ each with package.json (private:true, no exports
  map), tsconfig.json, src/index.ts, README.md.
- tsconfig.base.json rewritten verbatim per §7.1 (AM-002 canonical block):
  adds noUncheckedIndexedAccess, exactOptionalPropertyTypes, declarationMap,
  verbatimModuleSyntax, importHelpers; removes the legacy emitDeclarationOnly
  flag that would have broken tsc -b packages in B4.
- tslib added to root devDependencies per §6.A.3 AM-002 (required by
  importHelpers).
- composite:true added to line-tokens (referenced by line-icons per §7.1
  invariant line 1577).

bun install resolves all 10 workspaces; biome check is clean.

Out of scope per DECISIONS: cross-package workspace:^ deps (B2), real
build scripts (B4), lint-layers.mjs (B3), Changesets ignore array (B5),
Storybook addons (Stream F).
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 25, 2026

⚠️ No Changeset found

Latest commit: cfb710f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Miguel Ramos added 4 commits May 25, 2026 17:03
…reference

Triggered by line-ui-7qm.2.1 B1 implementation.

The §7.1 per-package matrix `line-icons` row listed
`references: [{ "path": "../line-tokens" }]`, but `line-tokens` is
CSS-only with `include: []` — `tsc -b packages/line-icons` errors TS18003
because the reference target has no TS inputs.

TS project references are type-layer constructs. `line-icons` consumes
`line-tokens` at CSS/runtime; build-order belongs to B2 (workspace deps)
and B4 (build orchestration). The `line-utils` → `line-schemas`
reference is preserved (both packages are TS-emitting via `tsc -b`).

Evidence: bd comments line-ui-7qm.2.1 (B1 COMPLETED risk note).
… reference

- packages/line-icons/tsconfig.json: remove `references` clause
- packages/line-tokens/tsconfig.json: remove ad-hoc `composite: true`
- tsc -b packages/line-icons no longer errors TS18003

Per spec §7.1 (AM-003).
tsc -b emits {pkg}/tsconfig.tsbuildinfo. Pre-add the gitignore entry
so B4 (build) doesn't generate dirty working trees on every build.
- Replace literal "..." script placeholders with safe TBD markers
- Align apps tsconfig exclude with per-package convention (add tests/**)

Per code-reviewer cosmetic suggestions on PR #178.
@miguelramos miguelramos merged commit f1def8b into main May 26, 2026
@miguelramos miguelramos deleted the chore/line-ui-7qm-2-1 branch May 26, 2026 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant