feat: adopt the shared web packages from nself-org/web - #7
Merged
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relocates
@nself-web/ui,@nself-web/csp,@nself-web/ogand@nself/tailwind-brand— 109 files — out of the web monorepo.They are shared infrastructure (
uihas six consumers,tailwind-brandeight) 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/uiin sixteen files, so it could not build anywhere else.nchat,ntv,nsentryandnfamilysit in the same position, so this unblocks five product repos, not one.All four are leaf packages with no internal
@nselfdependencies, so the move is self-contained. What had to change to meet this repo's stricter settings:../../tsconfig.base.jsonwithcomposite/incrementaloff, matching@nself/uihere — tsup drives emit and tsc rejects--incrementalwithout a buildinfo fileignoreDeprecationspush-clientwith TS5103exactOptionalPropertyTypesThe
exactOptionalPropertyTypesfixes are genuine, not suppressions:csp'sbuildCspDirectivesassigned possibly-undefined values to optional keys, so those are now spread in only when defined (key absent rather than present-and-undefined), andAsyncScreenthreads optional props straight through, so fourteen prop declarations widen to acceptundefinedexplicitly.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}andpackages/@nself/*there, and point its workspace at this repo so there is one home per package.