Angular 18 Upgrade

This commit is contained in:
Jason Wall 2024-07-11 18:28:33 +00:00
parent b8bca83612
commit 7dc029ec4e
14 changed files with 7416 additions and 5512 deletions

View File

@ -6,7 +6,7 @@ stages:
build-android: build-android:
stage: build stage: build
image: walljm/gradle_android:8.0.2-jdk17-33-node1 image: walljm/gradle_android:8.2.1-jdk17-android34-node22
before_script: before_script:
- cd ./src/android - cd ./src/android
- bash ./install-sdk.sh - bash ./install-sdk.sh
@ -29,7 +29,7 @@ build-android:
test: test:
stage: test stage: test
image: walljm/node-chrome-headless:21.6 image: walljm/node-chrome-headless:22.4-bookworm
variables: variables:
NODE_OPTIONS: "--max_old_space_size=2048" NODE_OPTIONS: "--max_old_space_size=2048"
script: script:
@ -68,7 +68,7 @@ deploy-prod-site:
deploy-android: deploy-android:
stage: prod stage: prod
image: walljm/gradle_android:8.0.2-jdk17-33-node1 image: walljm/gradle_android:8.2.1-jdk17-android34-node22
needs: needs:
- build-android - build-android
before_script: before_script:

View File

@ -1,4 +1,4 @@
FROM node:21.6.2-bookworm FROM node:22.4-bookworm
RUN apt-get update -qqy \ RUN apt-get update -qqy \
&& apt-get -qqy install \ && apt-get -qqy install \

View File

@ -1,2 +1,2 @@
docker build -t walljm/node-chrome-headless:21.6 . docker build -t walljm/node-chrome-headless:22.4-bookworm .
docker push walljm/node-chrome-headless:21.6 docker push walljm/node-chrome-headless:22.4-bookworm

View File

@ -1,5 +1,5 @@
FROM gradle:8.0.2-jdk17-focal FROM gradle:8.2.1-jdk17-focal
# Install Git and dependencies # Install Git and dependencies
RUN apt-get update \ RUN apt-get update \
@ -7,7 +7,7 @@ RUN apt-get update \
&& apt-get clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists /var/cache/apt && rm -rf /var/lib/apt/lists /var/cache/apt
RUN curl -L -o node.tar.gz "https://nodejs.org/dist/v21.6.2/node-v21.6.2-linux-x64.tar.gz" && \ RUN curl -L -o node.tar.gz "https://nodejs.org/dist/v22.4.1/node-v22.4.1-linux-x64.tar.gz" && \
tar -xzf node.tar.gz -C /usr/local --strip-components=1 && \ tar -xzf node.tar.gz -C /usr/local --strip-components=1 && \
rm node.tar.gz && \ rm node.tar.gz && \
ln -s /usr/local/bin/node /usr/local/bin/nodejs ln -s /usr/local/bin/node /usr/local/bin/nodejs
@ -42,7 +42,7 @@ RUN $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --update
RUN $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --verbose \ RUN $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --verbose \
"build-tools;34.0.0" \ "build-tools;34.0.0" \
"build-tools;30.0.3" \ "build-tools;30.0.3" \
"platforms;android-33" \ "platforms;android-34" \
"platform-tools" "platform-tools"

View File

@ -1,2 +1,2 @@
docker build -t walljm/gradle_android:8.0.2-jdk17-33-node1 . docker build -t walljm/gradle_android:8.2.1-jdk17-android34-node22 .
docker push walljm/gradle_android:8.0.2-jdk17-33-node1 docker push walljm/gradle_android:8.2.1-jdk17-android34-node22

View File

@ -7,7 +7,7 @@ buildscript {
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:8.1.4' classpath 'com.android.tools.build:gradle:8.2.1'
classpath 'com.google.gms:google-services:4.4.2' classpath 'com.google.gms:google-services:4.4.2'
classpath "com.github.triplet.gradle:play-publisher:3.8.1" classpath "com.github.triplet.gradle:play-publisher:3.8.1"

View File

@ -9,7 +9,7 @@ buildscript {
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:8.1.4' classpath 'com.android.tools.build:gradle:8.2.1'
} }
} }

View File

