Socket
Socket
Sign inDemoInstall

define-data-property

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

define-data-property - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

11

CHANGELOG.md

@@ -8,2 +8,13 @@ # Changelog

## [v1.1.2](https://github.com/ljharb/define-data-property/compare/v1.1.1...v1.1.2) - 2024-02-05
### Commits
- [Dev Deps] update @types packages, `object-inspect`, `tape`, `typescript` [`df41bf8`](https://github.com/ljharb/define-data-property/commit/df41bf84ca3456be6226055caab44e38e3a7fd2f)
- [Dev Deps] update DT packages, `aud`, `npmignore`, `tape`, typescript` [`fab0e4e`](https://github.com/ljharb/define-data-property/commit/fab0e4ec709ee02b79f42d6db3ee5f26e0a34b8a)
- [Dev Deps] use `hasown` instead of `has` [`aa51ef9`](https://github.com/ljharb/define-data-property/commit/aa51ef93f6403d49d9bb72a807bcdb6e418978c0)
- [Refactor] use `es-errors`, so things that only need those do not need `get-intrinsic` [`d89be50`](https://github.com/ljharb/define-data-property/commit/d89be50571175888d391238605122679f7e65ffc)
- [Deps] update `has-property-descriptors` [`7af887c`](https://github.com/ljharb/define-data-property/commit/7af887c9083b59b195b0079e04815cfed9fcee2b)
- [Deps] update `get-intrinsic` [`bb8728e`](https://github.com/ljharb/define-data-property/commit/bb8728ec42cd998505a7157ae24853a560c20646)
## [v1.1.1](https://github.com/ljharb/define-data-property/compare/v1.1.0...v1.1.1) - 2023-10-12

@@ -10,0 +21,0 @@

4

index.js

@@ -17,4 +17,4 @@ 'use strict';

var $SyntaxError = GetIntrinsic('%SyntaxError%');
var $TypeError = GetIntrinsic('%TypeError%');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');

@@ -21,0 +21,0 @@ var gopd = require('gopd');

{
"name": "define-data-property",
"version": "1.1.1",
"version": "1.1.2",
"description": "Define a data property on an object. Will fall back to assignment in an engine without descriptors.",

@@ -59,18 +59,19 @@ "main": "index.js",

"dependencies": {
"get-intrinsic": "^1.2.1",
"es-errors": "^1.3.0",
"get-intrinsic": "^1.2.2",
"gopd": "^1.0.1",
"has-property-descriptors": "^1.0.0"
"has-property-descriptors": "^1.0.1"
},
"devDependencies": {
"@ljharb/eslint-config": "^21.1.0",
"@types/es-value-fixtures": "^1.4.1",
"@types/for-each": "^0.3.1",
"@types/get-intrinsic": "^1.2.0",
"@types/gopd": "^1.0.1",
"@types/has": "^1.0.0",
"@types/has-property-descriptors": "^1.0.1",
"@types/object-inspect": "^1.8.2",
"@types/object.getownpropertydescriptors": "^2.1.2",
"@types/tape": "^5.6.1",
"aud": "^2.0.3",
"@types/es-value-fixtures": "^1.4.4",
"@types/for-each": "^0.3.3",
"@types/get-intrinsic": "^1.2.2",
"@types/gopd": "^1.0.3",
"@types/has": "^1.0.1",
"@types/has-property-descriptors": "^1.0.3",
"@types/object-inspect": "^1.8.4",
"@types/object.getownpropertydescriptors": "^2.1.3",
"@types/tape": "^5.6.4",
"aud": "^2.0.4",
"auto-changelog": "^2.4.0",

@@ -81,12 +82,12 @@ "es-value-fixtures": "^1.4.2",

"for-each": "^0.3.3",
"has": "^1.0.3",
"hasown": "^2.0.0",
"in-publish": "^2.0.1",
"npmignore": "^0.3.0",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.12.3",
"object-inspect": "^1.13.1",
"object.getownpropertydescriptors": "^2.1.7",
"reflect.ownkeys": "^1.1.4",
"safe-publish-latest": "^2.0.0",
"tape": "^5.7.1",
"typescript": "^5.3.0-dev.20231012"
"tape": "^5.7.4",
"typescript": "next"
},

@@ -93,0 +94,0 @@ "engines": {

@@ -7,3 +7,3 @@ 'use strict';

var inspect = require('object-inspect');
var has = require('has');
var hasOwn = require('hasown');
var hasPropertyDescriptors = require('has-property-descriptors')();

@@ -66,3 +66,3 @@ var getOwnPropertyDescriptors = require('object.getownpropertydescriptors');

var obj = { existing: 'existing property' };
st.ok(has(obj, 'existing'), 'has initial own property');
st.ok(hasOwn(obj, 'existing'), 'has initial own property');
st.equal(obj.existing, 'existing property', 'has expected initial value');

@@ -72,19 +72,19 @@

st.equal(res, void undefined, 'returns `undefined`');
st.ok(has(obj, 'added'), 'has expected own property');
st.ok(hasOwn(obj, 'added'), 'has expected own property');
st.equal(obj.added, 'added property', 'has expected value');
defineDataProperty(obj, 'existing', 'new value');
st.ok(has(obj, 'existing'), 'still has expected own property');
st.ok(hasOwn(obj, 'existing'), 'still has expected own property');
st.equal(obj.existing, 'new value', 'has new expected value');
defineDataProperty(obj, 'explicit1', 'new value', false);
st.ok(has(obj, 'explicit1'), 'has expected own property (explicit enumerable)');
st.ok(hasOwn(obj, 'explicit1'), 'has expected own property (explicit enumerable)');
st.equal(obj.explicit1, 'new value', 'has new expected value (explicit enumerable)');
defineDataProperty(obj, 'explicit2', 'new value', false, false);
st.ok(has(obj, 'explicit2'), 'has expected own property (explicit writable)');
st.ok(hasOwn(obj, 'explicit2'), 'has expected own property (explicit writable)');
st.equal(obj.explicit2, 'new value', 'has new expected value (explicit writable)');
defineDataProperty(obj, 'explicit3', 'new value', false, false, false);
st.ok(has(obj, 'explicit3'), 'has expected own property (explicit configurable)');
st.ok(hasOwn(obj, 'explicit3'), 'has expected own property (explicit configurable)');
st.equal(obj.explicit3, 'new value', 'has new expected value (explicit configurable)');

@@ -91,0 +91,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc