Added Node v10 Support (#10058)

* Added Node v10 Support

no issue

Signed-off-by: kirrg001 <katharina.irrgang@googlemail.com>

* Bump amperize to version 0.3.8

no issue

* Bump mysql to version 2.16.0

no issue

- mysql 2.15.0 uses a deprecated notation for timers
- e.g. timers.unenroll()

* Bump sub dependencies

no issue

- e.g. knex-migrator used mysql 2.15.0

* Bump dependencies

no issue

* Replaced `new Buffer` with `Buffer.from`

no issue

- Buffer() is deprecated due to security and usability issues.
- https://nodejs.org/en/docs/guides/buffer-constructor-deprecation/
This commit is contained in:
Katharina Irrgang 2018-10-30 09:45:51 +01:00 committed by Fabien O'Carroll
parent 7d9e2a21ad
commit 7fb0b96f3e

View File

@ -11,7 +11,7 @@ module.exports.generateFromContent = function generateFromContent(options) {
hash.update(content);
text += [content, hash.digest('base64')].join('|');
return new Buffer(text).toString('base64');
return Buffer.from(text).toString('base64');
};
module.exports.generateFromEmail = function generateFromEmail(options) {
@ -29,7 +29,7 @@ module.exports.generateFromEmail = function generateFromEmail(options) {
hash.update(String(secret));
text += [expires, email, hash.digest('base64')].join('|');
return new Buffer(text).toString('base64');
return Buffer.from(text).toString('base64');
};
module.exports.resetToken = {
@ -49,13 +49,13 @@ module.exports.resetToken = {
hash.update(String(dbHash));
text += [expires, email, hash.digest('base64')].join('|');
return new Buffer(text).toString('base64');
return Buffer.from(text).toString('base64');
},
extract: function extract(options) {
options = options || {};
var token = options.token,
tokenText = new Buffer(token, 'base64').toString('ascii'),
tokenText = Buffer.from(token, 'base64').toString('ascii'),
parts,
expires,
email;