@ -1,17 +1,17 @@
ext { ext {
minSdkVersion = 22 minSdkVersion = 22
firebaseMessagingVersion = '23.0.5' firebaseMessagingVersion = '23.3.1'
compileSdkVersion = 34 compileSdkVersion = 34
targetSdkVersion = 34 targetSdkVersion = 34
androidxActivityVersion = '1.7.0' androidxActivityVersion = '1.8.0'
androidxAppCompatVersion = '1.7.0' androidxAppCompatVersion = '1.6.1'
androidxCoordinatorLayoutVersion = '1.2.0' androidxCoordinatorLayoutVersion = '1.2.0'
androidxCoreVersion = '1.10.0' androidxCoreVersion = '1.12.0'
androidxFragmentVersion = '1.5.6' androidxFragmentVersion = '1.6.2'
coreSplashScreenVersion = '1.0.1' coreSplashScreenVersion = '1.0.1'
androidxWebkitVersion = '1.6.1' androidxWebkitVersion = '1.9.0'
junitVersion = '4.13.2' junitVersion = '4.13.2'
androidxJunitVersion = '1.2.1' androidxJunitVersion = '1.1.5'
androidxEspressoCoreVersion = '3.6.1' androidxEspressoCoreVersion = '3.5.1'
cordovaAndroidVersion = '10.1.1' cordovaAndroidVersion = '10.1.1'
} }

View File

@ -5,9 +5,9 @@ PODS:
- AppAuth/Core (1.7.1) - AppAuth/Core (1.7.1)
- AppAuth/ExternalUserAgent (1.7.1): - AppAuth/ExternalUserAgent (1.7.1):
- AppAuth/Core - AppAuth/Core
- Capacitor (5.7.0): - Capacitor (6.1.0):
- CapacitorCordova - CapacitorCordova
- CapacitorCordova (5.7.0) - CapacitorCordova (6.1.0)
- CodetrixStudioCapacitorGoogleAuth (0.0.1): - CodetrixStudioCapacitorGoogleAuth (0.0.1):
- Capacitor - Capacitor
- GoogleSignIn (~> 6.2.4) - GoogleSignIn (~> 6.2.4)
@ -42,8 +42,8 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
AppAuth: e93b919be5dbcbba49555011ce94f7d716368574 AppAuth: e93b919be5dbcbba49555011ce94f7d716368574
Capacitor: fc155ee2ee45a2093d716f13cf5aa5a865e2d85a Capacitor: 187bd7847b6f71467015a20200a1a071be3e5f14
CapacitorCordova: e825fce1a2e14e4b5730641c7e098dccf74397b7 CapacitorCordova: be703980ca797f847c3356f78fa175d21c8330c2
CodetrixStudioCapacitorGoogleAuth: fcce058390347c1ce5d8ac4764bdf1f5c1ee233b CodetrixStudioCapacitorGoogleAuth: fcce058390347c1ce5d8ac4764bdf1f5c1ee233b
GoogleSignIn: 5651ce3a61e56ca864160e79b484cd9ed3f49b7a GoogleSignIn: 5651ce3a61e56ca864160e79b484cd9ed3f49b7a
GTMAppAuth: 0ff230db599948a9ad7470ca667337803b3fc4dd GTMAppAuth: 0ff230db599948a9ad7470ca667337803b3fc4dd

