-
Notifications
You must be signed in to change notification settings - Fork 2
fix: Upgrade to angular v20 #1415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
874939a
fix: update Angular to v20
knagurski efeb32b
chore: add CLAUDE.md file
knagurski 2ea339d
chore: remove unneeded deps
knagurski 5bf228a
chore: update husky
knagurski 1ca1dc1
fix: restore dashboard configuration for standalone bootstrap
knagurski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1 @@ | ||
| #!/bin/sh | ||
| . "$(dirname "$0")/_/husky.sh" | ||
|
|
||
| npx --no-install commitlint --edit $1 | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1 @@ | ||
| #!/bin/sh | ||
| . "$(dirname "$0")/_/husky.sh" | ||
|
|
||
| npx --no-install pretty-quick --staged |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1 @@ | ||
| #!/bin/sh | ||
| . "$(dirname "$0")/_/husky.sh" | ||
|
|
||
| npm run test:ci |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| # CLAUDE.md | ||
|
|
||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||
|
|
||
| ## Project Overview | ||
|
|
||
| Hyperdash Angular (`@hypertrace/hyperdash-angular`) is an Angular library providing dashboard runtime capabilities. It wraps the core `@hypertrace/hyperdash` library with Angular services, components, and directives. | ||
|
|
||
| **Structure**: Monorepo with a publishable library (`projects/hyperdash-angular/`) and demo app (`src/`). | ||
|
|
||
| ## Common Commands | ||
|
|
||
| ```bash | ||
| # Development | ||
| npm start # Dev server at localhost:4200 | ||
| npm run build # Build app and library | ||
|
|
||
| # Testing | ||
| npm test # Run tests (watch mode) | ||
| npm run test:ci:lib # Library tests only (CI mode) | ||
| npm run test:ci:app # App tests only (CI mode) | ||
| npm run test:ci # Full CI suite (lint + all tests) | ||
|
|
||
| # Code Quality | ||
| npm run lint # Run ESLint | ||
| npm run commit # Interactive conventional commit (commitizen) | ||
| ``` | ||
|
|
||
| ## Architecture | ||
|
|
||
| ### Injectable Wrappers Pattern | ||
|
|
||
| Core `@hypertrace/hyperdash` classes are wrapped as Angular injectable services following the pattern `[ClassName]Service`: | ||
|
|
||
| - `DashboardManagerService`, `ModelManagerService`, `ThemeManagerService`, etc. | ||
| - Always use the service wrapper (e.g., `DashboardManagerService`) rather than the core class directly. | ||
|
|
||
| ### Module System | ||
|
|
||
| - `DashboardCoreModule`: Main runtime module with default property types and deserializers | ||
| - `DashboardCoreModule.with(metadata)`: Extend with custom types, models, renderers, editors, deserializers | ||
| - `DashboardEditorModule`: Separate module for editing capabilities | ||
|
|
||
| ### Key Injection Tokens | ||
|
|
||
| - `MODEL_PROPERTY_TYPES`: Register custom property types | ||
| - `DASHBOARD_DESERIALIZERS`: Register custom deserializers | ||
|
|
||
| ### Rendering | ||
|
|
||
| - `DashboardComponent` (`<hda-dashboard>`): Main rendering component | ||
| - `DashboardModelDirective` (`hdaDashboardModel`): Injects models into template context | ||
| - `ThemePropertyPipe`: Theme-aware property rendering | ||
|
|
||
| ## Code Conventions | ||
|
|
||
| ### Selectors | ||
|
|
||
| - **Library components**: `hda-*` prefix (kebab-case) | ||
| - **Library directives**: `hda*` prefix (camelCase) | ||
| - **App components**: `app-*` prefix | ||
|
|
||
| ### TypeScript | ||
|
|
||
| - Strict mode enabled with `noUnusedLocals`, `noUnusedParameters`, `strictNullChecks` | ||
| - Explicit access modifiers required (public/private/protected) | ||
| - No `any` types allowed | ||
| - Parameter properties preferred: `constructor(private readonly service: Service)` | ||
|
|
||
| ### Testing | ||
|
|
||
| - Jest with `@ngneat/spectator` for component testing | ||
| - Test files: `*.test.ts` or `*.spec.ts` | ||
| - Coverage excludes: `*.module.ts`, `public_api.ts`, `test/` directory | ||
|
|
||
| ### Commits | ||
|
|
||
| - Conventional commits required (enforced via commitlint) | ||
| - Use `npm run commit` for interactive commit wizard | ||
| - Pre-commit hook runs Prettier on staged files | ||
|
|
||
| ## ESLint Rules of Note | ||
|
|
||
| - Max 500 lines per file | ||
| - Template conditional complexity: max 4 | ||
| - Template cyclomatic complexity: max 5 | ||
| - No inline templates > 10 lines | ||
| - Arrow functions: `as-needed` body style | ||
| - Prefer template literals over string concatenation |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Husky no longer requires this stuff