mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-02-02 23:12:44 +00:00
refactor: update to node 22
refactor: remove deprecated "jetifier" refactor: base migration to Angular v18 fix: angular warning refactor: update capacitor to v6 refactor: update ngx-markdown to v18 refactor: update to ionic v8 refactor: remove deprecated @ionic-native/core (replaced by @awesome-cordova-plugins/core) fix: build fix: test feat: temporarily use external node image in ci feat: update to node 22 refactor: rebase fix: prettier depencencies ci: update android commandline tools fix: prettier package type ci: let pnpm handle build dependencies refactor: revert to pnpm 8, angular 17
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
e2e:
|
||||
image: registry.gitlab.com/openstapps/openstapps/app-cypress:node-18
|
||||
image: registry.gitlab.com/openstapps/openstapps/app-cypress:node-22
|
||||
stage: test
|
||||
script:
|
||||
- pnpm --filter=@openstapps/app install
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
rm coverage/integration-report-junit-*.xml
|
||||
rm coverage/integration-report-junit-*.xml || true
|
||||
|
||||
ng e2e --watch=false --headless=true --browser="$BROWSER"
|
||||
exit_code=$?
|
||||
|
||||
jrm coverage/integration-report-junit.xml coverage/integration-report-junit-*.xml
|
||||
rm coverage/integration-report-junit-*.xml
|
||||
jrm coverage/integration-report-junit.xml coverage/integration-report-junit-*.xml || true
|
||||
rm coverage/integration-report-junit-*.xml || true
|
||||
|
||||
exit $exit_code
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"Thea Schöbl <dev@theaninova.de>"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "pnpm check-icons && ng build --configuration=production",
|
||||
"build": "pnpm check-icons && ng build --configuration=production --stats-json",
|
||||
"build:android": "ionic capacitor build android --no-open && cd android && ./gradlew clean assemble && cd ..",
|
||||
"build:prod": "ng build --configuration=production",
|
||||
"changelog": "conventional-changelog -p angular -i src/assets/about/CHANGELOG.md -s -r 0",
|
||||
@@ -36,7 +36,6 @@
|
||||
"lint": "ng lint && stylelint \"**/*.scss\"",
|
||||
"lint:fix": "eslint --fix -c .eslintrc.json --ignore-path .eslintignore --ext .ts,.html src/ && stylelint --fix \"**/*.scss\"",
|
||||
"minify-icons": "node scripts/minify-icon-font.mjs",
|
||||
"postinstall": "jetify && echo \"skipping jetify in production mode\"",
|
||||
"preview": "http-server www/browser --p 8101 -o",
|
||||
"push": "git push && git push origin \"v$npm_package_version\"",
|
||||
"resources:ios": "capacitor-assets generate --ios --iconBackgroundColor $(grep -oE \"^@include ion-color\\(primary, #[a-fA-F0-9]{3,6}\" src/theme/colors.scss | grep -oE \"#[a-fA-F0-9]{3,6}\") --splashBackgroundColor $(grep -oE \"^@include ion-color\\(primary, #[a-fA-F0-9]{3,6}\" src/theme/colors.scss | grep -oE \"#[a-fA-F0-9]{3,6}\")",
|
||||
@@ -102,10 +101,11 @@
|
||||
"moment": "2.30.1",
|
||||
"ngx-date-fns": "11.0.0",
|
||||
"ngx-logger": "5.0.12",
|
||||
"ngx-markdown": "17.1.1",
|
||||
"ngx-markdown": "17.2.1",
|
||||
"ngx-moment": "6.0.2",
|
||||
"opening_hours": "3.8.0",
|
||||
"pmtiles": "3.0.3",
|
||||
"prettier": "3.1.1",
|
||||
"rxjs": "7.8.1",
|
||||
"semver": "7.6.0",
|
||||
"swiper": "8.4.5",
|
||||
@@ -147,12 +147,12 @@
|
||||
"@types/karma": "6.3.8",
|
||||
"@types/karma-coverage": "2.0.3",
|
||||
"@types/karma-jasmine": "4.0.5",
|
||||
"@types/node": "18.15.3",
|
||||
"@types/node": "22.15.31",
|
||||
"@types/semver": "7.5.8",
|
||||
"@typescript-eslint/eslint-plugin": "7.2.0",
|
||||
"@typescript-eslint/parser": "7.2.0",
|
||||
"cordova-res": "0.15.4",
|
||||
"cypress": "13.7.0",
|
||||
"cypress": "13.10.0",
|
||||
"eslint": "8.57.0",
|
||||
"eslint-plugin-jsdoc": "48.2.1",
|
||||
"eslint-plugin-prettier": "5.1.3",
|
||||
@@ -164,7 +164,6 @@
|
||||
"is-docker": "2.2.1",
|
||||
"jasmine-core": "5.1.2",
|
||||
"jasmine-spec-reporter": "7.0.0",
|
||||
"jetifier": "2.0.0",
|
||||
"junit-report-merger": "6.0.3",
|
||||
"karma": "6.4.3",
|
||||
"karma-chrome-launcher": "3.2.0",
|
||||
|
||||
@@ -21,7 +21,7 @@ import {ModalController, Platform} from '@ionic/angular/standalone';
|
||||
|
||||
import {TranslateService} from '@ngx-translate/core';
|
||||
import {ThingTranslateService} from './translation/thing-translate.service';
|
||||
import {HttpClientTestingModule} from '@angular/common/http/testing';
|
||||
import {provideHttpClientTesting} from '@angular/common/http/testing';
|
||||
import {AppComponent} from './app.component';
|
||||
import {AuthModule} from './modules/auth/auth.module';
|
||||
import {ConfigProvider} from './modules/config/config.provider';
|
||||
@@ -32,6 +32,7 @@ import {ScheduleSyncService} from './modules/background/schedule/schedule-sync.s
|
||||
import {sampleAuthConfiguration} from './_helpers/data/sample-configuration';
|
||||
import {StorageProvider} from './modules/storage/storage.provider';
|
||||
import {SimpleBrowser} from './util/browser.factory';
|
||||
import {provideHttpClient, withInterceptorsFromDi} from '@angular/common/http';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
let platformReadySpy: any;
|
||||
@@ -75,8 +76,9 @@ describe('AppComponent', () => {
|
||||
modalController = jasmine.createSpyObj('ModalController', ['create', 'dismiss', 'getTop']);
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [RouterTestingModule.withRoutes([]), HttpClientTestingModule, AuthModule],
|
||||
declarations: [AppComponent],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
imports: [RouterTestingModule.withRoutes([]), AuthModule],
|
||||
providers: [
|
||||
{provide: Platform, useValue: platformSpy},
|
||||
{provide: TranslateService, useValue: translateServiceSpy},
|
||||
@@ -88,8 +90,9 @@ describe('AppComponent', () => {
|
||||
{provide: StorageProvider, useValue: storageProvider},
|
||||
{provide: SimpleBrowser, useValue: simpleBrowser},
|
||||
{provide: ModalController, useValue: modalController},
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
provideHttpClientTesting(),
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
}).compileComponents();
|
||||
});
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {CommonModule, LocationStrategy, PathLocationStrategy, registerLocaleData} from '@angular/common';
|
||||
import {HTTP_INTERCEPTORS, HttpClient, HttpClientModule} from '@angular/common/http';
|
||||
import {HTTP_INTERCEPTORS, HttpClient, provideHttpClient, withInterceptorsFromDi} from '@angular/common/http';
|
||||
import localeDe from '@angular/common/locales/de';
|
||||
import {APP_INITIALIZER, NgModule} from '@angular/core';
|
||||
import {BrowserModule} from '@angular/platform-browser';
|
||||
@@ -158,7 +158,6 @@ export function createTranslateLoader(http: HttpClient) {
|
||||
JobModule,
|
||||
FavoritesModule,
|
||||
LibraryModule,
|
||||
HttpClientModule,
|
||||
ProfilePageModule,
|
||||
FeedbackModule,
|
||||
MapModule,
|
||||
@@ -220,6 +219,7 @@ export function createTranslateLoader(http: HttpClient) {
|
||||
multi: true,
|
||||
},
|
||||
provideIonicAngular(),
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
],
|
||||
})
|
||||
export class AppModule {
|
||||
|
||||
@@ -22,7 +22,7 @@ import {Requestor, StorageBackend} from '@openid/appauth';
|
||||
import {TranslateService} from '@ngx-translate/core';
|
||||
import {PAIAAuthService} from './paia/paia-auth.service';
|
||||
import {StAppsWebHttpClient} from '../data/stapps-web-http-client.provider';
|
||||
import {HttpClientModule} from '@angular/common/http';
|
||||
import {provideHttpClient, withInterceptorsFromDi} from '@angular/common/http';
|
||||
import {SimpleBrowser} from '../../util/browser.factory';
|
||||
import {LoggerTestingModule} from 'ngx-logger/testing';
|
||||
|
||||
@@ -54,7 +54,7 @@ describe('AuthHelperService', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientModule, LoggerTestingModule],
|
||||
imports: [LoggerTestingModule],
|
||||
providers: [
|
||||
StAppsWebHttpClient,
|
||||
{
|
||||
@@ -88,6 +88,7 @@ describe('AuthHelperService', () => {
|
||||
provide: SimpleBrowser,
|
||||
useValue: simpleBrowserMock,
|
||||
},
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
],
|
||||
});
|
||||
authHelperService = TestBed.inject(AuthHelperService);
|
||||
|
||||
@@ -20,7 +20,7 @@ import {Browser} from 'ionic-appauth';
|
||||
import {nowInSeconds, Requestor, StorageBackend} from '@openid/appauth';
|
||||
import {TranslateService} from '@ngx-translate/core';
|
||||
import {StAppsWebHttpClient} from '../data/stapps-web-http-client.provider';
|
||||
import {HttpClientModule} from '@angular/common/http';
|
||||
import {provideHttpClient, withInterceptorsFromDi} from '@angular/common/http';
|
||||
import {IonicStorage} from 'ionic-appauth/lib';
|
||||
import {RouterModule} from '@angular/router';
|
||||
import {LoggerTestingModule} from 'ngx-logger/testing';
|
||||
@@ -35,7 +35,7 @@ describe('AuthService', () => {
|
||||
storageBackendSpy = jasmine.createSpyObj('StorageBackend', ['getItem']);
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientModule, LoggerTestingModule, RouterModule.forRoot([])],
|
||||
imports: [LoggerTestingModule, RouterModule.forRoot([])],
|
||||
providers: [
|
||||
StAppsWebHttpClient,
|
||||
{
|
||||
@@ -54,6 +54,7 @@ describe('AuthService', () => {
|
||||
useValue: storageBackendSpy,
|
||||
},
|
||||
Requestor,
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
],
|
||||
});
|
||||
defaultAuthService = TestBed.inject(DefaultAuthService);
|
||||
|
||||
@@ -37,8 +37,5 @@
|
||||
{{ 'dashboard.jobs.noJobs' | translate }}
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<ion-button slot="button-end" fill="clear" color="medium" [routerLink]="['/jobs']">
|
||||
<ion-icon slot="icon-only" name="search" [size]="24"></ion-icon>
|
||||
</ion-button>
|
||||
}
|
||||
</stapps-section>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
*/
|
||||
import {ScrollingModule} from '@angular/cdk/scrolling';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {HttpClientModule} from '@angular/common/http';
|
||||
import {provideHttpClient, withInterceptorsFromDi} from '@angular/common/http';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {
|
||||
@@ -224,12 +224,33 @@ import {IonIconDirective} from 'src/app/util/ion-icon/ion-icon.directive';
|
||||
PeriodicalDetailContentComponent,
|
||||
ShareButtonComponent,
|
||||
],
|
||||
exports: [
|
||||
DataDetailComponent,
|
||||
DataDetailContentComponent,
|
||||
DataIconPipe,
|
||||
DataListComponent,
|
||||
DataListItemComponent,
|
||||
DateSeriesListItemComponent,
|
||||
PlaceListItemComponent,
|
||||
SimpleCardComponent,
|
||||
SkeletonListItemComponent,
|
||||
SkeletonSimpleCardComponent,
|
||||
SearchPageComponent,
|
||||
SimpleDataListComponent,
|
||||
OriginDetailComponent,
|
||||
FavoriteButtonComponent,
|
||||
TreeListComponent,
|
||||
ExternalLinkComponent,
|
||||
ArticleDetailContentComponent,
|
||||
BookDetailContentComponent,
|
||||
PeriodicalDetailContentComponent,
|
||||
TitleCardComponent,
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
DataRoutingModule,
|
||||
FormsModule,
|
||||
MapWidgetComponent,
|
||||
HttpClientModule,
|
||||
MarkdownModule.forRoot(),
|
||||
MenuModule,
|
||||
IonIconDirective,
|
||||
@@ -301,28 +322,7 @@ import {IonIconDirective} from 'src/app/util/ion-icon/ion-icon.directive';
|
||||
useFactory: browserFactory,
|
||||
deps: [Platform],
|
||||
},
|
||||
],
|
||||
exports: [
|
||||
DataDetailComponent,
|
||||
DataDetailContentComponent,
|
||||
DataIconPipe,
|
||||
DataListComponent,
|
||||
DataListItemComponent,
|
||||
DateSeriesListItemComponent,
|
||||
PlaceListItemComponent,
|
||||
SimpleCardComponent,
|
||||
SkeletonListItemComponent,
|
||||
SkeletonSimpleCardComponent,
|
||||
SearchPageComponent,
|
||||
SimpleDataListComponent,
|
||||
OriginDetailComponent,
|
||||
FavoriteButtonComponent,
|
||||
TreeListComponent,
|
||||
ExternalLinkComponent,
|
||||
ArticleDetailContentComponent,
|
||||
BookDetailContentComponent,
|
||||
PeriodicalDetailContentComponent,
|
||||
TitleCardComponent,
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
],
|
||||
})
|
||||
export class DataModule {}
|
||||
|
||||
@@ -21,7 +21,7 @@ import {StAppsWebHttpClient} from '../data/stapps-web-http-client.provider';
|
||||
import {StorageProvider} from '../storage/storage.provider';
|
||||
import {LoggerTestingModule} from 'ngx-logger/testing';
|
||||
import {MapModule} from '../map/map.module';
|
||||
import {HttpClientModule} from '@angular/common/http';
|
||||
import {provideHttpClient, withInterceptorsFromDi} from '@angular/common/http';
|
||||
import {StorageModule} from '../storage/storage.module';
|
||||
import {DaiaHolding, DaiaService} from './protocol/response';
|
||||
import {Observable, of} from 'rxjs';
|
||||
@@ -47,7 +47,6 @@ describe('DaiaDataProvider', () => {
|
||||
imports: [
|
||||
HebisModule,
|
||||
MapModule,
|
||||
HttpClientModule,
|
||||
StorageModule,
|
||||
LoggerTestingModule,
|
||||
TranslateModule.forRoot({
|
||||
@@ -62,6 +61,7 @@ describe('DaiaDataProvider', () => {
|
||||
StAppsWebHttpClient,
|
||||
StorageProvider,
|
||||
DaiaDataProvider,
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
],
|
||||
});
|
||||
daiaDataProvider = TestBed.inject(DaiaDataProvider);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
*/
|
||||
import {ScrollingModule} from '@angular/cdk/scrolling';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {HttpClientModule} from '@angular/common/http';
|
||||
import {provideHttpClient, withInterceptorsFromDi} from '@angular/common/http';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
@@ -72,7 +72,6 @@ import {IonIconDirective} from 'src/app/util/ion-icon/ion-icon.directive';
|
||||
FormsModule,
|
||||
HebisRoutingModule,
|
||||
IonIconDirective,
|
||||
HttpClientModule,
|
||||
MarkdownModule.forRoot(),
|
||||
MenuModule,
|
||||
MomentModule.forRoot({
|
||||
@@ -103,6 +102,11 @@ import {IonIconDirective} from 'src/app/util/ion-icon/ion-icon.directive';
|
||||
IonItem,
|
||||
IonThumbnail,
|
||||
],
|
||||
providers: [HebisDataProvider, DaiaDataProvider, StAppsWebHttpClient],
|
||||
providers: [
|
||||
HebisDataProvider,
|
||||
DaiaDataProvider,
|
||||
StAppsWebHttpClient,
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
],
|
||||
})
|
||||
export class HebisModule {}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
*/
|
||||
import {TestBed} from '@angular/core/testing';
|
||||
import {MapModule} from './map.module';
|
||||
import {HttpClientModule} from '@angular/common/http';
|
||||
import {provideHttpClient, withInterceptorsFromDi} from '@angular/common/http';
|
||||
import {StorageModule} from '../storage/storage.module';
|
||||
import {MapPosition, PositionService} from './position.service';
|
||||
import {ConfigProvider} from '../config/config.provider';
|
||||
@@ -39,12 +39,13 @@ describe('PositionService', () => {
|
||||
},
|
||||
});
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MapModule, HttpClientModule, StorageModule, LoggerTestingModule],
|
||||
imports: [MapModule, StorageModule, LoggerTestingModule],
|
||||
providers: [
|
||||
{
|
||||
provider: ConfigProvider,
|
||||
useValue: configProviderMock,
|
||||
},
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
],
|
||||
});
|
||||
positionService = TestBed.inject(PositionService);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
import {CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
|
||||
import {ComponentFixture, TestBed} from '@angular/core/testing';
|
||||
import {HttpClientTestingModule} from '@angular/common/http/testing';
|
||||
import {provideHttpClientTesting} from '@angular/common/http/testing';
|
||||
import {RouterTestingModule} from '@angular/router/testing';
|
||||
import {AuthModule} from '../../auth/auth.module';
|
||||
import {ProfilePageComponent} from './profile-page.component';
|
||||
@@ -27,6 +27,7 @@ import {ScheduleProvider} from '../../calendar/schedule.provider';
|
||||
import {DataProvider} from '../../data/data.provider';
|
||||
import {StAppsWebHttpClient} from '../../data/stapps-web-http-client.provider';
|
||||
import {SimpleBrowser} from '../../../util/browser.factory';
|
||||
import {provideHttpClient, withInterceptorsFromDi} from '@angular/common/http';
|
||||
|
||||
describe('ProfilePage', () => {
|
||||
let component: ProfilePageComponent;
|
||||
@@ -47,7 +48,8 @@ describe('ProfilePage', () => {
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ProfilePageComponent],
|
||||
imports: [HttpClientTestingModule, RouterTestingModule, AuthModule, TranslateModule.forRoot()],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
imports: [RouterTestingModule, AuthModule, TranslateModule.forRoot()],
|
||||
providers: [
|
||||
{provide: ConfigProvider, useValue: configProvider},
|
||||
{provide: StorageProvider, useValue: storageProvider},
|
||||
@@ -55,8 +57,9 @@ describe('ProfilePage', () => {
|
||||
{provide: SimpleBrowser, useValue: simpleBrowser},
|
||||
ScheduleProvider,
|
||||
DataProvider,
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
provideHttpClientTesting(),
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
}).compileComponents();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user