Skip to content

Chore/upgrade angular#34

Merged
hardsoncore merged 18 commits into
masterfrom
chore/upgrade-angular
Jun 28, 2026
Merged

Chore/upgrade angular#34
hardsoncore merged 18 commits into
masterfrom
chore/upgrade-angular

Conversation

@hardsoncore

Copy link
Copy Markdown
Owner

This pull request performs a major upgrade of the project from Angular 13 to Angular 22, modernizes dependencies, migrates to the new standalone Angular API, and removes legacy configuration and end-to-end (E2E) testing setup based on Protractor. It also updates linting configuration to use the latest eslint and angular-eslint packages with a flat config, and refactors modules and components to use the new Angular best practices.

The most important changes are:

Angular Upgrade and Standalone Migration

  • Upgraded all Angular, Ionic, Capacitor, and related dependencies to their latest major versions (Angular 22, Ionic 8, Capacitor 8, RxJS 7, etc.) in package.json.
  • Refactored the application to use Angular standalone APIs: removed AppModule, migrated routing to app.routes.ts, updated AppComponent and other components to use standalone imports and providers, and set change detection to eager where appropriate. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Linting and Configuration Modernization

  • Removed .eslintrc.json and replaced it with a new flat eslint.config.js using the latest eslint, typescript-eslint, and angular-eslint packages and conventions. [1] [2]
  • Deleted .browserslistrc as it is no longer needed with the new Angular build system.

Removal of Legacy E2E Testing (Protractor)

  • Removed Protractor-based E2E testing: deleted e2e/protractor.conf.js, e2e/tsconfig.json, E2E test files, and the related e2e configuration from angular.json and package.json. [1] [2] [3] [4] [5] [6]

Angular Project Configuration Updates

  • Updated angular.json to reflect new builder options (browserTargetbuildTarget), removed E2E configuration, and added new schematic and collection settings for Angular 22. [1] [2] [3] [4]

Template Syntax and Accessibility Improvements

  • Updated template syntax to use Angular 16+ control flow (@if) and improved accessibility by adding alt attributes to images. [1] [2]

These changes collectively modernize the codebase, improve maintainability, and align the project with current Angular and ecosystem best practices.

hardsoncore and others added 16 commits June 20, 2026 07:59
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…r Ionic types)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- replace deprecated baseUrl with paths mapping (TS 6.0)
- pin strict:false to preserve project's original compiler behavior
- v22 inject() and safe-navigation migrations

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Native android/ project migration still required locally via
'npx cap migrate' with JDK 21 + Android SDK before building the APK.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- migrate ESLint to flat config (angular-eslint v22, eslint v10, typescript-eslint v8)
- remove dead Protractor e2e setup and orphan tslint.json
- bump @types/node, @types/jasmine, jasmine-core, karma

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- zone.js/dist/zone-testing -> zone.js/testing (new export path)
- provide ActivatedRoute/Router/HttpClient in page specs that inject them

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Drop legacy @angular-eslint/@typescript-eslint v13/v5 + eslint v7 and the
old .eslintrc.json; switch to angular-eslint v22 / eslint v10 flat config.
Remaining package.json/angular.json changes from the tooling modernization.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…bootstrap

- migrate to inject() (ng g @angular/core:inject)
- migrate components to standalone (ng g @angular/core:standalone)
- bootstrap via bootstrapApplication() instead of NgModule bootstrap
  (standalone root component cannot be bootstrapped from @NgModule.bootstrap);
  move AppModule/AppRoutingModule providers into main.ts, add app.routes.ts
- disable prefer-on-push rule (app intentionally uses default change detection)
- type previously 'any' params/fields, drop empty constructors/lifecycle hooks,
  remove unused imports, add img alt text, fix useless escape
- update TestBed specs for standalone components (provideRouter/provideHttpClient)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 28, 2026 09:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR upgrades the app’s Angular/Ionic/Capacitor stack (Angular 13 → 22) and modernizes project configuration, including a migration toward standalone-style Angular APIs, updated linting (ESLint flat config), and removal of the legacy Protractor E2E setup.

Changes:

  • Upgraded core dependencies and tooling (Angular/Ionic/Capacitor/RxJS/TypeScript/ESLint) and updated Angular workspace configuration.
  • Refactored app bootstrapping and routing toward standalone-era patterns, plus template updates to Angular control-flow syntax (@if, @for).
  • Removed Protractor E2E infrastructure and legacy lint/build configuration files.

Reviewed changes

