Commit Graph

30 Commits

Author SHA1 Message Date
Ashley Hunter 1b743f8019 test: migrate from jest to vitest with browser testing for brain/helm
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.
2026-06-13 15:16:45 +01:00
Ashley Hunter d4da582d40 feat(repo)!: upgrade nx to 22 and angular to 21 (#1430)
* 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.
2026-06-08 22:23:45 +02:00
Marc Stammerjohann 423ac997ce chore: improve seo and update repo links (#1045)
* chore: update seo urls

* chore: update repo link

* chore: update robots sitemap link
2025-11-27 17:12:48 +01:00
moosme 51a579aa36 feat(repo): nx upgrade (#1002)
* feat(repo): nx upgrade

* fix: sidebar

* fix: node version

* fix: relax dependency versions

* fix: remove naming conventions

* fix: format

* fix: remove chromatic

---------

Co-authored-by: Merlin <merlin.moos@oldendorff.com>
2025-11-20 10:14:26 +01:00
robingotz 222b9bd81d fix: downgrade ng-icon & resolve version conflicts 2025-11-05 22:33:58 +01:00
Ashley Hunter 9b654631cc build: nx version updates (#672) 2025-04-27 12:54:23 +02:00
Ashley Hunter 2a8c5d1eef feat: angular 19 (#612) 2025-03-17 22:58:33 +01:00
Ashley Hunter 5313d244ec build: rxjs 6 support (#525)
* build: rxjs 6 support lint rule

* build: rxjs 6 support

* build: rxjs 6 support
2024-12-11 16:00:32 +01:00
Ashley Hunter c0dc56b79e build: migrate avatar, accordion and label to secondary entrypoints (#514)
* build: migrate avatar, accordion and label to secondary entrypoints

* build: fix storybook build

* build: adding prettier json plugin

* build: remove merge conflicts

* build: correcting prettier plugin order

* build: correcting prettier plugin order
2024-12-09 22:22:48 +01:00
Ashley Hunter fa8785183e build: moving to pnpm, eslint and prettier (#483) 2024-11-20 22:19:10 -05:00
Ben Snyder f40e1346d0 chore: formatting and lint improvements for oxlint and biomejs (#382) 2024-09-23 22:45:09 -04:00
Ben Snyder d1cd6fb89f chore: update to Nx 19.6.5 and Analog 1.7.3 (#380)
* chore: update to Nx 19.6.5

* chore: maintenance update for biomejs, bun, and ci runs

* chore: maintenance update for biomejs, bun, and ci runs
2024-09-23 17:19:13 -04:00
Ben Snyder 8f333ee1fe feat(repo): oxlint lightning-fast linter with more code quality, correctness and performance checks (#270)
* fix(repo): require pnpm v9 with engineStrict set

* fix: bump node version to v20 LTS

* fix(repo): apply formatting and importing sorting required for CI to pass

* feat(repo): oxlint lightning-fast linter with more code quality, correctness and performance checks

---------

Co-authored-by: Robin Goetz <35136007+goetzrobin@users.noreply.github.com>
2024-04-24 15:16:51 +02:00
Ben Snyder e0db372285 fix(repo): upgrade and fix continuous integration (#269)
* fix(repo): require pnpm v9 with engineStrict set

* fix: bump node version to v20 LTS

* fix(repo): apply formatting and importing sorting required for CI to pass
2024-04-24 15:11:22 +02:00
robingotz 1b8f750856 chore: release cli 0.0.1-alpha.349 & ui 0.0.1-alpha.347 2024-04-23 21:13:17 +02:00
robingotz e56508ca29 fix(repo): upgrade dependencies, format files, fix cypress.config.cjs 2024-04-23 20:44:33 +02:00
Ben Snyder fbf92e3999 feat(nx): convert to eslint flat config (#265)
* feat(nx): convert to eslint flat config

* fix(nx): use .cjs extensions for flat config to work

---------

Co-authored-by: Robin Goetz <35136007+goetzrobin@users.noreply.github.com>
2024-04-23 20:00:13 +02:00
Ben Snyder 694e0e442c feat(repo): update vite to 5.2.x, @analogjs/* to 1.2.x, and update various supporting packages (#264)
* feat(nx): upgrade nx to version 18.3.3

* feat(repo): update vite to 5.2.x, @analogjs/* to 1.2.x, and update various supporting packages

* feat(repo): adjust tsconfig to use @spartan-ng/app/* over ~/*
2024-04-23 19:58:33 +02:00
robingotz 078e067772 chore: upgrade workspace to newest nx & testing dependencies to allow signal input testing 2024-03-06 17:49:30 +01:00
robingotz 1d3a5ded34 chore: upgrade to latest versions 2024-01-29 22:27:31 +01:00
robingotz 83187649e0 fix: fix trpc paths pt.2 2024-01-02 21:10:00 +01:00
robingotz 9c9d899787 fix: fix trpc paths 2024-01-02 20:08:51 +01:00
Brandon Roberts 3bf859cafa feat(trpc): add trpc lib and e2e test suite (#94) 2024-01-02 17:09:54 +01:00
Robin Goetz cdcb6c4e94 refactor: remove trpc client and use analogjs client instead 2023-05-12 19:11:25 -04:00
Robin Goetz 0e1b58772f chore: upgrade nx and angular to v16 2023-05-12 19:04:58 -04:00
Robin Goetz c1dc08eaa1 feat: add transferstate to cache initial trpc requests when app has not stabilized yet 2023-04-20 09:52:25 -04:00
Robin Goetz 535c8619cf feat: add guide for local supabase setup, fix analog versions, consolidate libs into one, fix vite isomorphic-fetch issue 2023-04-14 09:56:08 -04:00
Robin Goetz 4821a75658 feat: add angular client lib, update to v16.0.0-rc.0, set up prettier, improve nx setup 2023-04-13 16:17:35 -04:00
Robin Goetz 8ad68b8f19 feat: update readme and rename project to spartan 2023-04-06 09:02:22 -04:00
Robin Goetz 8baae1f176 feat: move trpc server side code to own lib 2023-04-05 14:54:25 -04:00