Skip to content

feat: adopt the shared web packages from nself-org/web - #7

Merged
acamarata merged 2 commits into
mainfrom
feat/adopt-shared-web-packages
Aug 19, 2026
Merged

feat: adopt the shared web packages from nself-org/web#7
acamarata merged 2 commits into
mainfrom
feat/adopt-shared-web-packages

Conversation

@acamarata

Copy link
Copy Markdown
Contributor

Relocates @nself-web/ui, @nself-web/csp, @nself-web/og and @nself/tailwind-brand109 files — out of the web monorepo.

They are shared infrastructure (ui has six consumers, tailwind-brand eight) that lived in a private monorepo owning none of them. That is precisely what blocked moving the ntask web app into its own repo: the app imports @nself-web/ui in sixteen files, so it could not build anywhere else. nchat, ntv, nsentry and nfamily sit in the same position, so this unblocks five product repos, not one.

All four are leaf packages with no internal @nself dependencies, so the move is self-contained. What had to change to meet this repo's stricter settings:

tsconfig re-pointed to ../../tsconfig.base.json with composite/incremental off, matching @nself/ui here — tsup drives emit and tsc rejects --incremental without a buildinfo file
ignoreDeprecations kept per-package; putting it in the shared base broke push-client with TS5103
exactOptionalPropertyTypes enforced here, not in web — two real fixes
test type-checking enforced here, not in web — four real fixes

The exactOptionalPropertyTypes fixes are genuine, not suppressions: csp's buildCspDirectives assigned possibly-undefined values to optional keys, so those are now spread in only when defined (key absent rather than present-and-undefined), and AsyncScreen threads optional props straight through, so fourteen prop declarations widen to accept undefined explicitly.

Versions aligned to 0.1.0. Build clean, typecheck clean, 778 tests pass.

Follow-up (separate PR, web repo): delete packages/{ui,csp,og,tailwind-brand} and packages/@nself/* there, and point its workspace at this repo so there is one home per package.

Relocates @nself-web/ui, @nself-web/csp, @nself-web/og and
@nself/tailwind-brand (109 files) out of the web monorepo.

They are shared infrastructure — ui has six consumers, tailwind-brand eight —
but they lived in a private monorepo that owns none of them. That is what
blocked moving the ntask web app into its own repo: the app imports
@nself-web/ui in sixteen files, so it could not build anywhere else. nchat,
ntv, nsentry and nfamily are all in the same position, so this unblocks five
product repos rather than one.

All four are leaf packages with no internal @nself dependencies, so the move is
self-contained. Adjustments needed to meet this repo's stricter settings:

- tsconfigs re-pointed from the web monorepo's packages/config/tsconfig/base
  to ../../tsconfig.base.json, with composite and incremental off, matching
  @nself/ui here — tsup drives emit, and tsc rejects --incremental without a
  buildinfo file.
- ignoreDeprecations stays per-package rather than going in the shared base;
  putting it there broke push-client with TS5103.
- exactOptionalPropertyTypes is enforced here and was not in web. Two real
  fixes: csp's buildCspDirectives assigned possibly-undefined values to
  optional keys (now spread in only when defined, so the key is absent rather
  than present-and-undefined), and AsyncScreen threads optional props straight
  through, so fourteen prop declarations widen to accept undefined explicitly.
- This repo type-checks test files and web did not, which surfaced four errors
  in the relocated tests: two unguarded indexed accesses under
  noUncheckedIndexedAccess, a .ts import specifier, and an untyped JS import.

Versions aligned to 0.1.0 with the rest of the repo. Build clean, typecheck
clean, 778 tests pass.
…g CI

`pnpm audit --audit-level=high` failed this branch with 2 critical findings:
GHSA-5xrq-8626-4rwp — when the Vitest UI server is listening, an arbitrary file
can be read. Affects vitest <3.2.6.

Added `vitest: ">=3.2.6"` to the root pnpm.overrides block, and raised the
existing dompurify pin from >=3.4.11 to >=3.4.13 so the two remaining DOMPurify
advisories (IN_PLACE hook detached subtree, CUSTOM_ELEMENT_HANDLING bypass)
also clear.

Overrides only take effect at the workspace root, and config is not proof, so
this was verified by resolution: the lockfile now pins vitest@3.2.6 and
dompurify@3.4.14, and `pnpm audit --audit-level=high` exits 0 (the 2 remaining
highs are the ones already on the ignore list).
@acamarata
acamarata merged commit 823f379 into main Aug 19, 2026
3 checks passed
@acamarata
acamarata deleted the feat/adopt-shared-web-packages branch August 19, 2026 16:18
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