Commit Graph

15 Commits

Author SHA1 Message Date
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
robingotz 214f4e6e4c fix: use raw version for spartan/brain dependency & fix version inconsistencies 2025-11-04 23:39:48 +01:00
Sammy Mohamed d826874baa feat: ui primitive api autodocs (#464)
* feat: ui api autodocs executor

- adds api page sections
- page navigation links
2025-05-12 21:34:15 -04: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 fee205ece3 feat: helm generators (#604)
* feat: adding helm generators

fix: typo

fix: finish documentation generator

fix: review feedback

fix: format

fix: directive template

fix: directive selector

fix: story component name

fix: typo

fix: schema

fix: schema update

feat: additional generators

fix: bug with component generator

* fix: tests
2025-02-20 06:20:48 +01:00
Robin Goetz cd6e903c04 build: setup nightly release (#524)
* chore: lint and cleanup of touched files

* build: add executor to replace version for ui libs

this executor finds all package.json in the libs/ui directory
and replaces the current version
of @spartan-ng with the one defined in UI_VERSION

* build: update cli files to reflect new versions and add scripts to make publishing easier

* chore: fix linting errors

* build: update semantic release config

* build: use same VERSION env var for ui and cli

* fix: remove confusing comment

* fix: add regex only updating spartan specific versions

and a unit test to make sure we don't accidentally mess with other packages

* fix: remove .DS_Store files and filter helm packages to not add them to package.json

* chore: remove unused script

* chore: add generator that auto-increments current version of released assets

* chore: add scripts for nightly release

* chore: add nightly release workflow

* fix: add missing dash

* chore: try on push for testing

* build: auto fix version number in tools

* ci: set up automatic release and committing of changed files

* ci: give release step write permissions

* ci: check out branch correctly so we can commit it back

* ci: try to push to right place

* chore: reorder package.json

* fix: use newVersion to allow for auto increment script to work

* chore: update branch name

* fix: rename release scripts and interface and add missing generators

* chore: release cli & ui 0.0.1-alpha.379

* chore: fix name for trigger

* chore: try to push to origin nightly-release

* chore: nightly release 2024-12-10 ⚡

* chore: update tools version number

* chore: nightly release 2024-12-10 ⚡

* chore: update github flow to work on main and a schedule

* fix: add back lost test and start commands to package.json

* fix: fix tests and commit message to follow guidelines

* feat: adjust version replacement for new single brain package

* fix: use correct alpha version 381

* fix: add back storybook command to package.json

* fix: typo in @spartan-ng/brain version for pagination helm

* fix: remove tests that don't do anything and add formatting of files

---------

Co-authored-by: Leonidas <leonidas@spartan.ng>
2025-01-08 23:53:00 +01:00
Ashley Hunter be4a87dc87 refactor: migrating remaining brain libraries to secondary entrypoints (#523)
* refactor: migrating remaining brain libraries to secondary entrypoints

* refactor: migrating remaining brain libraries to secondary entrypoints
2024-12-10 18:40:46 +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 df8a0b28be feat: secondary entrypoint setup (#496)
* build: creating secondary entrypoint

* build: adding migration generators

* build: skipping install when running internally

* fix: project name bug

* fix: file movement

* fix: import renaming

* fix: migration generator

* build: adding peer dependency migration

* fix: migration

* fix: migration

* feat: migrating checkbox

* fix: version range

* fix: moving import map to ts file

* fix: correcting documentation

* fix: esm

* fix: esm

* fix: linting

* fix: linting

* fix: linting

* fix: linting

* fix: build
2024-12-05 14:18:48 +01:00
Ashley Hunter fa8785183e build: moving to pnpm, eslint and prettier (#483) 2024-11-20 22:19:10 -05:00
Chau Tran 3b6fd01ccb chore: formatting with new prettier configf (#54) 2023-11-17 13:30:50 -05:00
robingotz e7857256a6 fix: update dependency issues to resolve majority of nx plugin pains
this is a very big commit, but most of it is making sure the correct
peer dependencies are added.
2023-09-11 23:04:47 +02:00
robingotz 06b3d3853e feat: create tool that turns hlm libs into nx generators for @spartan-ng/nx
in the spirit of shadcn ui we want people to own their styles.
this is a first step that allows us to easily turn our internal
hlm directives, components, etc. into templates for nx an nx
generator. Which means that inside an nx workspace you will be
able to simply copy our styles into your own library.
2023-07-27 11:49:44 -04:00
robingotz d93e6527ea build: set up verdaccio and test with alpha version
move from nx to tools so we can use nx publicly.
using 10 because I used 1 already on npm and it complains.
learning a lot as I go here.
2023-07-24 10:21:13 -04:00