Skip to content

Commit dc086ca

Browse files
committed
Merge branch 'staging'
2 parents 0e73fa0 + f865e8f commit dc086ca

File tree

10 files changed

+8657
-6224
lines changed

10 files changed

+8657
-6224
lines changed

.husky/pre-commit

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
41
# npm test
52
npx lint-staged

eslint.config.mjs

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import { FlatCompat } from "@eslint/eslintrc";
2+
import js from "@eslint/js";
3+
import typescriptEslint from "@typescript-eslint/eslint-plugin";
4+
import tsParser from "@typescript-eslint/parser";
5+
import globals from "globals";
6+
import path from "node:path";
7+
import { fileURLToPath } from "node:url";
8+
9+
const __filename = fileURLToPath(import.meta.url);
10+
const __dirname = path.dirname(__filename);
11+
const compat = new FlatCompat({
12+
baseDirectory: __dirname,
13+
recommendedConfig: js.configs.recommended,
14+
allConfig: js.configs.all
15+
});
16+
17+
export default [
18+
...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"),
19+
{
20+
plugins: {
21+
"@typescript-eslint": typescriptEslint,
22+
},
23+
24+
languageOptions: {
25+
globals: {
26+
...globals.browser,
27+
...globals.node,
28+
},
29+
30+
parser: tsParser,
31+
ecmaVersion: "latest",
32+
sourceType: "module",
33+
},
34+
35+
rules: {
36+
indent: ["error", 4],
37+
"linebreak-style": ["error", "unix"],
38+
quotes: ["error", "double"],
39+
semi: ["error", "always"],
40+
"@typescript-eslint/no-explicit-any": "off",
41+
"@typescript-eslint/no-unused-vars": "off",
42+
"@typescript-eslint/no-inferrable-types": ["warn", {
43+
ignoreParameters: true,
44+
ignoreProperties: true,
45+
}],
46+
},
47+
},
48+
];

package-lock.json

