Skip to content

Commit

Permalink
Changed the Java compiler target to be Java11 [#761]
Browse files Browse the repository at this point in the history
Additionally modified the code formatting for the web project to
use the project's instance of Prettier.
  • Loading branch information
mcpierce committed Jun 6, 2021
1 parent e380095 commit 7656be7
Show file tree
Hide file tree
Showing 39 changed files with 152 additions and 144 deletions.
3 changes: 2 additions & 1 deletion comixed-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"test": "ng test --code-coverage",
"lint": "ng lint",
"e2e": "ng e2e",
"format": "prettier --write 'src/app/**/*.{ts,json,html,scss}'"
"format": "node_modules/.bin/prettier --write 'src/app/**/*.{ts,json,html,scss}'"
},
"prettier": {
"singleQuote": true,
Expand Down Expand Up @@ -93,6 +93,7 @@
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.3.0",
"karma-jasmine-html-reporter": "^1.5.4",
"prettier": "^2.3.1",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,9 @@ describe('WebAuditLogComponent', () => {

describe('clearing the audit log', () => {
beforeEach(() => {
spyOn(
confirmationService,
'confirm'
).and.callFake((confirmation: Confirmation) => confirmation.confirm());
spyOn(confirmationService, 'confirm').and.callFake(
(confirmation: Confirmation) => confirmation.confirm()
);
component.onClearLog();
});

Expand Down
8 changes: 7 additions & 1 deletion comixed-web/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@

<div
id="cx-footer"
class="cx-width-100 cx-padding-left-15 cx-padding-right-15 cx-padding-top-5 cx-padding-bottom-5"
class="
cx-width-100
cx-padding-left-15
cx-padding-right-15
cx-padding-top-5
cx-padding-bottom-5
"
>
<cx-footer [user]="user"></cx-footer>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,9 @@ describe('BlockedPageDetailPageComponent', () => {

describe('saving the blocked page', () => {
beforeEach(() => {
spyOn(
confirmationService,
'confirm'
).and.callFake((confirmation: Confirmation) => confirmation.confirm());
spyOn(confirmationService, 'confirm').and.callFake(
(confirmation: Confirmation) => confirmation.confirm()
);
component.blockedPage = ENTRY;
component.onSave();
});
Expand All @@ -185,10 +184,9 @@ describe('BlockedPageDetailPageComponent', () => {

describe('resetting the form', () => {
beforeEach(() => {
spyOn(
confirmationService,
'confirm'
).and.callFake((confirmation: Confirmation) => confirmation.confirm());
spyOn(confirmationService, 'confirm').and.callFake(
(confirmation: Confirmation) => confirmation.confirm()
);
component.blockedPage = ENTRY;
component.editing = true;
component.blockedPageForm.controls.label.setValue(ENTRY.label.substr(1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,9 @@ describe('BlockedPageListPageComponent', () => {

beforeEach(() => {
component.showUploadRow = true;
spyOn(
confirmationService,
'confirm'
).and.callFake((confirmation: Confirmation) => confirmation.confirm());
spyOn(confirmationService, 'confirm').and.callFake(
(confirmation: Confirmation) => confirmation.confirm()
);
component.onFileSelected(EVENT);
});

Expand Down Expand Up @@ -228,10 +227,9 @@ describe('BlockedPageListPageComponent', () => {
});
component.dataSource.data.forEach(entry => (entry.selected = false));
component.dataSource.data[0].selected = true;
spyOn(
confirmationService,
'confirm'
).and.callFake((confirmation: Confirmation) => confirmation.confirm());
spyOn(confirmationService, 'confirm').and.callFake(
(confirmation: Confirmation) => confirmation.confirm()
);
component.onDeleteEntries();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ import {
} from '../reducers/blocked-page-detail.reducer';

/** Loads the blocked page detail feature state. */
export const selectBlockedPageDetailState = createFeatureSelector<BlockedPageDetailState>(
BLOCKED_PAGE_DETAIL_FEATURE_KEY
);
export const selectBlockedPageDetailState =
createFeatureSelector<BlockedPageDetailState>(
BLOCKED_PAGE_DETAIL_FEATURE_KEY
);

export const selectBlockedPageDetail = createSelector(
selectBlockedPageDetailState,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ import {
/**
* Selects the blocked page list feature state.
*/
export const selectBlockedPageListState = createFeatureSelector<BlockedPageListState>(
BLOCKED_PAGE_LIST_FEATURE_KEY
);
export const selectBlockedPageListState =
createFeatureSelector<BlockedPageListState>(BLOCKED_PAGE_LIST_FEATURE_KEY);

/**
* Selects the list of blocked pages.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
DeleteBlockedPagesState
} from '../reducers/delete-blocked-pages.reducer';

export const selectDeleteBlockedPagesState = createFeatureSelector<DeleteBlockedPagesState>(
DELETE_BLOCKED_PAGES_FEATURE_KEY
);
export const selectDeleteBlockedPagesState =
createFeatureSelector<DeleteBlockedPagesState>(
DELETE_BLOCKED_PAGES_FEATURE_KEY
);
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
DownloadBlockedPagesState
} from '../reducers/download-blocked-pages.reducer';

export const selectDownloadBlockedPagesState = createFeatureSelector<DownloadBlockedPagesState>(
DOWNLOAD_BLOCKED_PAGES_FEATURE_KEY
);
export const selectDownloadBlockedPagesState =
createFeatureSelector<DownloadBlockedPagesState>(
DOWNLOAD_BLOCKED_PAGES_FEATURE_KEY
);
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
UploadedBlockedPagesState
} from '../reducers/upload-blocked-pages.reducer';

export const selectUploadBlockedPagesState = createFeatureSelector<UploadedBlockedPagesState>(
UPLOAD_BLOCKED_PAGES_FEATURE_KEY
);
export const selectUploadBlockedPagesState =
createFeatureSelector<UploadedBlockedPagesState>(
UPLOAD_BLOCKED_PAGES_FEATURE_KEY
);
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ import { MatSort } from '@angular/material/sort';
styleUrls: ['./collection-list.component.scss']
})
export class CollectionListComponent
implements OnInit, OnDestroy, AfterViewInit {
implements OnInit, OnDestroy, AfterViewInit
{
@ViewChild(MatSort) matSort: MatSort;

typeSubscription: Subscription;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,9 @@ describe('ComicEditComponent', () => {

describe('undoing changes', () => {
beforeEach(() => {
spyOn(
confirmationService,
'confirm'
).and.callFake((confirmation: Confirmation) => confirmation.confirm());
spyOn(confirmationService, 'confirm').and.callFake(
(confirmation: Confirmation) => confirmation.confirm()
);
component.onUndoChanges();
});

Expand Down Expand Up @@ -189,10 +188,9 @@ describe('ComicEditComponent', () => {

describe('saving changes', () => {
beforeEach(() => {
spyOn(
confirmationService,
'confirm'
).and.callFake((confirmation: Confirmation) => confirmation.confirm());
spyOn(confirmationService, 'confirm').and.callFake(
(confirmation: Confirmation) => confirmation.confirm()
);
component.comic = COMIC;
component.onSaveChanges();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,9 @@ describe('ComicScrapingComponent', () => {

describe('when selected', () => {
beforeEach(() => {
spyOn(
confirmationService,
'confirm'
).and.callFake((confirm: Confirmation) => confirm.confirm());
spyOn(confirmationService, 'confirm').and.callFake(
(confirm: Confirmation) => confirm.confirm()
);
component.onDecision(true);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ export const NO_MATCH_TEXT = 'scraping.text.no-match';
styleUrls: ['./comic-scraping.component.scss']
})
export class ComicScrapingComponent
implements OnInit, OnDestroy, AfterViewInit {
implements OnInit, OnDestroy, AfterViewInit
{
@ViewChild(MatPaginator) paginator: MatPaginator;
@ViewChild(MatSort) sort: MatSort;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,9 @@ describe('ComicBookPageComponent', () => {
describe('updating the comic info', () => {
beforeEach(() => {
component.comic = COMIC;
spyOn(
confirmationService,
'confirm'
).and.callFake((confirmation: Confirmation) => confirmation.confirm());
spyOn(confirmationService, 'confirm').and.callFake(
(confirmation: Confirmation) => confirmation.confirm()
);
component.onUpdateComicInfo();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ import { updateComicInfo } from '@app/comic-book/actions/update-comic-info.actio
styleUrls: ['./comic-book-page.component.scss']
})
export class ComicBookPageComponent
implements OnInit, OnDestroy, AfterViewInit {
implements OnInit, OnDestroy, AfterViewInit
{
paramSubscription: Subscription;
queryParamSubscription: Subscription;
currentTab = 0;
Expand Down
5 changes: 2 additions & 3 deletions comixed-web/src/app/comic-book/selectors/comic.selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
import { createFeatureSelector, createSelector } from '@ngrx/store';
import { COMIC_FEATURE_KEY, ComicState } from '../reducers/comic.reducer';

export const selectComicState = createFeatureSelector<ComicState>(
COMIC_FEATURE_KEY
);
export const selectComicState =
createFeatureSelector<ComicState>(COMIC_FEATURE_KEY);

export const selectComic = createSelector(
selectComicState,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ import {
} from '../reducers/scraping.reducer';

/** Selects for the feature state. */
export const selectScrapingState = createFeatureSelector<ScrapingState>(
SCRAPING_FEATURE_KEY
);
export const selectScrapingState =
createFeatureSelector<ScrapingState>(SCRAPING_FEATURE_KEY);

/** Selects for the scraping volumes. */
export const selectScrapingVolumes = createSelector(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@ import {
UpdateComicInfoState
} from '../reducers/update-comic-info.reducer';

export const selectUpdateComicInfoState = createFeatureSelector<UpdateComicInfoState>(
UPDATE_COMIC_INFO_FEATURE_KEY
);
export const selectUpdateComicInfoState =
createFeatureSelector<UpdateComicInfoState>(UPDATE_COMIC_INFO_FEATURE_KEY);
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,9 @@ describe('ImportComicsPageComponent', () => {
component.ignoreMetadata = IGNORE_METADATA;
component.deleteBlockedPages = DELETE_BLOCKED_PAGES;

spyOn(
confirmationService,
'confirm'
).and.callFake((confirm: Confirmation) => confirm.confirm());
spyOn(confirmationService, 'confirm').and.callFake(
(confirm: Confirmation) => confirm.confirm()
);
component.onStartImport();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ import {
import { selectComicImportState } from '@app/comic-file/selectors/comic-import.selectors';

/** Selects the comic list feature state. */
export const selectComicFileListState = createFeatureSelector<ComicFileListState>(
COMIC_FILE_LIST_FEATURE_KEY
);
export const selectComicFileListState =
createFeatureSelector<ComicFileListState>(COMIC_FILE_LIST_FEATURE_KEY);

/** Selects the loaded comic files. */
export const selectComicFiles = createSelector(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@ import {
import { createFeatureSelector } from '@ngrx/store';

/** Selects the comic import feature state. */
export const selectImportComicFilesState = createFeatureSelector<ImportComicFilesState>(
IMPORT_COMIC_FILES_FEATURE_KEY
);
export const selectImportComicFilesState =
createFeatureSelector<ImportComicFilesState>(IMPORT_COMIC_FILES_FEATURE_KEY);
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,9 @@ describe('NavigationBarComponent', () => {

describe('on logout clicked', () => {
beforeEach(() => {
spyOn(
confirmationService,
'confirm'
).and.callFake((confirm: Confirmation) => confirm.confirm());
spyOn(confirmationService, 'confirm').and.callFake(
(confirm: Confirmation) => confirm.confirm()
);
component.onLogout();
});

Expand Down
5 changes: 2 additions & 3 deletions comixed-web/src/app/core/selectors/busy.selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@
import { createFeatureSelector } from '@ngrx/store';
import { BUSY_FEATURE_KEY, BusyState } from '../reducers/busy.reducer';

export const selectBusyState = createFeatureSelector<BusyState>(
BUSY_FEATURE_KEY
);
export const selectBusyState =
createFeatureSelector<BusyState>(BUSY_FEATURE_KEY);
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@ import {
UpdateReadStatusState
} from '../reducers/update-read-status.reducer';

export const selectMarkComicReadState = createFeatureSelector<UpdateReadStatusState>(
UPDATE_READ_STATUS_FEATURE_KEY
);
export const selectMarkComicReadState =
createFeatureSelector<UpdateReadStatusState>(UPDATE_READ_STATUS_FEATURE_KEY);
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,9 @@ describe('ComicCoversComponent', () => {

describe('updating the comic info', () => {
beforeEach(() => {
spyOn(
confirmationService,
'confirm'
).and.callFake((confirmation: Confirmation) => confirmation.confirm());
spyOn(confirmationService, 'confirm').and.callFake(
(confirmation: Confirmation) => confirmation.confirm()
);
component.onUpdateComicInfo(COMIC);
});

Expand Down

0 comments on commit 7656be7

Please sign in to comment.