Skip to content

Update npm packages and resolve breaking changes from packages#2175

Merged
MichMich merged 6 commits into
MagicMirrorOrg:developfrom
jakemulley:packages
Nov 15, 2020
Merged

Update npm packages and resolve breaking changes from packages#2175
MichMich merged 6 commits into
MagicMirrorOrg:developfrom
jakemulley:packages

Conversation

@jakemulley

Copy link
Copy Markdown
Contributor

👋🏼 Awesome project here! I was playing around with it and thought I'd update some of the packages to say thanks for building and maintaining this 👍🏼

This PR updates the following packages:

  • danger 3.1.310.5.0
  • electron 6.1.78.0.0
  • eslint 7.9.07.11.0
  • eslint-config-prettier 6.11.06.14.0
  • eslint-plugin-jsdoc 30.5.130.7.3
  • helmet 3.23.34.1.1
  • jsdom 11.6.216.4.0
  • mocha 7.1.28.2.0
  • mocha-logger 1.0.61.0.7
  • moment 2.28.02.29.1
  • node-ical 0.12.00.12.2
  • pretty-quick 3.0.23.1.0
  • simple-git 1.85.02.21.0
  • spectron 8.0.010.0.0
  • stylelint 13.7.113.7.2

Quick note on Electron and Spectron

I have purposely not upgraded Electron to version 10, or Spectron to version 12, as they contain breaking changes that require a bigger rewrite of some blocks of code which deserve their own PR. Electron 6 is also out of support since May 2020.

Resolved breaking changes

helmet introduced helmet.contentSecurityPolicy in version 4, which I've turned off in the server setup to mimic its behaviour from version 3
http-auth no longer supports express as of version 4, so I've switched that to use express-basic-auth instead
jsdom requires specifying external file sources with their correct protocol, file://, from version 12, so I've added that into the respective tests where required

Node versions

electron 7 dropped support for <= Node 8
helmet 4 dropped support for <= Node 10
jsdom 16 dropped support for <= Node 10
mocha 8 dropped support for <= Node 10

@sdetweil

Copy link
Copy Markdown
Collaborator

we don't open support issues anyhow so that isn't much of an issue.. are there any platform issues with Electron 10?
6.17 isn't built for armv6l anymore. while the project only wants to support Pi3 and 4, there are lots of other platforms used.
odroid, arm64, intel, , just about any linux, mac.

Comment thread CHANGELOG.md Outdated
@jakemulley

jakemulley commented Oct 23, 2020

Copy link
Copy Markdown
Contributor Author

we don't open support issues anyhow so that isn't much of an issue.. are there any platform issues with Electron 10?
6.17 isn't built for armv6l anymore. while the project only wants to support Pi3 and 4, there are lots of other platforms used.
odroid, arm64, intel, , just about any linux, mac.

@sdetweil electron 7 and 8 don't remove any binaries and introduce platform support for win32-arm64 (Windows on Arm). electron 9 and 10 don't change platform support either 👍🏼

@rejas

rejas commented Nov 6, 2020

Copy link
Copy Markdown
Collaborator

Looks good to me (I am always a fan of updated dependencies :-)

Any objections from you @sdetweil @MichMich regarding the bump to electron?

@MichMich

MichMich commented Nov 6, 2020

Copy link
Copy Markdown
Collaborator

I'm always for bumping the dependencies. But it is a huge risk. Did any of you try it on a Pi as well?

@rejas

rejas commented Nov 6, 2020

Copy link
Copy Markdown
Collaborator

I can try it out on my pi4. give me a day or two :-)

@sdetweil

sdetweil commented Nov 6, 2020

Copy link
Copy Markdown
Collaborator

I won't be able to for another week..out if town

@rejas

rejas commented Nov 8, 2020

Copy link
Copy Markdown
Collaborator

Runs fine on my PI4. I took the liberty to merge the current develop branch and also update all other packages again. Mabe you should do that too @jakemulley so that the merge conflicts go away.

@jakemulley

Copy link
Copy Markdown
Contributor Author

@rejas That's done for you 👍🏼 However, I've reverted node-ical back to 0.12.2 and pinned it as 0.12.3 breaks a test.

@rejas

rejas commented Nov 8, 2020

Copy link
Copy Markdown
Collaborator

i think in the newest develop there is a fix for that so 0.12.3 should run fine when you merged it. Isnt that right @sdetweil ?

@sdetweil

sdetweil commented Nov 8, 2020

Copy link
Copy Markdown
Collaborator

12.3 is required for the latest fixes. I didn't see any test errors with the updated fix pr

@Tom-Hirschberger

Copy link
Copy Markdown
Contributor

Hi, i had a problem with my MMM-SynologySurveillanceModule which had been caused of (as it looks like) the old electron version. Although the DOM object contained img nodes with valid mjpeg streams they had not been displayed randomly.
Because of this i tried updating to the branch of jakemulley yesterday.
Did a complete re-install of the MagicMirror software und reinstalled all modules. Got no errors and everything works well since yesterday. The mjpeg problems are gone also.
I tested it on both my mirrors (RPi3B and RPi4) with a fully patched Raspbian Buster.
Main problem is that i use only the original news and clock module. All other modules are third party.

@rejas

rejas commented Nov 10, 2020

Copy link
Copy Markdown
Collaborator

Sounds good @Tom-Hirschberger

So only thing left for @jakemulley is to bump the node-ical dependency back again to ^0.12.3

@jakemulley

Copy link
Copy Markdown
Contributor Author

Thanks @rejas, @sdetweil and @Tom-Hirschberger for doing some further testing and letting me know that using node-ical 0.12.3 is OK to use 👍🏼

I've updated the packages again, it's up to date with develop, and here are the final versions:

danger 3.1.310.5.1
electron 6.1.78.5.3
eslint-config-prettier 6.11.06.15.0
eslint-plugin-jsdoc 30.5.130.7.7
eslint 7.9.07.13.0
helmet 3.23.34.2.0
http-auth has been replaced with express-basic-auth
jsdom 11.6.216.4.0
mocha-logger 1.0.61.0.7
mocha 7.1.28.2.1
moment 2.28.02.29.1
node-ical 0.12.00.12.3
pretty-quick 3.0.23.1.0
simple-git 1.85.02.21.0
spectron 8.0.010.0.1
stylelint 13.7.113.7.2

Am happy to rebase this into a single commit PR if needs be - if you need anything else from me, feel free to let me know.

@MichMich

Copy link
Copy Markdown
Collaborator

Let's see how this goes ... :)

@MichMich MichMich merged commit 8a4173d into MagicMirrorOrg:develop Nov 15, 2020
@sdetweil

Copy link
Copy Markdown
Collaborator

ok, this may whack other users getting calendar fixes

@MichMich

Copy link
Copy Markdown
Collaborator

We have 1,5 month to iron things out. We can always roll back some dependency bumps.

@khassel

khassel commented Nov 15, 2020

Copy link
Copy Markdown
Collaborator

tested my docker image with new develop branch on RPi3B, no problems so far.

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.

6 participants