Lines changed: 8549 additions & 6166 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -21,76 +21,78 @@
2121
},
2222
"private": true,
2323
"dependencies": {
24-
"@angular/animations": "^17.3.0",
25-
"@angular/common": "^17.3.0",
26-
"@angular/compiler": "^17.3.0",
27-
"@angular/core": "^17.3.0",
28-
"@angular/fire": "^17.0.1",
29-
"@angular/forms": "^17.3.0",
30-
"@angular/platform-browser": "^17.3.0",
31-
"@angular/platform-browser-dynamic": "^17.3.0",
32-
"@angular/router": "^17.3.0",
24+
"@angular/animations": "^18.2.13",
25+
"@angular/common": "^18.2.13",
26+
"@angular/compiler": "^18.2.13",
27+
"@angular/core": "^18.2.13",
28+
"@angular/fire": "^18.0.1",
29+
"@angular/forms": "^18.2.13",
30+
"@angular/platform-browser": "^18.2.13",
31+
"@angular/platform-browser-dynamic": "^18.2.13",
32+
"@angular/router": "^18.2.13",
3333
"@antv/g2": "^5.1.6",
3434
"@antv/g2plot": "^2.4.23",
3535
"@antv/l7": "^2.21.10",
3636
"@antv/l7-maps": "^2.21.10",
3737
"@antv/scale": "^0.3.11",
3838
"@apollo/client": "^3.8.4",
3939
"@devui-design/icons": "^1.3.0",
40-
"@sentry/angular-ivy": "^7.61.0",
40+
"@sentry/angular": "^8.47.0",
4141
"@sentry/cli": "^2.23.1",
4242
"@sentry/replay": "^7.24.2",
4343
"@sentry/tracing": "^7.7.0",
4444
"@supercharge/promise-pool": "^3.0.0",
4545
"angular-build-info": "^2.0.1",
46-
"apollo-angular": "^6.0.0",
46+
"apollo-angular": "^8.0.0",
4747
"csvtojson": "^2.0.10",
48-
"emoji-toolkit": "^8.0.0",
48+
"emoji-toolkit": "^9.0.0",
4949
"firebase": "^10.0.0",
5050
"first-input-delay": "^0.1.3",
5151
"graphql": "^16.8.1",
5252
"gtfs": "^4.10.4",
5353
"gtfs-realtime-bindings": "^1.1.1",
5454
"jszip": "^3.10.1",
5555
"marked": "^9.0.0",
56-
"mermaid": "^10.6.0",
57-
"ng-devui": "^17.0.0",
56+
"mermaid": "^11.0.0",
57+
"ng-devui": "^18.0.0",
5858
"ng-in-viewport": "^16.0.0",
59-
"ng-recaptcha": "^13.0.0",
60-
"ng-zorro-antd": "^17.3.0",
61-
"ngx-markdown": "^17.0.0",
62-
"rxjs": "^7.4.0",
59+
"ng-recaptcha-2": "^14.0.0",
60+
"ng-zorro-antd": "^18.2.1",
61+
"ngx-markdown": "^18.0.0",
62+
"rxjs": "^6.5.3 || ^7.4.0",
6363
"tslib": "^2.3.0",
6464
"zone.js": "~0.14.4"
6565
},
6666
"devDependencies": {
67-
"@angular-builders/custom-webpack": "^17.0.0",
68-
"@angular-devkit/build-angular": "^17.3.0",
69-
"@angular/cli": "^17.3.0",
70-
"@angular/compiler-cli": "^17.3.0",
71-
"@codecov/webpack-plugin": "^0.0.1-beta.10",
67+
"@angular-builders/custom-webpack": "^18.0.0",
68+
"@angular-devkit/build-angular": "^18.2.12",
69+
"@angular/cli": "^18.2.12",
70+
"@angular/compiler-cli": "^18.2.13",
71+
"@codecov/webpack-plugin": "^1.6.0",
72+
"@eslint/eslintrc": "^3.2.0",
73+
"@eslint/js": "^9.17.0",
7274
"@sentry/webpack-plugin": "^2.5.0",
7375
"@types/geojson": "^7946.0.14",
7476
"@types/jasmine": "~5.1.4",
7577
"@types/mapbox-gl": "^3.1.0",
7678
"@types/node": "^20.0.0",
77-
"@types/react-dom": "^18.0.9",
78-
"@typescript-eslint/eslint-plugin": "^7.2.0",
79-
"@typescript-eslint/parser": "^7.2.0",
80-
"eslint": "^8.20.0",
79+
"@typescript-eslint/eslint-plugin": "^8.18.0",
80+
"@typescript-eslint/parser": "^8.18.0",
81+
"eslint": "^9.17.0",
8182
"eslint-config-prettier": "^9.0.0",
82-
"eslint-plugin-json": "^3.1.0",
83+
"eslint-plugin-json": "^4.0.0",
84+
"globals": "^15.14.0",
8385
"gtfs-types": "^4.0.0",
8486
"husky": "^9.0.0",
85-
"jasmine-core": "~5.1.2",
87+
"jasmine-core": "~5.5.0",
8688
"karma": "~6.4.0",
8789
"karma-chrome-launcher": "^3.1.0",
8890
"karma-coverage": "~2.2.0",
8991
"karma-jasmine": "~5.1.0",
9092
"karma-jasmine-html-reporter": "^2.0.0",
9193
"lint-staged": "^15.0.3",
9294
"prettier": "^3.0.0",
93-
"typescript": "^5.4.2",
95+
"typescript": ">=5.4.0 <5.6.0",
9496
"webpack-bundle-analyzer": "^4.10.2"
9597
}
9698
}

src/app/app.module.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
RecaptchaFormsModule,
66
RecaptchaV3Module,
77
ReCaptchaV3Service,
8-
} from "ng-recaptcha";
8+
} from "ng-recaptcha-2";
99
import { NzAlertModule } from "ng-zorro-antd/alert";
1010
import { NzDrawerService } from "ng-zorro-antd/drawer";
1111
import { en_US, NZ_I18N } from "ng-zorro-antd/i18n";
@@ -16,7 +16,7 @@ import { NzNotificationModule } from "ng-zorro-antd/notification";
1616
import { MarkdownModule, provideMarkdown } from "ngx-markdown";
1717

1818
import { registerLocaleData } from "@angular/common";
19-
import { HttpClientModule } from "@angular/common/http";
19+
import { provideHttpClient } from "@angular/common/http";
2020
import en from "@angular/common/locales/en";
2121
import { APP_INITIALIZER, ErrorHandler, NgModule } from "@angular/core";
2222
import {
@@ -34,9 +34,8 @@ import { getStorage, provideStorage } from "@angular/fire/storage";
3434
import { BrowserModule } from "@angular/platform-browser";
3535
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
3636
import { Router } from "@angular/router";
37-
import * as Sentry from "@sentry/angular-ivy";
37+
import * as Sentry from "@sentry/angular";
3838

39-
// import build from "../build";
4039
import { environment } from "../environments/environment";
4140
import { FooterComponent } from "./@ui/footer/footer.component";
4241
import { AppRoutingModule } from "./app-routing.module";
@@ -51,7 +50,6 @@ const imports: any[] = [
5150
// Angular
5251
BrowserAnimationsModule,
5352
BrowserModule,
54-
HttpClientModule,
5553

5654
// DevUI
5755
DevUIModule,
@@ -87,7 +85,7 @@ const providers: any[] = [
8785
},
8886
{
8987
provide: APP_INITIALIZER,
90-
// eslint-disable-next-line @typescript-eslint/no-empty-function
88+
9189
useFactory: () => () => {},
9290
deps: [Sentry.TraceService],
9391
multi: true,
@@ -107,6 +105,7 @@ const providers: any[] = [
107105
provideDatabase(() => getDatabase()),
108106
provideStorage(() => getStorage()),
109107
provideMarkdown(),
108+
provideHttpClient(),
110109
NzModalService,
111110
NzImageService,
112111
NzDrawerService,

src/app/console/events-table/events-table.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ export class ConsoleEventsTableComponent implements OnInit, OnDestroy {
243243
return !rows.includes(elem.id);
244244
});
245245
}
246-
this.showLoading = loading;
246+
this.showLoading = loading ?? false;
247247
});
248248
}
249249

