Skip to content
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

update to angular v18 #2739

Merged
merged 4 commits into from
Dec 15, 2024
Merged

update to angular v18 #2739

merged 4 commits into from
Dec 15, 2024

Conversation

imolorhe
Copy link
Collaborator

@imolorhe imolorhe commented Dec 15, 2024

Fixes

Checks

  • Ran yarn test-build
  • Updated relevant documentations
  • Updated matching config options in altair-static

Changes proposed in this pull request:

Summary by Sourcery

Upgrade the project to Angular version 18 and refactor test setups to use 'provideHttpClient' with interceptors from DI. Update the Angular CLI configuration to use 'pnpm' as the package manager.

Enhancements:

  • Update Angular dependencies to version 18 across the project.
  • Refactor test setup to use 'provideHttpClient' with interceptors from DI.

Build:

  • Add 'pnpm' as the package manager in the Angular CLI configuration.

Copy link

sourcery-ai bot commented Dec 15, 2024

Reviewer's Guide by Sourcery

This PR updates the Angular framework from version 17 to version 18.2.13, along with related dependencies. The implementation includes necessary code adjustments to accommodate Angular's new HTTP client provider pattern and general cleanup of module configurations.

Class diagram for updated Angular module configuration

classDiagram
    class AltairModule {
        +AltairComponent[] bootstrap
        +CUSTOM_ELEMENTS_SCHEMA[] schemas
        +AltairComponent[] exports
        +providers[]
        +constructor()
    }
    class AltairComponent
    class WindowComponent
    class BrowserModule
    class BrowserAnimationsModule
    class FormsModule
    class ReactiveFormsModule
    class SharedModule {
        +forRoot()
    }
    class ComponentModule
    class DocViewerModule
    class provideHttpClient {
        +withInterceptorsFromDi()
    }
    AltairModule --> AltairComponent
    AltairModule --> WindowComponent
    AltairModule --> BrowserModule
    AltairModule --> BrowserAnimationsModule
    AltairModule --> FormsModule
    AltairModule --> ReactiveFormsModule
    AltairModule --> SharedModule
    AltairModule --> ComponentModule
    AltairModule --> DocViewerModule
    AltairModule --> provideHttpClient
Loading

File-Level Changes

Change Details Files
Updated Angular core and related packages from v17 to v18.2.13
  • Updated @angular/core and related packages to version 18.2.13
  • Updated @angular/cli to version 18.2.12
  • Updated @angular-devkit/build-angular to version 18.2.12
  • Updated zone.js to version 0.14.10
  • Updated typescript to version 5.5.4
packages/altair-app/package.json
Migrated to new Angular HTTP client provider pattern
  • Removed HttpClientModule imports
  • Added provideHttpClient with interceptors using withInterceptorsFromDi()
  • Restructured provider arrays in testing modules
packages/altair-app/src/app/modules/altair/altair.module.ts
packages/altair-app/src/app/modules/altair/components/settings-dialog/settings-dialog.component.spec.ts
packages/altair-app/src/app/modules/altair/components/plugin-manager/plugin-manager.component.spec.ts
packages/altair-app/src/app/modules/altair/services/pre-request/pre-request.service.spec.ts
packages/altair-app/src/app/modules/altair/services/window.service.spec.ts
Updated Angular configuration and formatting
  • Added pnpm as package manager in angular.json
  • Reorganized NgModule metadata ordering
  • Updated test configuration with teardown options
packages/altair-app/angular.json
packages/altair-app/src/app/modules/altair/altair.module.ts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @imolorhe - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Please complete the PR checklist to confirm that tests have been run and documentation has been updated.
  • For a major Angular version upgrade (17 -> 18), please document any breaking changes and required migration steps in the PR description.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link

github-actions bot commented Dec 15, 2024

Visit the preview URL for this PR (updated for commit 8168e54):

https://altair-gql--pr2739-imolorhe-update-angu-p6aqweh3.web.app

(expires Sun, 22 Dec 2024 00:40:19 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 02d6323d75a99e532a38922862e269d63351a6cf

@imolorhe imolorhe added this pull request to the merge queue Dec 15, 2024
Merged via the queue into master with commit 9a761c6 Dec 15, 2024
15 checks passed
@imolorhe imolorhe deleted the imolorhe/update-angular-v18 branch December 15, 2024 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant