Skip to content

Commit

Permalink
Package updates (#1005)
Browse files Browse the repository at this point in the history
* build: strip all firebase related things from project

* chore: updated angular package versions

* chore: update angular, angular universal and angular eslint to v13

* chore: update angular material to v13

* chore: remove usage of deprecated functions

* chore: upgrade nx workspace

* chore: remove deprecated ngrx selector usage

* chore: bump version
  • Loading branch information
TwoDCube authored Jan 16, 2022
1 parent 52fdaa0 commit c98b3d5
Show file tree
Hide file tree
Showing 37 changed files with 2,999 additions and 5,823 deletions.
42 changes: 0 additions & 42 deletions .github/workflows/frontend-deploy-dev.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/frontend-deploy-prod.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
!.vscode/extensions.json

# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
Expand Down
45 changes: 16 additions & 29 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
},
"outputs": ["coverage/libs/calendar"]
}
}
},
"tags": []
},
"frontend": {
"root": "apps/frontend/",
Expand Down Expand Up @@ -180,7 +181,8 @@
"production": {}
}
}
}
},
"tags": []
},
"frontend-e2e": {
"root": "apps/frontend-e2e",
Expand All @@ -205,7 +207,9 @@
"lintFilePatterns": ["apps/frontend-e2e/**/*.ts", "apps/frontend-e2e/**/*.html"]
}
}
}
},
"tags": [],
"implicitDependencies": ["frontend"]
},
"math-competition": {
"root": "apps/math-competition/",
Expand Down Expand Up @@ -311,7 +315,8 @@
},
"outputs": ["coverage/apps/math-competition/"]
}
}
},
"tags": []
},
"math-competition-e2e": {
"root": "apps/math-competition-e2e",
Expand All @@ -336,7 +341,9 @@
"lintFilePatterns": ["apps/math-competition-e2e/**/*.ts", "apps/math-competition-e2e/**/*.html"]
}
}
}
},
"tags": [],
"implicitDependencies": ["math-competition"]
},
"simple-slideshow": {
"projectType": "library",
Expand Down Expand Up @@ -364,7 +371,8 @@
"@nrwl/angular:component": {
"styleext": "scss"
}
}
},
"tags": []
},
"ui": {
"root": "libs/ui",
Expand Down Expand Up @@ -392,29 +400,8 @@
"@nrwl/schematics:component": {
"styleext": "scss"
}
}
}
},
"cli": {
"warnings": {
"versionMismatch": false
},
"defaultCollection": "@nrwl/angular",
"packageManager": "yarn",
"analytics": "3ef1259c-eca0-415b-a73f-f34c485d92e8"
},
"defaultProject": "frontend",
"schematics": {
"@nrwl/schematics:library": {
"unitTestRunner": "karma",
"framework": "angular"
},
"@nrwl/schematics:application": {
"unitTestRunner": "karma",
"e2eTestRunner": "protractor"
},
"@nrwl/schematics:node-application": {
"framework": "express"
},
"tags": []
}
}
}
5 changes: 0 additions & 5 deletions apps/frontend/.firebaserc

This file was deleted.

17 changes: 0 additions & 17 deletions apps/frontend/firebase-hosting-pull-request.yml

This file was deleted.

40 changes: 0 additions & 40 deletions apps/frontend/firebase.json

This file was deleted.

26 changes: 0 additions & 26 deletions apps/frontend/firestore.indexes.json

This file was deleted.

7 changes: 0 additions & 7 deletions apps/frontend/firestore.rules

This file was deleted.

1 change: 0 additions & 1 deletion apps/frontend/remoteconfig.template.json

This file was deleted.