src/app/console/services/mark-read.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Apollo, gql } from "apollo-angular";
2-
import { ReCaptchaV3Service } from "ng-recaptcha";
2+
import { ReCaptchaV3Service } from "ng-recaptcha-2";
33
import { firstValueFrom } from "rxjs";
44
import { AuthService } from "src/app/services/auth.service";
55

src/app/header/menu/menu.component.ts

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
Output,
1212
} from "@angular/core";
1313
import { Router } from "@angular/router";
14-
import * as Sentry from "@sentry/angular-ivy";
14+
import * as Sentry from "@sentry/angular";
1515

1616
@Component({
1717
selector: "d-header-menu",
@@ -29,8 +29,11 @@ export class MenuComponent implements OnInit, OnDestroy {
2929

3030
hadUpload: boolean = false;
3131

32-
constructor(public router: Router, private themeService: ThemeService,
33-
private imageUploadService: ImageUploadService) {
32+
constructor(
33+
public router: Router,
34+
private themeService: ThemeService,
35+
private imageUploadService: ImageUploadService
36+
) {
3437
return;
3538
}
3639

@@ -46,13 +49,13 @@ export class MenuComponent implements OnInit, OnDestroy {
4649
(count) => {
4750
this.countIcon = count;
4851

49-
if(!this.hadUpload && count > 0) {
52+
if (!this.hadUpload && count > 0) {
5053
this.hadUpload = true;
5154
}
5255
}
5356
);
5457
}
55-
58+
5659
ngOnDestroy(): void {
5760
this.$countIcon?.unsubscribe();
5861
}
@@ -72,12 +75,13 @@ export class MenuComponent implements OnInit, OnDestroy {
7275
this.curLanguage = lang;
7376
}
7477

75-
reportBug(): void {
76-
const feedback = Sentry.feedbackIntegration();
77-
feedback.openDialog();
78+
async reportBug(): Promise<void> {
79+
const form = await Sentry.feedbackIntegration().createForm();
80+
form.appendToDom();
81+
form.open();
7882
}
7983

80-
toggleTheme(): void{
84+
toggleTheme(): void {
8185
this.themeService.toggleTheme();
8286
}
8387
}

src/app/profile/spottings/spottings.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
LoadingModule,
66
TableWidthConfig,
77
} from "ng-devui";
8-
import { ReCaptchaV3Service } from "ng-recaptcha";
8+
import { ReCaptchaV3Service } from "ng-recaptcha-2";
99
import { NzToolTipModule } from "ng-zorro-antd/tooltip";
1010
import { firstValueFrom, lastValueFrom, Subscription } from "rxjs";
1111
import {

src/main.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { galaxyTheme, infinityTheme } from "ng-devui/theme-collection";
55

66
import { enableProdMode } from "@angular/core";
77
import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
8-
import * as Sentry from "@sentry/angular-ivy";
8+
import * as Sentry from "@sentry/angular";
99

1010
import { AppModule } from "./app/app.module";
1111
import { environment } from "./environments/environment";
@@ -15,13 +15,13 @@ Sentry.init({
1515
tunnel: environment.sentry.tunnel,
1616
environment: environment.sentry.environment,
1717
integrations: [
18-
Sentry.browserTracingIntegration({
19-
tracingOrigins: environment.sentry.tracingOrigins,
20-
_experiments: {
21-
enableInteractions: true,
22-
}
23-
}),
18+
Sentry.browserTracingIntegration(),
2419
Sentry.replayIntegration(),
20+
Sentry.feedbackIntegration({
21+
// Additional SDK configuration goes in here, for example:
22+
colorScheme: "system",
23+
autoInject: false,
24+
}),
2525
],
2626

2727
// Set tracesSampleRate to 1.0 to capture 100%

0 commit comments

Comments
 (0)