no message
This commit is contained in:
68
.output/server/node_modules/define-data-property/index.js
generated
vendored
68
.output/server/node_modules/define-data-property/index.js
generated
vendored
@@ -1,68 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var hasPropertyDescriptors = require('has-property-descriptors')();
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);
|
||||
if ($defineProperty) {
|
||||
try {
|
||||
$defineProperty({}, 'a', { value: 1 });
|
||||
} catch (e) {
|
||||
// IE 8 has a broken defineProperty
|
||||
$defineProperty = false;
|
||||
}
|
||||
}
|
||||
|
||||
var $SyntaxError = GetIntrinsic('%SyntaxError%');
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var gopd = require('gopd');
|
||||
|
||||
/** @type {(obj: Record<PropertyKey, unknown>, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */
|
||||
module.exports = function defineDataProperty(
|
||||
obj,
|
||||
property,
|
||||
value
|
||||
) {
|
||||
if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
||||
throw new $TypeError('`obj` must be an object or a function`');
|
||||
}
|
||||
if (typeof property !== 'string' && typeof property !== 'symbol') {
|
||||
throw new $TypeError('`property` must be a string or a symbol`');
|
||||
}
|
||||
if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
|
||||
throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');
|
||||
}
|
||||
if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
|
||||
throw new $TypeError('`nonWritable`, if provided, must be a boolean or null');
|
||||
}
|
||||
if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
|
||||
throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');
|
||||
}
|
||||
if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
|
||||
throw new $TypeError('`loose`, if provided, must be a boolean');
|
||||
}
|
||||
|
||||
var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
|
||||
var nonWritable = arguments.length > 4 ? arguments[4] : null;
|
||||
var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
|
||||
var loose = arguments.length > 6 ? arguments[6] : false;
|
||||
|
||||
/* @type {false | TypedPropertyDescriptor<unknown>} */
|
||||
var desc = !!gopd && gopd(obj, property);
|
||||
|
||||
if ($defineProperty) {
|
||||
$defineProperty(obj, property, {
|
||||
configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
|
||||
enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
|
||||
value: value,
|
||||
writable: nonWritable === null && desc ? desc.writable : !nonWritable
|
||||
});
|
||||
} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
|
||||
// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
|
||||
obj[property] = value; // eslint-disable-line no-param-reassign
|
||||
} else {
|
||||
throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
|
||||
}
|
||||
};
|
113
.output/server/node_modules/define-data-property/package.json
generated
vendored
113
.output/server/node_modules/define-data-property/package.json
generated
vendored
@@ -1,113 +0,0 @@
|
||||
{
|
||||
"name": "define-data-property",
|
||||
"version": "1.1.1",
|
||||
"description": "Define a data property on an object. Will fall back to assignment in an engine without descriptors.",
|
||||
"main": "index.js",
|
||||
"exports": {
|
||||
".": [
|
||||
{
|
||||
"types": "./index.d.ts",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"./index.js"
|
||||
],
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"types": "./index.d.ts",
|
||||
"scripts": {
|
||||
"prepack": "npmignore --auto --commentLines=autogenerated && npm run emit-types",
|
||||
"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",
|
||||
"lint": "eslint --ext=js,mjs .",
|
||||
"postlint": "npm run tsc",
|
||||
"pretest": "npm run lint",
|
||||
"tests-only": "nyc tape 'test/**/*.js'",
|
||||
"test": "npm run tests-only",
|
||||
"posttest": "aud --production",
|
||||
"version": "auto-changelog && git add CHANGELOG.md",
|
||||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ljharb/define-data-property.git"
|
||||
},
|
||||
"keywords": [
|
||||
"define",
|
||||
"data",
|
||||
"property",
|
||||
"object",
|
||||
"accessor",
|
||||
"javascript",
|
||||
"ecmascript",
|
||||
"enumerable",
|
||||
"configurable",
|
||||
"writable"
|
||||
],
|
||||
"author": "Jordan Harband <ljharb@gmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ljharb/define-data-property/issues"
|
||||
},
|
||||
"homepage": "https://github.com/ljharb/define-data-property#readme",
|
||||
"dependencies": {
|
||||
"get-intrinsic": "^1.2.1",
|
||||
"gopd": "^1.0.1",
|
||||
"has-property-descriptors": "^1.0.0"
|
||||
},
|
||||
"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",
|
||||
"auto-changelog": "^2.4.0",
|
||||
"es-value-fixtures": "^1.4.2",
|
||||
"eslint": "=8.8.0",
|
||||
"evalmd": "^0.0.19",
|
||||
"for-each": "^0.3.3",
|
||||
"has": "^1.0.3",
|
||||
"in-publish": "^2.0.1",
|
||||
"npmignore": "^0.3.0",
|
||||
"nyc": "^10.3.2",
|
||||
"object-inspect": "^1.12.3",
|
||||
"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"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/index.js"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true
|
||||
},
|
||||
"publishConfig": {
|
||||
"ignore": [
|
||||
".github/workflows",
|
||||
"!*.ts",
|
||||
"!*.ts.map",
|
||||
"types/reflect.ownkeys"
|
||||
]
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user