4 changes: 2 additions & 2 deletions apps/frontend/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { AfterViewInit, ApplicationRef, ChangeDetectionStrategy, Component, OnIn
import { animate, group, query, style, transition, trigger } from '@angular/animations'
import { NavigationCancel, NavigationEnd, NavigationStart, Router } from '@angular/router'
import { SwUpdate } from '@angular/service-worker'
import { first } from 'rxjs/operators'
import { filter, first } from 'rxjs/operators'
import { concat, interval } from 'rxjs'
import { ToastService } from './services/toast.service'
import { HeaderService } from './services/header.service'
Expand Down Expand Up @@ -67,7 +67,7 @@ export class AppComponent implements AfterViewInit, OnInit {

concat(appIsStable$, hourly$).subscribe(() => environment.production && this.swupdate.checkForUpdate())

this.swupdate.available.subscribe(() => {
this.swupdate.versionUpdates.pipe(filter((evt) => evt.type === 'VERSION_READY')).subscribe(() => {
this.toastService.createToast('Frissítés elérhető. Kérlek töltsd újra az oldalt!', [
{
title: 'Újratöltés',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
import { Injectable } from '@angular/core'
import { Actions, Effect, ofType } from '@ngrx/effects'
import { Actions, createEffect, ofType } from '@ngrx/effects'
import { CanteenActionTypes, CanteenLoaded, CanteenLoadError } from './canteen.actions'
import { catchError, map, switchMap } from 'rxjs/operators'
import { CanteenService } from '../../services/canteen.service'
import { of } from 'rxjs'

@Injectable()
export class CanteenEffects {
@Effect() loadCanteen$ = this.actions$.pipe(
ofType(CanteenActionTypes.LoadCanteen),
switchMap(() => {
return this.canteenService.getCanteen()
}),
map((data) => {
return new CanteenLoaded(data)
}),
catchError((error) => {
return of(new CanteenLoadError(error))
})
loadCanteen$ = createEffect(() =>
this.actions$.pipe(
ofType(CanteenActionTypes.LoadCanteen),
switchMap(() => {
return this.canteenService.getCanteen()
}),
map((data) => {
return new CanteenLoaded(data)
}),
catchError((error) => {
return of(new CanteenLoadError(error))
})
)
)

constructor(private actions$: Actions, private canteenService: CanteenService) {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core'
import { Actions, createEffect, Effect, ofType } from '@ngrx/effects'
import { Actions, createEffect, ofType } from '@ngrx/effects'

import { Entity, EVENTS_FEATURE_KEY, EventsState } from './events.reducer'
import { AddLoadedMonth, EventsActionTypes, EventsLoaded, MonthChange } from './events.actions'
Expand All @@ -10,7 +10,6 @@ import { RequestService } from '../services/request.service'

@Injectable()
export class EventsEffects {
@Effect()
queryMonth = createEffect(() =>
this.actions$.pipe(
ofType<MonthChange>(EventsActionTypes.MonthChange),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createFeatureSelector, createSelector } from '@ngrx/store'
import { ALERTMESSAGE_FEATURE_KEY, State, AlertMessagePartialState } from './alert-message.reducer'
import { AlertMessagePriority } from '../../models/alert-message'

export const getAlertMessageState = createFeatureSelector<AlertMessagePartialState, State>(ALERTMESSAGE_FEATURE_KEY)
export const getAlertMessageState = createFeatureSelector<State>(ALERTMESSAGE_FEATURE_KEY)

export const getAlertMessageLoaded = createSelector(getAlertMessageState, (state: State) => state.loaded)

Expand Down
14 changes: 7 additions & 7 deletions apps/frontend/src/app/modules/home/state/posts/posts.selector.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { postsFeatureKey, State } from './posts.reducer'
import { createSelector } from '@ngrx/store'
import { createFeatureSelector, createSelector } from '@ngrx/store'

const selectFeature = (state) => state[postsFeatureKey]
const selectFeature = createFeatureSelector<State>(postsFeatureKey)

export const selectPosts = createSelector(selectFeature, (state: State) => state.posts)
export const selectPosts = createSelector(selectFeature, (state) => state.posts)

export const selectPagesLoaded = createSelector(selectFeature, (state: State) => state.pagesLoaded)
export const selectPagesLoaded = createSelector(selectFeature, (state) => state.pagesLoaded)

export const selectFeaturedPostsLoaded = createSelector(selectFeature, (state: State) => state.featuredPostsLoaded)
export const selectFeaturedPostsLoaded = createSelector(selectFeature, (state) => state.featuredPostsLoaded)

export const selectFeaturedPosts = createSelector(selectFeature, (state: State) => state.featuredPosts)
export const selectFeaturedPosts = createSelector(selectFeature, (state) => state.featuredPosts)

export const selectLoading = createSelector(selectFeature, (state: State) => state.loading)
export const selectLoading = createSelector(selectFeature, (state) => state.loading)
Loading

0 comments on commit c98b3d5

Please sign in to comment.