define-properties
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -8,2 +8,10 @@ # Changelog | ||
## [v1.2.1](https://github.com/ljharb/define-properties/compare/v1.2.0...v1.2.1) - 2023-09-12 | ||
### Commits | ||
- [Refactor] use `define-data-property` [`e7782a7`](https://github.com/ljharb/define-properties/commit/e7782a7480a62f8b6e141b49371e6de4df176c97) | ||
- [actions] use reusable rebase action [`cd249c3`](https://github.com/ljharb/define-properties/commit/cd249c3920607bc8eeb7c0cd5b672b810983cac5) | ||
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`8205f97`](https://github.com/ljharb/define-properties/commit/8205f9734a4da8ee5b3b29798788567a09b330e8) | ||
## [v1.2.0](https://github.com/ljharb/define-properties/compare/v1.1.4...v1.2.0) - 2023-02-10 | ||
@@ -10,0 +18,0 @@ |
16
index.js
@@ -8,3 +8,3 @@ 'use strict'; | ||
var concat = Array.prototype.concat; | ||
var origDefineProperty = Object.defineProperty; | ||
var defineDataProperty = require('define-data-property'); | ||
@@ -15,6 +15,4 @@ var isFunction = function (fn) { | ||
var hasPropertyDescriptors = require('has-property-descriptors')(); | ||
var supportsDescriptors = require('has-property-descriptors')(); | ||
var supportsDescriptors = origDefineProperty && hasPropertyDescriptors; | ||
var defineProperty = function (object, name, value, predicate) { | ||
@@ -30,11 +28,7 @@ if (name in object) { | ||
} | ||
if (supportsDescriptors) { | ||
origDefineProperty(object, name, { | ||
configurable: true, | ||
enumerable: false, | ||
value: value, | ||
writable: true | ||
}); | ||
defineDataProperty(object, name, value, true); | ||
} else { | ||
object[name] = value; // eslint-disable-line no-param-reassign | ||
defineDataProperty(object, name, value); | ||
} | ||
@@ -41,0 +35,0 @@ }; |
{ | ||
"name": "define-properties", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"author": "Jordan Harband <ljharb@gmail.com>", | ||
@@ -37,2 +37,3 @@ "funding": { | ||
"dependencies": { | ||
"define-data-property": "^1.0.1", | ||
"has-property-descriptors": "^1.0.0", | ||
@@ -42,4 +43,4 @@ "object-keys": "^1.1.1" | ||
"devDependencies": { | ||
"@ljharb/eslint-config": "^21.0.1", | ||
"aud": "^2.0.2", | ||
"@ljharb/eslint-config": "^21.1.0", | ||
"aud": "^2.0.3", | ||
"auto-changelog": "^2.4.0", | ||
@@ -51,3 +52,3 @@ "eslint": "=8.8.0", | ||
"safe-publish-latest": "^2.0.0", | ||
"tape": "^5.6.3" | ||
"tape": "^5.6.6" | ||
}, | ||
@@ -54,0 +55,0 @@ "testling": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12890
3
38
+ Addeddefine-data-property@^1.0.1
+ Addeddefine-data-property@1.1.4(transitive)
+ Addedgopd@1.0.1(transitive)