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.0 to 1.1.1

10

CHANGELOG.md

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

## [v1.1.1](https://github.com/ljharb/define-data-property/compare/v1.1.0...v1.1.1) - 2023-10-12
### Commits
- [Tests] fix tests in ES3 engines [`5c6920e`](https://github.com/ljharb/define-data-property/commit/5c6920edd1f52f675b02f417e539c28135b43f94)
- [Dev Deps] update `@types/es-value-fixtures`, `@types/for-each`, `@types/gopd`, `@types/has-property-descriptors`, `tape`, `typescript` [`7d82dfc`](https://github.com/ljharb/define-data-property/commit/7d82dfc20f778b4465bba06335dd53f6f431aea3)
- [Fix] IE 8 has a broken `Object.defineProperty` [`0672e1a`](https://github.com/ljharb/define-data-property/commit/0672e1af2a9fcc787e7c23b96dea60d290df5548)
- [meta] emit types on prepack [`73acb1f`](https://github.com/ljharb/define-data-property/commit/73acb1f903c21b314ec7156bf10f73c7910530c0)
- [Dev Deps] update `tape`, `typescript` [`9489a77`](https://github.com/ljharb/define-data-property/commit/9489a7738bf2ecf0ac71d5b78ec4ca6ad7ba0142)
## [v1.1.0](https://github.com/ljharb/define-data-property/compare/v1.0.1...v1.1.0) - 2023-09-13

@@ -10,0 +20,0 @@

@@ -8,2 +8,10 @@ 'use strict';

var $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);
if ($defineProperty) {
try {
$defineProperty({}, 'a', { value: 1 });
} catch (e) {
// IE 8 has a broken defineProperty
$defineProperty = false;
}
}

@@ -10,0 +18,0 @@ var $SyntaxError = GetIntrinsic('%SyntaxError%');

20

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

@@ -19,3 +19,3 @@ "main": "index.js",

"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepack": "npmignore --auto --commentLines=autogenerated && npm run emit-types",
"prepublish": "not-in-publish || npm run prepublishOnly",

@@ -66,8 +66,8 @@ "prepublishOnly": "safe-publish-latest",

"@ljharb/eslint-config": "^21.1.0",
"@types/es-value-fixtures": "^1.4.0",
"@types/for-each": "^0.3.0",
"@types/es-value-fixtures": "^1.4.1",
"@types/for-each": "^0.3.1",
"@types/get-intrinsic": "^1.2.0",
"@types/gopd": "^1.0.0",
"@types/gopd": "^1.0.1",
"@types/has": "^1.0.0",
"@types/has-property-descriptors": "^1.0.0",
"@types/has-property-descriptors": "^1.0.1",
"@types/object-inspect": "^1.8.2",

@@ -88,5 +88,6 @@ "@types/object.getownpropertydescriptors": "^2.1.2",

"object.getownpropertydescriptors": "^2.1.7",
"reflect.ownkeys": "^1.1.4",
"safe-publish-latest": "^2.0.0",
"tape": "^5.6.6",
"typescript": "^5.3.0-dev.20230912"
"tape": "^5.7.1",
"typescript": "^5.3.0-dev.20231012"
},

@@ -111,5 +112,6 @@ "engines": {

"!*.ts",
"!*.ts.map"
"!*.ts.map",
"types/reflect.ownkeys"
]
}
}

@@ -10,2 +10,3 @@ 'use strict';

var getOwnPropertyDescriptors = require('object.getownpropertydescriptors');
var ownKeys = require('reflect.ownkeys');

@@ -92,3 +93,3 @@ var defineDataProperty = require('../');

t.test('loose mode', function (st) {
t.test('loose mode', { skip: !hasPropertyDescriptors }, function (st) {
var obj = { existing: 'existing property' };

@@ -182,13 +183,7 @@

st.deepEqual(
getOwnPropertyDescriptors(obj),
{
existing: {
configurable: true,
enumerable: true,
value: 'existing property',
writable: true
}
},
'obj still has expected descriptors'
ownKeys(obj),
['existing'],
'obj still has expected keys'
);
st.equal(obj.existing, 'existing property', 'obj still has expected values');

@@ -195,0 +190,0 @@ st.end();

@@ -21,2 +21,3 @@ {

// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
"typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */
"resolveJsonModule": true, /* Enable importing .json files. */

@@ -23,0 +24,0 @@

Sorry, the diff of this file is not supported yet

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