12659
src/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -16,51 +16,51 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "^17.2.3", "@angular/animations": "^18.1.0",
"@angular/cdk": "^17.2.1", "@angular/cdk": "^18.0.6",
"@angular/common": "^17.2.3", "@angular/common": "^18.1.0",
"@angular/compiler": "^17.2.3", "@angular/compiler": "^18.1.0",
"@angular/core": "^17.2.3", "@angular/core": "^18.1.0",
"@angular/fire": "^17.0.1", "@angular/fire": "^18.0.1",
"@angular/forms": "^17.2.3", "@angular/forms": "^18.1.0",
"@angular/material": "^17.2.1", "@angular/material": "^18.0.6",
"@angular/platform-browser": "^17.2.3", "@angular/platform-browser": "^18.1.0",
"@angular/platform-browser-dynamic": "^17.2.3", "@angular/platform-browser-dynamic": "^18.1.0",
"@angular/router": "^17.2.3", "@angular/router": "^18.1.0",
"@capacitor/android": "^5.7.0", "@capacitor/android": "^6.0.0",
"@capacitor/core": "^5.7.0", "@capacitor/core": "^6.0.0",
"@capacitor/ios": "^5.7.0", "@capacitor/ios": "^6.0.0",
"@codetrix-studio/capacitor-google-auth": "^3.4.0-rc.0", "@codetrix-studio/capacitor-google-auth": "^3.4.0-rc.0",
"@ngx-pwa/local-storage": "^17.0.0", "@ngx-pwa/local-storage": "^18.0.0",
"angular2-uuid": "^1.1.1", "angular2-uuid": "^1.1.1",
"firebase": "^10.8.0", "firebase": "^10.8.0",
"marked": "^9.0.0", "marked": "^9.0.0",
"ngx-markdown": "^17.1.1", "ngx-markdown": "^18.0.0",
"reselect": "^5.1.0", "reselect": "^5.1.0",
"rxjs": "^7.8.1", "rxjs": "^7.8.1",
"tslib": "^2.6.2", "tslib": "^2.6.2",
"zone.js": "~0.14.4" "zone.js": "~0.14.4"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/architect": "0.1702.1", "@angular-devkit/architect": "0.1800.7",
"@angular-devkit/build-angular": "^17.2.1", "@angular-devkit/build-angular": "^18.0.7",
"@angular-eslint/builder": "17.2.1", "@angular-eslint/builder": "18.1.0",
"@angular-eslint/eslint-plugin": "17.2.1", "@angular-eslint/eslint-plugin": "18.1.0",
"@angular-eslint/eslint-plugin-template": "17.2.1", "@angular-eslint/eslint-plugin-template": "18.1.0",
"@angular-eslint/schematics": "17.2.1", "@angular-eslint/schematics": "18.1.0",
"@angular-eslint/template-parser": "17.2.1", "@angular-eslint/template-parser": "18.1.0",
"@angular/cli": "^17.2.1", "@angular/cli": "^18.0.7",
"@angular/compiler-cli": "^17.2.1", "@angular/compiler-cli": "^18.1.0",
"@capacitor/cli": "^5.7.0", "@capacitor/cli": "^6.0.0",
"@cypress/schematic": "^2.5.1", "@cypress/schematic": "^2.5.1",
"@types/jasmine": "~5.1.4", "@types/jasmine": "~5.1.4",
"@types/jasminewd2": "~2.0.13", "@types/jasminewd2": "~2.0.13",
"@types/node": "^20.11.21", "@types/node": "^20.11.21",
"@typescript-eslint/eslint-plugin": "7.1.0", "@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.1.0", "@typescript-eslint/parser": "^7.2.0",
"cypress": "latest", "cypress": "13.6.6",
"eslint": "^8.57.0", "eslint": "^8.57.0",
"eslint-plugin-deprecation": "^2.0.0", "eslint-plugin-deprecation": "^3.0.0",
"eslint-plugin-optimize-regex": "^1.2.1", "eslint-plugin-optimize-regex": "^1.2.1",
"eslint-plugin-simple-import-sort": "^12.0.0", "eslint-plugin-simple-import-sort": "^12.0.0",
"eslint-plugin-unused-imports": "^3.1.0", "eslint-plugin-unused-imports": "^3.1.0",
@ -77,7 +77,7 @@
"karma-jasmine-html-reporter": "^2.1.0", "karma-jasmine-html-reporter": "^2.1.0",
"open": "^10.0.4", "open": "^10.0.4",
"ts-node": "~10.9.2", "ts-node": "~10.9.2",
"typescript": "~5.3.3" "typescript": "~5.4.5"
}, },
"browserslist": [ "browserslist": [
"last 1 Chrome version", "last 1 Chrome version",

View File

@ -1,6 +1,6 @@
import { ClipboardModule } from '@angular/cdk/clipboard'; import { ClipboardModule } from '@angular/cdk/clipboard';
import { DragDropModule } from '@angular/cdk/drag-drop'; import { DragDropModule } from '@angular/cdk/drag-drop';
import { HttpClientModule } from '@angular/common/http'; import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { APP_ID, NgModule } from '@angular/core'; import { APP_ID, NgModule } from '@angular/core';
import { AngularFireModule } from '@angular/fire/compat'; import { AngularFireModule } from '@angular/fire/compat';
import { AngularFireAuthModule } from '@angular/fire/compat/auth'; import { AngularFireAuthModule } from '@angular/fire/compat/auth';
@ -76,80 +76,69 @@ export function markedOptionsFactory(): MarkedOptions {
}; };
} }
@NgModule({ @NgModule({ declarations: [
declarations: [ AppComponent,
AppComponent, NotesAdminPageComponent,
NotesAdminPageComponent, SavedPagesAdminPageComponent,
SavedPagesAdminPageComponent, SavedPageCardComponent,
SavedPageCardComponent, HelpModalComponent,
HelpModalComponent, SearchPageComponent,
SearchPageComponent, PassageCardComponent,
PassageCardComponent, StrongsComponent,
StrongsComponent, StrongsCardComponent,
StrongsCardComponent, StrongsModalComponent,
StrongsModalComponent, WordsCardComponent,
WordsCardComponent, NoteCardComponent,
NoteCardComponent, PageEditModalComponent,
PageEditModalComponent, NoteEditModalComponent,
NoteEditModalComponent, AddToPageModalComponent,
AddToPageModalComponent, VersePickerModalComponent,
VersePickerModalComponent, SettingsComponent,
SettingsComponent, OkCancelModalComponent,
OkCancelModalComponent, CardEditModalComponent,
CardEditModalComponent, ],
], bootstrap: [AppComponent], imports: [BrowserModule,
imports: [ ReactiveFormsModule,
BrowserModule, FormsModule,
HttpClientModule, AppRoutingModule,
BrowserAnimationsModule,
ReactiveFormsModule, MarkdownModule.forRoot({
FormsModule, markedOptions: {
AppRoutingModule, provide: MARKED_OPTIONS,
BrowserAnimationsModule, useFactory: markedOptionsFactory,
},
MarkdownModule.forRoot({ }),
markedOptions: { AngularFireModule.initializeApp(FirebaseConfig),
provide: MARKED_OPTIONS, AngularFireAuthModule,
useFactory: markedOptionsFactory, AngularFireDatabaseModule,
}, DragDropModule,
}), MatSidenavModule,
MatChipsModule,
AngularFireModule.initializeApp(FirebaseConfig), MatToolbarModule,
AngularFireAuthModule, MatIconModule,
AngularFireDatabaseModule, MatAutocompleteModule,
MatBadgeModule,
DragDropModule, MatBottomSheetModule,
MatSidenavModule, MatButtonModule,
MatChipsModule, MatButtonToggleModule,
MatToolbarModule, MatCardModule,
MatIconModule, MatCheckboxModule,
MatAutocompleteModule, MatStepperModule,
MatBadgeModule, MatDialogModule,
MatBottomSheetModule, MatDividerModule,
MatButtonModule, MatExpansionModule,
MatButtonToggleModule, MatInputModule,
MatCardModule, MatListModule,
MatCheckboxModule, MatMenuModule,
MatStepperModule, MatNativeDateModule,
MatDialogModule, MatRadioModule,
MatDividerModule, MatRippleModule,
MatExpansionModule, MatSelectModule,
MatInputModule, MatSliderModule,
MatListModule, MatSlideToggleModule,
MatMenuModule, MatSnackBarModule,
MatNativeDateModule, MatTooltipModule,
MatRadioModule, MatFormFieldModule,
MatRippleModule, MatTabsModule,
MatSelectModule, ClipboardModule], providers: [{ provide: APP_ID, useValue: 'ng-cli-universal' }, provideHttpClient(withInterceptorsFromDi())] })
MatSliderModule,
MatSlideToggleModule,
MatSnackBarModule,
MatTooltipModule,
MatFormFieldModule,
MatTabsModule,
ClipboardModule,
],
providers: [{ provide: APP_ID, useValue: 'ng-cli-universal' }],
bootstrap: [AppComponent],
})
export class AppModule {} export class AppModule {}

