Skip to content

Commit

Permalink
fix: replace deep-equal with built-in util.isDeepStrictEqual (#40)
Browse files Browse the repository at this point in the history
* fix: replace deep-equal with built-in util.isDeepStrictEqual

because one of deep-equal's dependencies, namely es-abstract, is bloated.

* build: test against latest postgresql

* Revert "build: test against latest postgresql"

This reverts commit cd6ebed.
  • Loading branch information
cyjake authored Mar 16, 2020
1 parent 8a5ffd0 commit d2d50c6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 5 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
1.0.3 / 2020-03-16
==================

* Fix: replace `deep-equal` (which is bloated) with `util.isDeepStrictEqual`

1.0.2 / 2020-03-04
==================

Expand Down
3 changes: 1 addition & 2 deletions lib/bone.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* The Bone to extend models from. This module consists of helper methods like `capitalize`, and the class {@link Bone}.
* @module
*/
const deepEqual = require('deep-equal');
const util = require('util');
const pluralize = require('pluralize');

Expand Down Expand Up @@ -161,7 +160,7 @@ class Bone {
if (this.rawUnset.has(name)) return false;
const value = this.attribute(name);
const valueWas = this.attributeWas(name);
return !(Object.is(value, valueWas) || deepEqual(value, valueWas));
return !util.isDeepStrictEqual(value, valueWas);
}

/**
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "leoric",
"version": "1.0.2",
"version": "1.0.3",
"description": "JavaScript Object-relational mapping alchemy",
"main": "index.js",
"types": "index.d.ts",
Expand Down Expand Up @@ -35,7 +35,6 @@
},
"dependencies": {
"debug": "^3.1.0",
"deep-equal": "^1.1.1",
"pluralize": "^7.0.0",
"sqlstring": "^2.3.0",
"strftime": "^0.10.0"
Expand Down

0 comments on commit d2d50c6

Please sign in to comment.