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.2 to 1.1.3

11

CHANGELOG.md

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

## [v1.1.3](https://github.com/ljharb/define-data-property/compare/v1.1.2...v1.1.3) - 2024-02-12
### Commits
- [types] hand-write d.ts instead of emitting it [`0cbc988`](https://github.com/ljharb/define-data-property/commit/0cbc988203c105f2d97948327c7167ebd33bd318)
- [meta] simplify `exports` [`690781e`](https://github.com/ljharb/define-data-property/commit/690781eed28bbf2d6766237efda0ba6dd591609e)
- [Dev Deps] update `hasown`; clean up DT packages [`6cdfd1c`](https://github.com/ljharb/define-data-property/commit/6cdfd1cb2d91d791bfd18cda5d5cab232fd5d8fc)
- [actions] cleanup [`3142bc6`](https://github.com/ljharb/define-data-property/commit/3142bc6a4bc406a51f5b04f31e98562a27f35ffd)
- [meta] add `funding` [`8474423`](https://github.com/ljharb/define-data-property/commit/847442391a79779af3e0f1bf0b5bb923552b7804)
- [Deps] update `get-intrinsic` [`3e9be00`](https://github.com/ljharb/define-data-property/commit/3e9be00e07784ba34e7c77d8bc0fdbc832ad61de)
## [v1.1.2](https://github.com/ljharb/define-data-property/compare/v1.1.1...v1.1.2) - 2024-02-05

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

15

index.d.ts

@@ -1,3 +0,12 @@

declare const _exports: (obj: Record<PropertyKey, unknown>, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void;
export = _exports;
//# sourceMappingURL=index.d.ts.map
declare function defineDataProperty(
obj: Record<PropertyKey, unknown>,
property: keyof typeof obj,
value: typeof obj[typeof property],
nonEnumerable?: boolean | null,
nonWritable?: boolean | null,
nonConfigurable?: boolean | null,
loose?: boolean
): void;
export = defineDataProperty;

2

index.js

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

/** @type {(obj: Record<PropertyKey, unknown>, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */
/** @type {import('.')} */
module.exports = function defineDataProperty(

@@ -25,0 +25,0 @@ obj,

{
"name": "define-data-property",
"version": "1.1.2",
"version": "1.1.3",
"description": "Define a data property on an object. Will fall back to assignment in an engine without descriptors.",
"main": "index.js",
"types": "./index.d.ts",
"exports": {
".": [
{
"types": "./index.d.ts",
"default": "./index.js"
},
"./index.js"
],
".": "./index.js",
"./package.json": "./package.json"
},
"sideEffects": false,
"types": "./index.d.ts",
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated && npm run emit-types",
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"tsc": "tsc -p .",
"preemit-types": "rm -f *.ts *.ts.map test/*.ts test/*.ts.map",
"emit-types": "npm run tsc -- --noEmit false --emitDeclarationOnly",
"postemit-types": "rm test/*.ts test/*.ts.map",
"prelint": "evalmd README.md",

@@ -53,2 +44,5 @@ "lint": "eslint --ext=js,mjs .",

"author": "Jordan Harband <ljharb@gmail.com>",
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"license": "MIT",

@@ -61,3 +55,3 @@ "bugs": {

"es-errors": "^1.3.0",
"get-intrinsic": "^1.2.2",
"get-intrinsic": "^1.2.4",
"gopd": "^1.0.1",

@@ -68,2 +62,4 @@ "has-property-descriptors": "^1.0.1"

"@ljharb/eslint-config": "^21.1.0",
"@types/call-bind": "^1.0.5",
"@types/define-properties": "^1.1.5",
"@types/es-value-fixtures": "^1.4.4",

@@ -73,3 +69,2 @@ "@types/for-each": "^0.3.3",

"@types/gopd": "^1.0.3",
"@types/has": "^1.0.1",
"@types/has-property-descriptors": "^1.0.3",

@@ -85,3 +80,3 @@ "@types/object-inspect": "^1.8.4",

"for-each": "^0.3.3",
"hasown": "^2.0.0",
"hasown": "^2.0.1",
"in-publish": "^2.0.1",

@@ -114,4 +109,2 @@ "npmignore": "^0.3.1",

".github/workflows",
"!*.ts",
"!*.ts.map",
"types/reflect.ownkeys"

@@ -118,0 +111,0 @@ ]

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

st['throws'](
// @ts-expect-error
// @ts-expect-error
function () { defineDataProperty({}, 'key', 'value', nonBoolean); },

@@ -45,3 +45,3 @@ TypeError,

st['throws'](
// @ts-expect-error
// @ts-expect-error
function () { defineDataProperty({}, 'key', 'value', false, nonBoolean); },

@@ -53,3 +53,3 @@ TypeError,

st['throws'](
// @ts-expect-error
// @ts-expect-error
function () { defineDataProperty({}, 'key', 'value', false, false, nonBoolean); },

@@ -56,0 +56,0 @@ TypeError,

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