3rd-Eden / useragent

Useragent parser for Node.js, ported from browserscope.org
MIT License
897 stars 137 forks source link

Make updating regexps.js more atomic to prevent server crashes #89

Open dattas opened 7 years ago

dattas commented 7 years ago

Occasionally the auto update fails while writing to the regexps.js file, leaving a blank file and causing node to fail and prevents starting of the application. This change writes the changes to a temporary file first and if there are no issues, then it renames it. This makes the process more atomic and has improved reliability on our servers.

dattas commented 7 years ago

Looks like the build failed due to npm issues, closing and re-opening to have it try again.

dattas commented 7 years ago

Looks like the should package is having trouble on NPM for node 0.8 which is causing this to fail. I can close/open again later, perhaps tomorrow to see if the issue goes away