Replace the jest-era invocation (npm test ... --updateSnapshot --skip-cache) with the vitest/nx
equivalent so the snapshot can actually be regenerated.
Replace Jest with Vitest across the workspace. The brain and helm Angular suites
now run in a real browser (Playwright/Chromium via Vitest browser mode) so they
exercise real layout, focus, pointer events and computed styles that jsdom could
not. The cli, tools, mcp, registry and cli-smoke suites run on Vitest's node
environment.
- Add per-project vite configs and switch test targets to @nx/vitest:test
- Convert jest APIs to vi.* and jest module mocks to vi.mock with importOriginal
- Replace jest-axe with a browser-native axe-core helper and toHaveNoViolations
- Regenerate snapshots in vitest format (content unchanged, format-only)
- Remove all jest packages, configs, the preset and the @nx/jest target default
- Install Playwright Chromium in the CI unit job for the browser suites
Also fixes a brain avatar test that asserted inside a fire-and-forget setTimeout,
which passed vacuously under jsdom and only surfaced once a real browser loaded
the image.
spartan/ui is now Tailwind CSS v4 only. The v3 compatibility layer added
complexity across the brain preset, the CLI generators and the docs, all of
which is removed here.
Brain:
- Delete the v3 JavaScript preset (hlm-tailwind-preset.js) and its package
export; the v4 CSS preset (hlm-tailwind-preset.css) is now the only preset.
- Bump the tailwindcss peer dependency to >=4.0.0 and declare tw-animate-css
as a peer, since it is imported by the CSS preset.
CLI:
- Remove Tailwind version detection and the v3 confirmation prompt; the theme
generator always emits the v4 stylesheet (preset import plus OKLCH theme).
- Drop the legacy HSL theme table, the v3-only CDK overlay import branch, the
vestigial addCdkStyles option and the unused registryItemTailwindSchema.
Docs and tooling:
- Remove the Tailwind v3 installation and theming sections and snippets.
- Drop autoprefixer; Tailwind v4 handles vendor prefixing via @tailwindcss/postcss.
BREAKING CHANGE: Tailwind CSS v3 is no longer supported. The
@spartan-ng/brain/hlm-tailwind-preset (JS) package export has been removed; use
the @spartan-ng/brain/hlm-tailwind-preset.css preset with Tailwind CSS v4. The
tailwindcss peer dependency now requires >=4.0.0.
Scaffolds real nx (monorepo + standalone) and angular-cli workspaces from the
locally published CLI, runs the generators, runs healthcheck, consumes a
generated component, and builds - covering library/entrypoint x
buildable/non-buildable plus an all-components cell. Runs each cell on its own
runner via a dedicated workflow with a required result check, and stays cheap on
unrelated PRs via a git-diff gate and an in-runner affected check. Adds a
`pnpm smoke` convenience script.
embla-carousel is needed so the carousel component can import its option/event/plugin types from the
base package; verdaccio backs the cli-smoke local registry.
* feat(mcp): release and version mcp server alongside cli and brain
Wire the MCP server package into the release pipeline so it is published
and version-synced with the cli and brain packages. Add a
replace-mcp-version generator (invoked by auto-increment-version for
nightly and prepare-manual-release for manual), a release-mcp script,
and sync the package to the current alpha version.
Also drop the orphan scope:core tag from release-ui and list mcp in the
PR template's affected-packages section.
* refactor: document release schemas and harden version error handling
Fill in the empty titles and descriptions on the release generator and
executor schemas, and declare the newVersion option so the version
generators are self-documenting and CLI-invocable.
Make the version generators throw with actionable messages instead of
silently logging and returning, validate the brain version format in
auto-increment-version, and fix the misleading source-of-truth message
in replace-ui-version.
* fix: prevent shell injection in npm publish and correct version flag hints
Validate the TAG dist-tag and publish via execFileSync with an argument
array instead of interpolating it into a shell string, removing a
shell-injection vector in the npm-publish executor.
Correct the version generators' error messages to reference the actual
--newVersion / --new-version flag rather than the reserved --version.
* feat(repo)!: upgrade nx to 22 and angular to 21
Upgrade the workspace to Nx 22.7.5 and Angular 21.2.16, and widen the
published peer dependency ranges to support Angular 21 and 22 while
dropping Angular 20.
- nx and @nx/* to 22.7.5; @angular/* to 21.2.16 (framework) and 21.2.14
(cli, build, devkit, cdk, ssr)
- brain, helm and trpc @angular/* peers to ">=21.0.0 <23.0.0"; the helm
embla-carousel-angular peer uses the same range
- @spartan-ng/cli minimums raised to >=21 and @schematics/angular to
21.2.14; the private tools lib aligned to nx 22 / angular 21
- analog 2.6.0, ng-packagr 21, angular-eslint 21, storybook 10, jest 30,
@testing-library/angular 19 and related tooling
- replace the calendar select host-listener $event with a typed output
subscription; constrain the ai-chat-link directive to anchors
- drive the menubar e2e arrow keys via native keydown and disable
Chromium throttling; hold cypress at 14 (15 breaks realPress specs)
BREAKING CHANGE: Angular 20 is no longer supported. spartan/ui now
supports Angular 21 and 22.
* ci: lower unit test parallelism to fit the runner memory
The docs app's vitest + Analog suite peaks at a few GB; running it
alongside two other test projects under --parallel=3 exhausted the
GitHub runner memory and the worker was OOM-killed with no output.
Run at most two test projects concurrently.
* fix(trpc): drop invalid environment providers from the test env module
The Nx 22 migration wrapped provideZoneChangeDetection() in an @NgModule,
but EnvironmentProviders are not valid in @NgModule providers and Angular
21 throws NG0207 at runtime. Restore the plain initTestEnvironment setup
(matching the docs app); the explicit zone provider is unnecessary.
* ci: run the docs app test suite in isolation
Bundling the docs app's vitest + Analog suite into the parallel test run
made it fail in CI while it passes on its own, and the interleaved output
hid the cause. Run the other projects in parallel, then the docs app as a
separate step.
* fix(nx): point test cache inputs at the real jest preset file
The test targets' cache inputs referenced jest.preset.js, but the
workspace preset is jest.preset.cjs, so the input never matched and a
preset change would not invalidate the cache. Fix both the
@nx/vitest:test target (added by the Nx 22 migration) and the existing
@nx/jest:jest target.
* ci: log exit code and retry the docs app test suite once
The docs app's vitest + Analog suite intermittently crashes in CI right
after loading Angular's testing modules, with no error output. Log the
exit code to classify the crash (128+signal indicates a native crash)
and retry once so a flaky crash does not fail the run while the root
cause is investigated.
* ci: clarify docs app test retry after pinpointing the flaky crash
The crash is in app.spec.ts: booting the full app shell (Header/Footer
and their deep import graph) intermittently crashes the vitest worker
during the Analog transform in CI (exit 1, no output, not reproducible
locally). It happens before any test runs, so a vitest per-test retry
cannot help; re-running the suite once does.
* chore(repo): hold analog at 2.1.3 and drop unit-test ci workarounds
Analog 2.6.0 intermittently crashed the docs app's vitest worker in CI
(a flaky transform of the app shell), so keep analog at the nx-migration's
tested 2.1.3, revert the marked bumps that 2.6.0 required, and restore the
ai-chat-link directive selector. Also restore the original unit test ci
step, dropping the parallel, isolation and retry workarounds added while
chasing that crash.
Make @spartan-ng/mcp publishable and runnable as an MCP server:
- align package metadata, bin, and publishConfig, and add a release target
- bump zod to ^3.25 so it satisfies the MCP SDK peer range, without which
the server fails to start
- route cache and warmup logging to stderr so it never corrupts the stdio
JSON-RPC channel
- validate cache keys to prevent path traversal and default the cache to a
writable user directory
- fix component example rendering, meta tool ids, language detection, and
peer-dependency analysis
- add unit tests and a documentation page for the MCP server
Adds a button on each runnable docs example that boots a real, runnable
Angular CLI project on StackBlitz, with helm source vendored from the existing
generated pipeline so it stays in sync.
- generate-hlm-component-preview captures the exact CLI output (libs/ui, deps,
tsconfig paths) and version/preset metadata; all @angular packages pinned to a
single consistent major; example-only deps (tanstack, luxon, ngx-scrollbar,
embla autoplay, extra ng-icon sets) added explicitly
- generate-primitive-snippets bundles sibling files of multi-file examples
(e.g. data-table) and rewrites back-references to the entry
- client-side builder assembles the project, drops mismatched Angular ranges,
rewrites /assets URLs to the live docs origin, and bundles siblings
- docs-internal examples (RTL) are excluded as not self-contained
- fix data-table flexRenderComponent calls that only failed under strict AOT
useStorage was the wrong tool.
they are available in our public assets.
they are not bundled in our js files.
we load our json files during ssr with a fetch call.
this avoids bundler running out of ram.
this still lets us use their data during pre-rendering / ssr
* feat(sonner): add brain sonner entry
* feat(sonner): remove ngx-sonner and use @spartan-ng/brain/sonner
* docs(sonner): add brain api section
* fix(sonner): vanishing of custom icons
* feat(sonner): add toaster spec and update snapshot
* fix(sonner): filter toasts/heights by position in toast to expand toasts grouped by position
* feat(sonner): add sonner toaster config
* feat(sonner): use Directionality for dir, use afterNextRender and DOCUMENT for window access
* remove dir prop
* feat(sonner): update modifiers and type imports
* feat(sonner): update snapshot
* feat(sonner): add sonner healthcheck and migration to migrate ngx-sonner
* fix(sonner): update healthcheck guard
* feat(sonner): copy to helm
* fix(sonner): update comment
* fix(sonner): replace comment
* fix(sonner): update migration test message
* feat(sonner): replace all in migration
* feat(sonner): use injected document, update comments
* feat(sonner): use clsx
* feat(sonner): use computed for classes
* docs(sonner): update about
* docs(sonner): add types example
* docs(sonner): add position and description example
* chore: update ngx-sonner
* docs(sonner): add note to add to root component
* feat(sonner): update signal boolean and number inputs
* docs(sonner): fix review suggestions
* docs: remove form soon component
* docs: rename components page selector and page
* chore: remove unused ng-signal-forms
* docs: add reactive forms page and demo
* docs: add exact to link, mark forms as new
* docs: use signal input and resource for code block
* docs: add form and reset section
* docs: add validation and displaying error section
* feat(select): add select separator
* docs: add different input field types demos
* docs: revert code block signals
* docs: center form text
* docs: replace wip badge w/ text, as the badge is not aligned correctly to the text
* docs: add docsearch to header
# Conflicts:
# pnpm-lock.yaml
* docs: update hit active color in dark theme
* docs(command): trigger command dialog on ⌘ + Shift + P to avoid conflict with docsearch
- future proof glob pattern for style guide changes
- identify required inputs
- moved models to input/output
- simplified ui docs test with snapshot
- ensure snapshot test considers only critical properties of api metadata