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

Remove dependency on timespan #1014

Merged
merged 2 commits into from
Jan 8, 2019
Merged

Remove dependency on timespan #1014

merged 2 commits into from
Jan 8, 2019

Conversation

kibertoad
Copy link
Contributor

Inspired by #956
Addresses https://nodesecurity.io/advisories/533

Implemented differently due to following concerns:

  1. date-difference is not a widely used library, so I am wary to include it as a dependency in a major project;
  2. Alternative solution based on moment.js does not support uptime > 365 days correctly (which is a long-shot but hey, that happens).

This PR does not change the original signature of an uptime.

@kibertoad kibertoad requested a review from a team January 5, 2019 18:35
@@ -11,6 +11,7 @@
"prototypejs": false,
"mootools": false,
"dojo": false,
"esversion": 5,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Eventually we may want to bump it, better to be explicit. Almost used template literals in this PR :)

@kibertoad kibertoad merged commit 6ff9344 into master Jan 8, 2019
@kibertoad kibertoad deleted the fix/remove-timespan branch January 8, 2019 06:14
@johnwebbcole
Copy link

Any idea for a release date with this merge?

@kibertoad
Copy link
Contributor Author

@indexzero is currently ooo, I'll ping him when he is back. Can you depend on master for now?

@jpgcode
Copy link

jpgcode commented Feb 21, 2019

Any update on when this will be released to npm?

kaypeter87 added a commit to kaypeter87/forever that referenced this pull request Sep 1, 2019
* Execute tests in CI on newer Node.js versions (foreversd#1013)

* Add example for referencing -l -o and -e parameters from within a JSON config file  (foreversd#869)

* [fix] use fs.unlinkSync (foreversd#979)

Right now fs.unlink is used without a callback. This would throw
from Node.js 10 on. Therefore switch to the sync version. That way
errors are also going to be detected.

* Remove dependency on timespan (foreversd#1014)

* Remove dependency on timespan. Add test to ensure that uptime signature didn't change

* Remove redundant description

* Propagate error when failing to create directories on startup (foreversd#1017)

* Update utile to get rid of security warning (foreversd#1022)

* Update utile to get rid of security warning

* Don't use external dependencies from utile

* [doc] Update contributors.

* [dist] Add package-lock.json

* [dist] Version bump. 0.15.4

* [dist] Version bump. 1.0.0

* Update changelog for 1.0.0
@kanish-111
Copy link

guys, im using this to run a trading bot, so it listens to a port regularly for 24 hours, and send some http requests, so will there be any problem for me using this, coz the prog should not stop in between not even for a second. can i use this or?? any advice

@kibertoad
Copy link
Contributor Author

@kanish-111 Why not use nodemon?

@kanish-111
Copy link

@kanish-111 Why not use nodemon?

idk which is reliable for this case, which would you suggest, as it should not take much cpu tho,

@kibertoad
Copy link
Contributor Author

kibertoad commented Aug 1, 2021

@kanish-111 All of them are pretty lightweight. Nodemon has the best support these days.

@kanish-111
Copy link

@kanish-111 All of them are pretty lightweight. Nodemon has the best support these days.

And btw pm2??

@kibertoad
Copy link
Contributor Author

@kanish-111 Matteo Collina doesn't recommend pm2 due to it monkey-patching lots of Node.js internals, and I trust his authority on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants