feat: update rxjs to 7 step 1

This commit is contained in:
Johannes Millan 2025-11-17 11:49:47 +01:00
parent 27a88ac771
commit 706a557e86
10 changed files with 37 additions and 152 deletions

135
package-lock.json generated
View file

@ -104,7 +104,7 @@
"ical.js": "^2.1.0",
"idb": "^8.0.3",
"jasmine-core": "^5.10.0",
"jasmine-marbles": "^0.8.4",
"jasmine-marbles": "^0.9.2",
"jasmine-spec-reporter": "~7.0.0",
"jira2md": "git+https://github.com/johannesjo/J2M.git",
"karma": "~6.4.2",
@ -123,7 +123,7 @@
"prettier": "^3.5.1",
"pretty-quick": "^4.1.1",
"query-string": "^7.1.3",
"rxjs": "^6.6.7",
"rxjs": "^7.8.2",
"shepherd.js": "^11.2.0",
"spark-md5": "^3.0.2",
"stacktrace-js": "^2.0.2",
@ -441,15 +441,6 @@
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/@angular-builders/common/node_modules/rxjs": {
"version": "7.8.2",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz",
"integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==",
"dev": true,
"dependencies": {
"tslib": "^2.1.0"
}
},
"node_modules/@angular-builders/common/node_modules/tsconfig-paths": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz",
@ -546,15 +537,6 @@
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/@angular-builders/custom-webpack/node_modules/rxjs": {
"version": "7.8.2",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz",
"integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==",
"dev": true,
"dependencies": {
"tslib": "^2.1.0"
}
},
"node_modules/@angular-devkit/architect": {
"version": "0.2003.7",
"resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.2003.7.tgz",
@ -646,16 +628,6 @@
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/@angular-devkit/architect/node_modules/rxjs": {
"version": "7.8.2",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz",
"integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"tslib": "^2.1.0"
}
},
"node_modules/@angular-devkit/architect/node_modules/source-map": {
"version": "0.7.6",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz",
@ -987,16 +959,6 @@
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/@angular-devkit/build-angular/node_modules/rxjs": {
"version": "7.8.2",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz",
"integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"tslib": "^2.1.0"
}
},
"node_modules/@angular-devkit/build-angular/node_modules/source-map": {
"version": "0.7.6",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz",
@ -1061,16 +1023,6 @@
"webpack-dev-server": "^5.0.2"
}
},
"node_modules/@angular-devkit/build-webpack/node_modules/rxjs": {
"version": "7.8.2",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz",
"integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"tslib": "^2.1.0"
}
},
"node_modules/@angular-devkit/schematics": {
"version": "20.3.7",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-20.3.7.tgz",
@ -1278,16 +1230,6 @@
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/@angular-devkit/schematics/node_modules/rxjs": {
"version": "7.8.2",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz",
"integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"tslib": "^2.1.0"
}
},
"node_modules/@angular-devkit/schematics/node_modules/source-map": {
"version": "0.7.6",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz",
@ -1408,15 +1350,6 @@
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/@angular-eslint/builder/node_modules/rxjs": {
"version": "7.8.2",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz",
"integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==",
"dev": true,
"dependencies": {
"tslib": "^2.1.0"
}
},
"node_modules/@angular-eslint/bundled-angular-compiler": {
"version": "20.5.0",
"resolved": "https://registry.npmjs.org/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-20.5.0.tgz",
@ -1549,14 +1482,6 @@
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/@angular-eslint/schematics/node_modules/rxjs": {
"version": "7.8.2",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"tslib": "^2.1.0"
}
},
"node_modules/@angular-eslint/schematics/node_modules/semver": {
"version": "7.7.3",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
@ -2075,16 +2000,6 @@
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/@angular/cli/node_modules/rxjs": {
"version": "7.8.2",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz",
"integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"tslib": "^2.1.0"
}
},
"node_modules/@angular/cli/node_modules/source-map": {
"version": "0.7.6",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz",
@ -8403,16 +8318,6 @@
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/@schematics/angular/node_modules/rxjs": {
"version": "7.8.2",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz",
"integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"tslib": "^2.1.0"
}
},
"node_modules/@schematics/angular/node_modules/source-map": {
"version": "0.7.6",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz",
@ -16937,14 +16842,6 @@
"node": ">=8"
}
},
"node_modules/inquirer/node_modules/rxjs": {
"version": "7.8.2",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"tslib": "^2.1.0"
}
},
"node_modules/inquirer/node_modules/signal-exit": {
"version": "3.0.7",
"dev": true,
@ -17699,14 +17596,16 @@
"license": "MIT"
},
"node_modules/jasmine-marbles": {
"version": "0.8.4",
"version": "0.9.2",
"resolved": "https://registry.npmjs.org/jasmine-marbles/-/jasmine-marbles-0.9.2.tgz",
"integrity": "sha512-T7RjG4fRsdiGGzbQZ6Kj39qYt6O1/KIcR4FkUNsD3DUGkd/AzpwzN+xtk0DXlLWEz5BaVdK1SzMgQDVw879c4Q==",
"dev": true,
"license": "MIT",
"dependencies": {
"lodash": "^4.17.20"
},
"peerDependencies": {
"rxjs": "^6.5.3"
"rxjs": "^7.0.0"
}
},
"node_modules/jasmine-spec-reporter": {
@ -22774,21 +22673,15 @@
"optional": true
},
"node_modules/rxjs": {
"version": "6.6.7",
"version": "7.8.2",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz",
"integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"tslib": "^1.9.0"
},
"engines": {
"npm": ">=2.0.0"
"tslib": "^2.1.0"
}
},
"node_modules/rxjs/node_modules/tslib": {
"version": "1.14.1",
"dev": true,
"license": "0BSD"
},
"node_modules/safe-array-concat": {
"version": "1.1.2",
"dev": true,
@ -25722,14 +25615,6 @@
"node": ">=12.0.0"
}
},
"node_modules/wait-on/node_modules/rxjs": {
"version": "7.8.1",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"tslib": "^2.1.0"
}
},
"node_modules/watchpack": {
"version": "2.4.4",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.4.tgz",

View file

@ -217,7 +217,7 @@
"ical.js": "^2.1.0",
"idb": "^8.0.3",
"jasmine-core": "^5.10.0",
"jasmine-marbles": "^0.8.4",
"jasmine-marbles": "^0.9.2",
"jasmine-spec-reporter": "~7.0.0",
"jira2md": "git+https://github.com/johannesjo/J2M.git",
"karma": "~6.4.2",
@ -236,7 +236,7 @@
"prettier": "^3.5.1",
"pretty-quick": "^4.1.1",
"query-string": "^7.1.3",
"rxjs": "^6.6.7",
"rxjs": "^7.8.2",
"shepherd.js": "^11.2.0",
"spark-md5": "^3.0.2",
"stacktrace-js": "^2.0.2",

View file

@ -126,7 +126,7 @@ export class IdleEffects {
handleIdleInit$ = createEffect(() =>
this._store.select(selectIsIdle).pipe(
distinctUntilChanged(),
switchMap((isIdle) => iif(() => isIdle, of(isIdle))),
switchMap((isIdle) => iif(() => isIdle, of(isIdle), EMPTY)),
withLatestFrom(
this._store.select(selectIdleTime),
this._simpleCounterService.enabledSimpleStopWatchCounters$,

View file

@ -118,9 +118,7 @@ export class IssueService {
this.ISSUE_REFRESH_MAP[issueProviderId][id] = new Subject<IssueData>();
}
return from(this.ISSUE_SERVICE_MAP[issueType].getById(id, issueProviderId)).pipe(
switchMap((issue) =>
merge<IssueData | null>(of(issue), this.ISSUE_REFRESH_MAP[issueProviderId][id]),
),
switchMap((issue) => merge(of(issue), this.ISSUE_REFRESH_MAP[issueProviderId][id])),
);
}

View file

@ -23,7 +23,7 @@ import { JiraCfg } from './jira.model';
import { IPC } from '../../../../../../electron/shared-with-frontend/ipc-events.const';
import { SnackService } from '../../../../core/snack/snack.service';
import { HANDLED_ERROR_PROP_STR, IS_ELECTRON } from '../../../../app.constants';
import { Observable, of, throwError } from 'rxjs';
import { from, Observable, of, throwError } from 'rxjs';
import { SearchResultItem } from '../../issue.model';
import {
catchError,
@ -40,7 +40,6 @@ import { BannerService } from '../../../../core/banner/banner.service';
import { BannerId } from '../../../../core/banner/banner.model';
import { T } from '../../../../t.const';
import { stringify } from 'query-string';
import { fromPromise } from 'rxjs/internal-compatibility';
import { getErrorTxt } from '../../../../util/get-error-text';
import { isOnline } from '../../../../util/is-online';
import { GlobalProgressBarService } from '../../../../core-ui/global-progress-bar/global-progress-bar.service';
@ -515,7 +514,7 @@ export class JiraApiService {
requestToSend,
);
} else if (IS_ANDROID_WEB_VIEW) {
return fromPromise(
return from(
fetch(url, requestInit)
.then((response) => response.body)
.then(streamToJsonIfPossible as any)
@ -541,7 +540,7 @@ export class JiraApiService {
}
this._globalProgressBarService.countUp(url);
return fromPromise(promise).pipe(
return from(promise).pipe(
catchError((err) => {
IssueLog.log(err);
IssueLog.log(getErrorTxt(err));

View file

@ -176,7 +176,7 @@ export class DialogOpenProjectTrackTimeComponent implements OnDestroy {
}
ngOnDestroy(): void {
this._onDestroy$.next();
this._onDestroy$.next(undefined);
}
close(): void {

View file

@ -139,7 +139,7 @@ export class SimpleCounterButtonComponent implements OnDestroy, OnInit {
countUpAndNextRepeatCountdownSession(): void {
this._bannerService.dismiss(BannerId.SimpleCounterCountdownComplete);
this.toggleCounter();
this._resetCountdown$.next();
this._resetCountdown$.next(undefined);
this.isTimeUp.set(false);
}

View file

@ -8,7 +8,7 @@ import { selectAllProjects } from '../project/store/project.selectors';
import { selectAllTags } from '../tag/store/tag.reducer';
import { getTomorrow } from '../../util/get-tomorrow';
import { getDbDateStr } from '../../util/get-db-date-str';
import { of } from 'rxjs';
import { Observable, of } from 'rxjs';
import { WorkContextType } from '../work-context/work-context.model';
import { WorkContextService } from '../work-context/work-context.service';
import { ProjectService } from '../project/project.service';
@ -19,8 +19,8 @@ describe('TaskViewCustomizerService', () => {
let mockWorkContextService: {
activeWorkContextId: string | null;
activeWorkContextType: WorkContextType | null;
todaysTasks$: ReturnType<typeof of<TaskWithSubTasks[]>>;
undoneTasks$: ReturnType<typeof of<TaskWithSubTasks[]>>;
todaysTasks$: Observable<TaskWithSubTasks[]>;
undoneTasks$: Observable<TaskWithSubTasks[]>;
};
let projectUpdateSpy: jasmine.Spy;
let tagUpdateSpy: jasmine.Spy;
@ -103,8 +103,8 @@ describe('TaskViewCustomizerService', () => {
mockWorkContextService = {
activeWorkContextId: null,
activeWorkContextType: null,
todaysTasks$: of([]),
undoneTasks$: of([]),
todaysTasks$: of<TaskWithSubTasks[]>([]),
undoneTasks$: of<TaskWithSubTasks[]>([]),
};
projectUpdateSpy = jasmine.createSpy('update');
tagUpdateSpy = jasmine.createSpy('updateTag');
@ -352,8 +352,8 @@ describe('TaskViewCustomizerService', () => {
const taskB = createTask('b', 'Bravo');
mockWorkContextService.activeWorkContextId = 'project-sort';
mockWorkContextService.activeWorkContextType = WorkContextType.PROJECT;
mockWorkContextService.todaysTasks$ = of([taskB, taskA]);
mockWorkContextService.undoneTasks$ = of([taskB, taskA]);
mockWorkContextService.todaysTasks$ = of<TaskWithSubTasks[]>([taskB, taskA]);
mockWorkContextService.undoneTasks$ = of<TaskWithSubTasks[]>([taskB, taskA]);
service.setSort('name');
service.setFilter('tag');
@ -378,8 +378,8 @@ describe('TaskViewCustomizerService', () => {
const taskB = createTask('b', 'Bravo', null);
mockWorkContextService.activeWorkContextId = 'tag-sort';
mockWorkContextService.activeWorkContextType = WorkContextType.TAG;
mockWorkContextService.todaysTasks$ = of([taskB, taskA]);
mockWorkContextService.undoneTasks$ = of([taskB, taskA]);
mockWorkContextService.todaysTasks$ = of<TaskWithSubTasks[]>([taskB, taskA]);
mockWorkContextService.undoneTasks$ = of<TaskWithSubTasks[]>([taskB, taskA]);
await service.sortPermanent('name');
@ -393,8 +393,8 @@ describe('TaskViewCustomizerService', () => {
it('should skip persistence when default sorting is requested but still reset', async () => {
mockWorkContextService.activeWorkContextId = 'project-sort';
mockWorkContextService.activeWorkContextType = WorkContextType.PROJECT;
mockWorkContextService.todaysTasks$ = of([]);
mockWorkContextService.undoneTasks$ = of([]);
mockWorkContextService.todaysTasks$ = of<TaskWithSubTasks[]>([]);
mockWorkContextService.undoneTasks$ = of<TaskWithSubTasks[]>([]);
service.setSort('name');

View file

@ -27,6 +27,7 @@ describe('AddTaskBarComponent Mentions Integration', () => {
let component: AddTaskBarComponent;
let fixture: ComponentFixture<TestHostComponent>;
let tagsSubject: BehaviorSubject<any>;
let miscSubject: BehaviorSubject<any>;
const validTags: Tag[] = [
{ id: '1', title: 'UX', color: '#ff0000', theme: { primary: '#ff0000' } } as Tag,
@ -61,6 +62,7 @@ describe('AddTaskBarComponent Mentions Integration', () => {
];
beforeEach(async () => {
miscSubject = new BehaviorSubject({ defaultProjectId: null });
const taskServiceSpy = jasmine.createSpyObj('TaskService', [
'add',
'getByIdOnce$',
@ -90,6 +92,7 @@ describe('AddTaskBarComponent Mentions Integration', () => {
isEnableDue: true,
isEnableProject: true,
}),
misc$: miscSubject,
});
const addTaskBarIssueSearchServiceSpy = jasmine.createSpyObj(
'AddTaskBarIssueSearchService',

View file

@ -92,7 +92,7 @@ export class TimeTrackingService {
await this._pfapiService.m.archiveYoung.save(archiveYoung, {
isUpdateRevAndLastUpdate: true,
});
this._archiveYoungUpdateTrigger$.next();
this._archiveYoungUpdateTrigger$.next(undefined);
}
if (projectId in archiveOld.timeTracking.project) {
@ -100,7 +100,7 @@ export class TimeTrackingService {
await this._pfapiService.m.archiveOld.save(archiveOld, {
isUpdateRevAndLastUpdate: true,
});
this._archiveOldUpdateTrigger$.next();
this._archiveOldUpdateTrigger$.next(undefined);
}
}
@ -127,7 +127,7 @@ export class TimeTrackingService {
await this._pfapiService.m.archiveYoung.save(archiveYoung, {
isUpdateRevAndLastUpdate: true,
});
this._archiveYoungUpdateTrigger$.next();
this._archiveYoungUpdateTrigger$.next(undefined);
}
if (tagId in archiveOld.timeTracking.tag) {
@ -135,7 +135,7 @@ export class TimeTrackingService {
await this._pfapiService.m.archiveOld.save(archiveOld, {
isUpdateRevAndLastUpdate: true,
});
this._archiveOldUpdateTrigger$.next();
this._archiveOldUpdateTrigger$.next(undefined);
}
}