Update checked-in dependencies

This commit is contained in:
github-actions[bot] 2024-09-16 17:29:58 +00:00
parent 1afca056e3
commit 6989ba7bd2
3942 changed files with 55190 additions and 132206 deletions

View file

@ -1,12 +1,10 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = GetIntrinsic('%TypeError%');
var $TypeError = require('es-errors/type');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var isFullyPopulatedPropertyDescriptor = require('../helpers/isFullyPopulatedPropertyDescriptor');
var isPropertyDescriptor = require('../helpers/isPropertyDescriptor');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
@ -29,25 +27,17 @@ module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, D
if (!IsPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
if (Type(extensible) !== 'Boolean') {
if (typeof extensible !== 'boolean') {
throw new $TypeError('Assertion failed: extensible must be a Boolean');
}
if (!isPropertyDescriptor({
Type: Type,
IsDataDescriptor: IsDataDescriptor,
IsAccessorDescriptor: IsAccessorDescriptor
}, Desc)) {
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (Type(current) !== 'Undefined' && !isPropertyDescriptor({
Type: Type,
IsDataDescriptor: IsDataDescriptor,
IsAccessorDescriptor: IsAccessorDescriptor
}, current)) {
if (typeof current !== 'undefined' && !isPropertyDescriptor(current)) {
throw new $TypeError('Assertion failed: current must be a Property Descriptor, or undefined');
}
if (Type(current) === 'Undefined') { // step 2
if (typeof current === 'undefined') { // step 2
if (!extensible) {
return false; // step 2.a
}
@ -81,10 +71,15 @@ module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, D
}
// 3. Assert: current is a fully populated Property Descriptor.
if (!isFullyPopulatedPropertyDescriptor({
IsAccessorDescriptor: IsAccessorDescriptor,
IsDataDescriptor: IsDataDescriptor
}, current)) {
if (
!isFullyPopulatedPropertyDescriptor(
{
IsAccessorDescriptor: IsAccessorDescriptor,
IsDataDescriptor: IsDataDescriptor
},
current
)
) {
throw new $TypeError('`current`, when present, must be a fully populated and valid Property Descriptor');
}