1
0
mirror of https://github.com/goharbor/harbor.git synced 2026-10-24 21:59:32 +03:00
Files
Ashish Patel 603c1d28cd Upgrade Harbor UI to Angular 21, Clarity v18, and Node.js v22
- Upgrade the Harbor UI (src/portal) from Angular 16 to Angular 19 and subsequently to Angular 21.
- Upgrade VMware Clarity from v17 to v18, and Node.js from v20 to v22 (updated .nvmrc, CI.yml, Makefile, Dockerfile).
- Migrate Angular templates to the new @if/@for control flow syntax.
- Fix UI issues #1 through #35, including robot accounts, layout, dropdown overlay, and input styling.
- Fix unit tests: resolve NG0100 ExpressionChangedAfterItHasBeenCheckedError in policy.component.spec.ts, replace autoDetectChanges(true) with explicit detectChanges cycles, and use TestBed.overrideComponent to stub AddP2pPolicyComponent template.
- Fix Clarity v18 breaking changes: update dark-theme SCSS import, add cds-theme attribute for theming, update ClrDatagridStateInterface import path, add ClrIconModule to app module.
- Stabilize npm installs and resolve CI/CD pipeline hangs.
- Fix swagger-ui crash caused by React 19 createRoot removal:
  - swagger-ui 5.28+ resolves a nested react-dom@19 which removed createRoot
    from the main react-dom entry point (moved to react-dom/client). The
    swagger-ui-es-bundle-core.js still imports createRoot from react-dom,
    making it undefined and causing "TypeError: i is not a function" at render.
  - app-swagger-ui/webpack.prod.js: alias bare 'swagger-ui' import to
    swagger-ui-bundle.js (the standalone UMD build that ships with React 18
    already bundled), bypassing the broken external react-dom@19 entirely.
  - app-swagger-ui/package.json: add npm overrides to pin react and
    react-dom to ^18.3.1 so future npm installs do not re-introduce React 19.
  - angular.json: expose swagger-ui.bundle.js and swagger-ui-index.html
    from app-swagger-ui/dist as Angular dev-server assets, enabling the
    proxy to serve the locally built, fixed bundle during development.
- Convert eslint-plugin-header config from JSON to JS to apply the ESLint 9 schema fix at config-load time, removing the need for patch-package.
- Pin all dependency versions to exact installed versions from the lock file, and remove unused prettier-eslint package.
- Fix flake in P2pProviderService unit test by initializing date with 0 milliseconds to prevent cross-second duration calculation mismatches.

Signed-off-by: Ashish Patel <zoom2ashish@gmail.com>
Co-authored-by: stonezdj <stone.zhang@broadcom.com>
2026-06-15 17:05:56 +08:00
..
2023-07-27 10:41:05 +08:00