Copilot reviewed 55 out of 57 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
tslint.json Removes legacy TSLint configuration.
tsconfig.spec.json Updates test TS config; adds Angular compiler diagnostics suppressions.
tsconfig.json Updates TS compiler options and path aliases.
tsconfig.app.json Updates app TS config; adds Angular compiler diagnostics suppressions.
src/zone-flags.ts Tightens typing for Zone flag on window.
src/test.ts Updates Zone testing import and removes legacy require.context loading.
src/polyfills.ts Updates Zone import to modern entrypoint.
src/main.ts Switches to bootstrapApplication and provider-based setup (standalone-era bootstrap).
src/assets/content/rus/answers/122-Directives-in-Angular-Structural-vs-Attribute.md Adds a new RU answer article using the app’s HTML-based markup conventions.
src/app/tabs/tabs.page.ts Refactors Tabs page toward standalone component style.
src/app/tabs/tabs.page.spec.ts Updates TabsPage test setup for standalone import + router provider.
src/app/tabs/tabs.module.ts Adjusts module to import the page (standalone-era pattern).
src/app/services/streak.service.ts Minor typing cleanup; improves corrupted storage handling comment.
src/app/services/results.service.ts Refactors DI to inject() + subject typing cleanup.
src/app/services/questions.service.ts Refactors DI to inject() + subject typing cleanup.
src/app/services/profile.service.ts Removes empty constructor.
src/app/services/app.service.ts Removes empty constructor; tightens navigator.userLanguage typing.
src/app/quiz/subpages/answer-structure/answer-structure.page.ts Refactors page toward standalone component style and inject() DI.
src/app/quiz/subpages/answer-structure/answer-structure.page.spec.ts Updates AnswerStructurePage test setup for standalone import + router provider.
src/app/quiz/subpages/answer-structure/answer-structure.page.html Migrates template to @for control-flow syntax and adjusts formatting.
src/app/quiz/subpages/answer-structure/answer-structure.module.ts Adjusts module to import the page (standalone-era pattern).
src/app/quiz/quiz.page.ts Refactors page toward standalone component style, inject() DI, and better event typing.
src/app/quiz/quiz.page.spec.ts Updates QuizPage test setup for standalone import + router provider.
src/app/quiz/quiz.page.scss Updates header layout styles and responsive behavior.
src/app/quiz/quiz.page.html Migrates template to @if/@for control-flow syntax and tweaks header markup.
src/app/quiz/quiz.module.ts Adjusts module to import the page (standalone-era pattern).
src/app/questions/subpages/question-info/question-info.page.ts Refactors page toward standalone component style + inject() DI; minor text fix.
src/app/questions/subpages/question-info/question-info.page.spec.ts Updates QuestionInfoPage test setup (router + http providers).
src/app/questions/subpages/question-info/question-info.page.html Migrates template to @if control-flow syntax and updates innerHTML binding.
src/app/questions/subpages/question-info/question-info.module.ts Adjusts module to import the page (standalone-era pattern).
src/app/questions/questions.page.ts Refactors page toward standalone component style + inject() DI; improves input typing.
src/app/questions/questions.page.spec.ts Updates QuestionsPage test setup for standalone import.
src/app/questions/questions.page.html Migrates template to @if/@for control-flow syntax.
src/app/questions/questions.module.ts Adjusts module to import the page (standalone-era pattern).
src/app/profile/profile.page.ts Refactors page toward standalone component style + inject() DI; timer typing cleanup.
src/app/profile/profile.page.spec.ts Updates ProfilePage test setup for standalone import.
src/app/profile/profile.page.scss Updates Ionic 8 styling via ::part and item border overrides.
src/app/profile/profile.page.html Improves accessibility (alt) and migrates some *ngIf to @if; updates ion-select labeling.
src/app/profile/profile.module.ts Adjusts module to import the page (standalone-era pattern).
src/app/explore-container/explore-container.module.ts Adjusts module to import the component (standalone-era pattern).
src/app/explore-container/explore-container.component.ts Refactors component class and change detection setup.
src/app/explore-container/explore-container.component.spec.ts Updates component test setup for standalone import.
src/app/app.routes.ts Adds standalone-style route configuration.
src/app/app.module.ts Removes legacy AppModule.
src/app/app.component.ts Refactors root component toward standalone component style + inject() DI.
src/app/app.component.spec.ts Updates AppComponent test setup for standalone import + router provider.
src/app/app-routing.module.ts Removes legacy routing module in favor of app.routes.ts.
package.json Major dependency/tooling upgrades; removes Protractor.
eslint.config.js Introduces ESLint flat config using typescript-eslint + angular-eslint.
e2e/tsconfig.json Removes Protractor E2E TS config.
e2e/src/app.po.ts Removes Protractor page object.
e2e/src/app.e2e-spec.ts Removes Protractor E2E spec.
e2e/protractor.conf.js Removes Protractor configuration.
angular.json Updates Angular workspace config; removes e2e target; updates builder option names.
.eslintrc.json Removes legacy ESLint config file.
.browserslistrc Removes legacy Browserslist config file.

Comment thread src/app/tabs/tabs.page.ts
Comment thread src/app/app.component.ts
Comment thread src/app/explore-container/explore-container.component.ts
Comment thread src/app/quiz/quiz.page.ts
Comment thread src/app/questions/questions.page.ts
Comment thread src/app/profile/profile.page.ts
Comment thread src/app/quiz/subpages/answer-structure/answer-structure.page.ts
Comment thread src/app/questions/subpages/question-info/question-info.page.ts
Comment thread src/app/questions/subpages/question-info/question-info.page.html Outdated
Comment thread src/main.ts
hardsoncore and others added 2 commits June 28, 2026 12:10
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@hardsoncore hardsoncore merged commit dffde4a into master Jun 28, 2026
2 checks passed
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.

2 participants