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

web-ui: Fix X9Developers/block-explorer#55 by upgrading dependencies #61

Merged
merged 4 commits into from
Oct 22, 2018
Merged

Conversation

esuau
Copy link
Contributor

@esuau esuau commented Oct 18, 2018

Problem

Resolve GitHub vulnerability warning related to angular
Running npm audit found 54 vulnerability issues related to dependencies, mostly caused by the use of outdated versions.

Solution

I ran npm audit fix and npm audit fix --force to fix the vulnerabilities, which forced me to upgrade to the latest version of Angular following the Angular Update Guide. I also had to upgrade all other dependencies related to Angular (6). I installed rxjs-compat to keep the application compatible with RxJS 6. I added moment to dependencies, as requested by the new version of ngx-moment. Finally, I adapted the path to NgHttpLoaderModule in app.module.ts corresponding to the new version of ng-http-loader.

Copy link
Collaborator

@AlexITC AlexITC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some minor comments / questions, also, i wonder if you tested the whether the UI flows work as expected.

Thanks.

web-ui/angular.json Show resolved Hide resolved
web-ui/karma.conf.js Outdated Show resolved Hide resolved
web-ui/tslint.json Show resolved Hide resolved
@AlexITC
Copy link
Collaborator

AlexITC commented Oct 18, 2018

Everything looks good to me, I'll test the app with your changes before merging the PR, thanks!

@AlexITC
Copy link
Collaborator

AlexITC commented Oct 21, 2018

@esuau I tried running the project and there are some issues, I can remember that the main view doesn't display the latest blocks, nor, the address view seems to work.

From the main view, I see this on the developer console, could you please try to fix the issues?