View File

@ -13,15 +13,15 @@
// Define the palettes for your theme using the Material Design palettes available in palette.scss // Define the palettes for your theme using the Material Design palettes available in palette.scss
// (imported above). For each palette, you can optionally specify a default, lighter, and darker // (imported above). For each palette, you can optionally specify a default, lighter, and darker
// hue. Available color palettes: https://material.io/design/color/ // hue. Available color palettes: https://material.io/design/color/
$db-primary: mat.define-palette(mat.$indigo-palette); $db-primary: mat.m2-define-palette(mat.$m2-indigo-palette);
$db-accent: mat.define-palette(mat.$pink-palette, A200, A100, A400); $db-accent: mat.m2-define-palette(mat.$m2-pink-palette, A200, A100, A400);
// The warn palette is optional (defaults to red). // The warn palette is optional (defaults to red).
$db-warn: mat.define-palette(mat.$red-palette); $db-warn: mat.m2-define-palette(mat.$m2-red-palette);
// Create the theme object. A theme consists of configurations for individual // Create the theme object. A theme consists of configurations for individual
// theming systems such as "color" or "typography". // theming systems such as "color" or "typography".
$db-theme: mat.define-light-theme( $db-theme: mat.m2-define-light-theme(
( (
color: ( color: (
primary: $db-primary, primary: $db-primary,

View File

@ -5,7 +5,7 @@
"outDir": "./dist/out-tsc", "outDir": "./dist/out-tsc",
"sourceMap": true, "sourceMap": true,
"declaration": false, "declaration": false,
"downlevelIteration": true, "esModuleInterop": true,
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"moduleResolution": "node", "moduleResolution": "node",