Skip to content

Commit

Permalink
Merge pull request #1 from reedsy/remove-useageof-proto
Browse files Browse the repository at this point in the history
🔒 Remove usage of __proto__
  • Loading branch information
dawidreedsy authored Dec 5, 2023
2 parents c429c86 + 03fe25e commit 2638728
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function gm (source, height, color) {
EventEmitter.call(this);

this._options = {};
this.options(this.__proto__._options);
this.options(Object.getPrototypeOf(this)._options);

this.data = {};
this._in = [];
Expand Down Expand Up @@ -103,7 +103,7 @@ gm.subClass = function subClass (options) {
parent.call(this, source, height, color);
}

gm.prototype.__proto__ = parent.prototype;
Object.setPrototypeOf(gm.prototype, parent.prototype)
gm.prototype._options = {};
gm.prototype.options(options);

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@reedsy/gm",
"description": "GraphicsMagick and ImageMagick for node.js",
"version": "1.25.0-reedsy-1.0.0",
"version": "1.25.0-reedsy-1.0.1",
"author": "Aaron Heckmann <[email protected]>",
"keywords": [
"graphics",
Expand Down Expand Up @@ -29,7 +29,7 @@
"main": "./index",
"scripts": {
"security": "npm audit",
"test": "npm run security && npm run test-integration",
"test": "npm run security && NODE_OPTIONS=\"--disable-proto=throw\" npm run test-integration",
"test-integration": "node test/ --integration",
"test-unit": "node test/"
},
Expand Down

0 comments on commit 2638728

Please sign in to comment.