ERROR TypeError: "rxjs_Observable__WEBPACK_IMPORTED_MODULE_2__.Observable.of is not a function"
updateBlockshttp://localhost:4200/main.js:1505:30ngOnInithttp://localhost:4200/main.js:1489:9checkAndUpdateDirectiveInlinehttp://localhost:4200/vendor.js:48060:9checkAndUpdateNodeInlinehttp://localhost:4200/vendor.js:49324:20checkAndUpdateNodehttp://localhost:4200/vendor.js:49286:16debugCheckAndUpdateNodehttp://localhost:4200/vendor.js:49919:19debugCheckDirectivesFnhttp://localhost:4200/vendor.js:49879:13View_HomeComponent_1ng:///AppModule/HomeComponent.ngfactory.js:12:5debugUpdateDirectiveshttp://localhost:4200/vendor.js:49871:12checkAndUpdateViewhttp://localhost:4200/vendor.js:49268:5callViewActionhttp://localhost:4200/vendor.js:49509:21execEmbeddedViewsActionhttp://localhost:4200/vendor.js:49472:17checkAndUpdateViewhttp://localhost:4200/vendor.js:49269:5callViewActionhttp://localhost:4200/vendor.js:49509:21execComponentViewsActionhttp://localhost:4200/vendor.js:49451:13checkAndUpdateViewhttp://localhost:4200/vendor.js:49274:5callViewActionhttp://localhost:4200/vendor.js:49509:21execEmbeddedViewsActionhttp://localhost:4200/vendor.js:49472:17checkAndUpdateViewhttp://localhost:4200/vendor.js:49269:5callViewActionhttp://localhost:4200/vendor.js:49509:21execComponentViewsActionhttp://localhost:4200/vendor.js:49451:13checkAndUpdateViewhttp://localhost:4200/vendor.js:49274:5callWithDebugContexthttp://localhost:4200/vendor.js:50161:22debugCheckAndUpdateViewhttp://localhost:4200/vendor.js:49839:12detectChangeshttp://localhost:4200/vendor.js:47655:13tickhttp://localhost:4200/vendor.js:43388:58tickhttp://localhost:4200/vendor.js:43388:13nexthttp://localhost:4200/vendor.js:43279:99invokehttp://localhost:4200/polyfills.js:2710:17onInvokehttp://localhost:4200/vendor.js:42637:24invokehttp://localhost:4200/polyfills.js:2709:17runhttp://localhost:4200/polyfills.js:2460:24runhttp://localhost:4200/vendor.js:42551:16nexthttp://localhost:4200/vendor.js:43279:69schedulerFnhttp://localhost:4200/vendor.js:42368:36__tryOrUnsubhttp://localhost:4200/vendor.js:119778:13nexthttp://localhost:4200/vendor.js:119716:17_nexthttp://localhost:4200/vendor.js:119660:9nexthttp://localhost:4200/vendor.js:119637:13nexthttp://localhost:4200/vendor.js:119403:17emithttp://localhost:4200/vendor.js:42352:54checkStablehttp://localhost:4200/vendor.js:42606:13onHasTaskhttp://localhost:4200/vendor.js:42650:21hasTaskhttp://localhost:4200/polyfills.js:2763:21_updateTaskCounthttp://localhost:4200/polyfills.js:2783:17_updateTaskCounthttp://localhost:4200/polyfills.js:2607:17runTaskhttp://localhost:4200/polyfills.js:2527:25drainMicroTaskQueuehttp://localhost:4200/polyfills.js:2917:25 HomeComponent.html:9:10
ERROR CONTEXT 
Object { view: {…}, nodeIndex: 0, nodeDef: {…}, elDef: {…}, elView: {…} }
HomeComponent.html:9:10
View_HomeComponent_1
HomeComponent.html:9:10
./node_modules/@angular/core/fesm5/core.js/DebugContext_.prototype.logError
core.js:11306
./node_modules/@angular/core/fesm5/core.js/ErrorHandler.prototype.handleError
core.js:1724
./node_modules/@angular/core/fesm5/core.js/ApplicationRef.prototype.tick/<
core.js:4578:54
./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.invoke
zone.js:388
./node_modules/zone.js/dist/zone.js/</Zone.prototype.run
zone.js:138
./node_modules/@angular/core/fesm5/core.js/NgZone.prototype.runOutsideAngular
core.js:3779
./node_modules/@angular/core/fesm5/core.js/ApplicationRef.prototype.tick
core.js:4578
next/<
core.js:4462:97
./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.invoke
zone.js:388
onInvoke
core.js:3820
./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.invoke
zone.js:387
./node_modules/zone.js/dist/zone.js/</Zone.prototype.run
zone.js:138
./node_modules/@angular/core/fesm5/core.js/NgZone.prototype.run
core.js:3734
next
core.js:4462:67
./node_modules/@angular/core/fesm5/core.js/EventEmitter.prototype.subscribe/schedulerFn<
core.js:3551:34
./node_modules/rxjs/_esm5/internal/Subscriber.js/SafeSubscriber.prototype.__tryOrUnsub
Subscriber.js:195
./node_modules/rxjs/_esm5/internal/Subscriber.js/SafeSubscriber.prototype.next
Subscriber.js:133
./node_modules/rxjs/_esm5/internal/Subscriber.js/Subscriber.prototype._next
Subscriber.js:77
./node_modules/rxjs/_esm5/internal/Subscriber.js/Subscriber.prototype.next
Subscriber.js:54
./node_modules/rxjs/_esm5/internal/Subject.js/Subject.prototype.next
Subject.js:47
./node_modules/@angular/core/fesm5/core.js/EventEmitter.prototype.emit
core.js:3535:52
checkStable
core.js:3789
onHasTask
core.js:3833
./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.hasTask
zone.js:441
./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype._updateTaskCount
zone.js:461
./node_modules/zone.js/dist/zone.js/</Zone.prototype._updateTaskCount
zone.js:285
./node_modules/zone.js/dist/zone.js/</Zone.prototype.runTask
zone.js:205
drainMicroTaskQueue
zone.js:595

@AlexITC
Copy link
Collaborator

AlexITC commented Oct 22, 2018

Looks like it works, thanks!

@AlexITC AlexITC merged commit 64a0946 into wiringbits:develop Oct 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants