Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(rxjs): upgrade rxjs to v7 #685

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 31 additions & 50 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,20 @@
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-sourcemaps": "^0.6.3",
"rollup-plugin-typescript2": "^0.34.1",
"rxjs": "6.6.7",
"rxjs": "^7.8.1",
"semantic-release": "19.0.5",
"ts-jest": "^26.5.6",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0",
"typedoc": "^0.22.17",
"typescript": "^4.0.5"
"typescript": "^4.2"
},
"dependencies": {
"lodash-es": "^4.17.21"
},
"peerDependencies": {
"core-js": "^3.6.5",
"rxjs": "^6.5.5"
"rxjs": "^7.0.0"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions src/model/events/before-model-destroyed-event.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Observable } from 'rxjs';
import { filter, mapTo, take } from 'rxjs/operators';
import { filter, map, take } from 'rxjs/operators';
import { DashboardEvent } from '../../communication/dashboard-event';
import { DashboardEventManager } from '../../communication/dashboard-event-manager';

Expand All @@ -20,7 +20,7 @@ export class BeforeModelDestroyedEvent extends DashboardEvent<object> {
public getBeforeDestructionObservable(model: object): Observable<void> {
return this.getObservable().pipe(
filter(destroyedModel => destroyedModel === model),
mapTo(undefined),
map(() => undefined),
take(1)
);
}
Expand Down
5 changes: 2 additions & 3 deletions src/variable/evaluator/variable-evaluator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ export class VariableEvaluator<T = unknown> {
};

try {
const value = this.convertNodeToValue(this.parser.parse(), dictionary) as T;
result.value = value;
result.value = this.convertNodeToValue(this.parser.parse(), dictionary) as T;
} catch (e) {
result.error = e && (e as Error).message;
result.error = (e as Error)?.message;
}

const variablesAfterEvaluate = [...this.variableNamesFromLastEvaluate];
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"moduleResolution": "node",
"module": "esNext",
"target": "es5",
"target": "ES6",
"lib": ["es2015", "es2016", "es2017", "esnext.array", "dom"],
"strict": true,
"sourceMap": true,
Expand Down