Merge pull request #1728 from strongloop/chore/add-node-12
Add support for Node.js 12.x
This commit is contained in:
commit
6793be20ca
|
@ -3,5 +3,6 @@ language: node_js
|
|||
node_js:
|
||||
- "8"
|
||||
- "10"
|
||||
- "12"
|
||||
|
||||
after_success: npm run coverage
|
||||
|
|
|
@ -97,3 +97,10 @@ DateString.prototype.inspect = function(depth, options) {
|
|||
_date: this._date,
|
||||
});
|
||||
};
|
||||
|
||||
if (inspect.custom) {
|
||||
// Node.js 12+ no longer recognizes "inspect" method,
|
||||
// it uses "inspect.custom" symbol as the key instead
|
||||
// TODO(semver-major) always use the symbol key only (requires Node.js 8+).
|
||||
DateString.prototype[inspect.custom] = DateString.prototype.inspect;
|
||||
}
|
||||
|
|
|
@ -389,6 +389,8 @@ ModelUtils._coerce = function(where, options) {
|
|||
self._coerce(clauses[k], options);
|
||||
}
|
||||
|
||||
where[p] = clauses;
|
||||
|
||||
continue;
|
||||
}
|
||||
let DataType = props[p] && props[p].type;
|
||||
|
|
|
@ -637,6 +637,13 @@ ModelBaseClass.prototype.inspect = function(depth) {
|
|||
});
|
||||
};
|
||||
|
||||
if (util.inspect.custom) {
|
||||
// Node.js 12+ no longer recognizes "inspect" method,
|
||||
// it uses "inspect.custom" symbol as the key instead
|
||||
// TODO(semver-major) always use the symbol key only (requires Node.js 8+).
|
||||
ModelBaseClass.prototype[util.inspect.custom] = ModelBaseClass.prototype.inspect;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {String} anotherClass could be string or class. Name of the class or the class itself
|
||||
|
|
Loading…
Reference in New Issue