object.assign
Advanced tools
Comparing version 4.1.5 to 4.1.6
@@ -0,1 +1,10 @@ | ||
4.1.6 / 2024-12-18 | ||
================== | ||
[Refactor] use `call-bound` directly; use `es-object-atoms` | ||
[Deps] update `call-bind`, `has-symbols` | ||
[Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `hasown`, `mock-property`, `ses`, `tape` | ||
[actions] split out node 10-20, and 20+ | ||
[actions] remove redundant finisher | ||
[Tests] replace `aud` with `npm audit` | ||
4.1.5 / 2023-11-30 | ||
@@ -2,0 +11,0 @@ ================== |
@@ -13,3 +13,3 @@ (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ | ||
},{"./":3,"object-keys":18}],2:[function(require,module,exports){ | ||
},{"./":3,"object-keys":39}],2:[function(require,module,exports){ | ||
'use strict'; | ||
@@ -20,7 +20,7 @@ | ||
var hasSymbols = require('has-symbols/shams')(); | ||
var callBound = require('call-bind/callBound'); | ||
var toObject = Object; | ||
var callBound = require('call-bound'); | ||
var $Object = require('es-object-atoms'); | ||
var $push = callBound('Array.prototype.push'); | ||
var $propIsEnumerable = callBound('Object.prototype.propertyIsEnumerable'); | ||
var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null; | ||
var originalGetSymbols = hasSymbols ? $Object.getOwnPropertySymbols : null; | ||
@@ -30,3 +30,3 @@ // eslint-disable-next-line no-unused-vars | ||
if (target == null) { throw new TypeError('target must be an object'); } | ||
var to = toObject(target); // step 1 | ||
var to = $Object(target); // step 1 | ||
if (arguments.length === 1) { | ||
@@ -36,7 +36,7 @@ return to; // step 2 | ||
for (var s = 1; s < arguments.length; ++s) { | ||
var from = toObject(arguments[s]); // step 3.a.i | ||
var from = $Object(arguments[s]); // step 3.a.i | ||
// step 3.a.ii: | ||
var keys = objectKeys(from); | ||
var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols); | ||
var getSymbols = hasSymbols && ($Object.getOwnPropertySymbols || originalGetSymbols); | ||
if (getSymbols) { | ||
@@ -65,3 +65,3 @@ var syms = getSymbols(from); | ||
},{"call-bind/callBound":4,"has-symbols/shams":15,"object-keys":18}],3:[function(require,module,exports){ | ||
},{"call-bound":11,"es-object-atoms":23,"has-symbols/shams":31,"object-keys":39}],3:[function(require,module,exports){ | ||
'use strict'; | ||
@@ -90,51 +90,77 @@ | ||
},{"./implementation":2,"./polyfill":21,"./shim":22,"call-bind":5,"define-properties":7}],4:[function(require,module,exports){ | ||
},{"./implementation":2,"./polyfill":42,"./shim":43,"call-bind":10,"define-properties":13}],4:[function(require,module,exports){ | ||
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var bind = require('function-bind'); | ||
var callBind = require('./'); | ||
var $apply = require('./functionApply'); | ||
var $call = require('./functionCall'); | ||
var $reflectApply = require('./reflectApply'); | ||
var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); | ||
/** @type {import('./actualApply')} */ | ||
module.exports = $reflectApply || bind.call($call, $apply); | ||
module.exports = function callBoundIntrinsic(name, allowMissing) { | ||
var intrinsic = GetIntrinsic(name, !!allowMissing); | ||
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { | ||
return callBind(intrinsic); | ||
},{"./functionApply":6,"./functionCall":7,"./reflectApply":9,"function-bind":25}],5:[function(require,module,exports){ | ||
'use strict'; | ||
var bind = require('function-bind'); | ||
var $apply = require('./functionApply'); | ||
var actualApply = require('./actualApply'); | ||
/** @type {import('./applyBind')} */ | ||
module.exports = function applyBind() { | ||
return actualApply(bind, $apply, arguments); | ||
}; | ||
},{"./actualApply":4,"./functionApply":6,"function-bind":25}],6:[function(require,module,exports){ | ||
'use strict'; | ||
/** @type {import('./functionApply')} */ | ||
module.exports = Function.prototype.apply; | ||
},{}],7:[function(require,module,exports){ | ||
'use strict'; | ||
/** @type {import('./functionCall')} */ | ||
module.exports = Function.prototype.call; | ||
},{}],8:[function(require,module,exports){ | ||
'use strict'; | ||
var bind = require('function-bind'); | ||
var $TypeError = require('es-errors/type'); | ||
var $call = require('./functionCall'); | ||
var $actualApply = require('./actualApply'); | ||
/** @type {import('.')} */ | ||
module.exports = function callBindBasic(args) { | ||
if (args.length < 1 || typeof args[0] !== 'function') { | ||
throw new $TypeError('a function is required'); | ||
} | ||
return intrinsic; | ||
return $actualApply(bind, $call, args); | ||
}; | ||
},{"./":5,"get-intrinsic":10}],5:[function(require,module,exports){ | ||
},{"./actualApply":4,"./functionCall":7,"es-errors/type":21,"function-bind":25}],9:[function(require,module,exports){ | ||
'use strict'; | ||
var bind = require('function-bind'); | ||
var GetIntrinsic = require('get-intrinsic'); | ||
/** @type {import('./reflectApply')} */ | ||
module.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply; | ||
},{}],10:[function(require,module,exports){ | ||
'use strict'; | ||
var setFunctionLength = require('set-function-length'); | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
var $apply = GetIntrinsic('%Function.prototype.apply%'); | ||
var $call = GetIntrinsic('%Function.prototype.call%'); | ||
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); | ||
var $defineProperty = require('es-define-property'); | ||
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); | ||
var $max = GetIntrinsic('%Math.max%'); | ||
var callBindBasic = require('call-bind-apply-helpers'); | ||
var applyBind = require('call-bind-apply-helpers/applyBind'); | ||
if ($defineProperty) { | ||
try { | ||
$defineProperty({}, 'a', { value: 1 }); | ||
} catch (e) { | ||
// IE 8 has a broken defineProperty | ||
$defineProperty = null; | ||
} | ||
} | ||
module.exports = function callBind(originalFunction) { | ||
if (typeof originalFunction !== 'function') { | ||
throw new $TypeError('a function is required'); | ||
} | ||
var func = $reflectApply(bind, $call, arguments); | ||
var func = callBindBasic(arguments); | ||
var adjustedLength = originalFunction.length - (arguments.length - 1); | ||
return setFunctionLength( | ||
func, | ||
1 + $max(0, originalFunction.length - (arguments.length - 1)), | ||
1 + (adjustedLength > 0 ? adjustedLength : 0), | ||
true | ||
@@ -144,6 +170,2 @@ ); | ||
var applyBind = function applyBind() { | ||
return $reflectApply(bind, $apply, arguments); | ||
}; | ||
if ($defineProperty) { | ||
@@ -155,25 +177,33 @@ $defineProperty(module.exports, 'apply', { value: applyBind }); | ||
},{"function-bind":9,"get-intrinsic":10,"set-function-length":20}],6:[function(require,module,exports){ | ||
},{"call-bind-apply-helpers":8,"call-bind-apply-helpers/applyBind":5,"es-define-property":15,"set-function-length":41}],11:[function(require,module,exports){ | ||
'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 callBindBasic = require('call-bind-apply-helpers'); | ||
/** @type {(thisArg: string, searchString: string, position?: number) => number} */ | ||
var $indexOf = callBindBasic([GetIntrinsic('%String.prototype.indexOf%')]); | ||
/** @type {import('.')} */ | ||
module.exports = function callBoundIntrinsic(name, allowMissing) { | ||
// eslint-disable-next-line no-extra-parens | ||
var intrinsic = /** @type {Parameters<typeof callBindBasic>[0][0]} */ (GetIntrinsic(name, !!allowMissing)); | ||
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { | ||
return callBindBasic([intrinsic]); | ||
} | ||
} | ||
return intrinsic; | ||
}; | ||
var $SyntaxError = GetIntrinsic('%SyntaxError%'); | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
},{"call-bind-apply-helpers":8,"get-intrinsic":26}],12:[function(require,module,exports){ | ||
'use strict'; | ||
var $defineProperty = require('es-define-property'); | ||
var $SyntaxError = require('es-errors/syntax'); | ||
var $TypeError = require('es-errors/type'); | ||
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} */ | ||
/** @type {import('.')} */ | ||
module.exports = function defineDataProperty( | ||
@@ -226,3 +256,3 @@ obj, | ||
},{"get-intrinsic":10,"gopd":11,"has-property-descriptors":12}],7:[function(require,module,exports){ | ||
},{"es-define-property":15,"es-errors/syntax":20,"es-errors/type":21,"gopd":28}],13:[function(require,module,exports){ | ||
'use strict'; | ||
@@ -276,5 +306,94 @@ | ||
},{"define-data-property":6,"has-property-descriptors":12,"object-keys":18}],8:[function(require,module,exports){ | ||
},{"define-data-property":12,"has-property-descriptors":29,"object-keys":39}],14:[function(require,module,exports){ | ||
'use strict'; | ||
var callBind = require('call-bind-apply-helpers'); | ||
var gOPD = require('gopd'); | ||
// eslint-disable-next-line no-extra-parens, no-proto | ||
var hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype; | ||
// eslint-disable-next-line no-extra-parens | ||
var desc = hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__')); | ||
var $Object = Object; | ||
var $getPrototypeOf = $Object.getPrototypeOf; | ||
/** @type {import('./get')} */ | ||
module.exports = desc && typeof desc.get === 'function' | ||
? callBind([desc.get]) | ||
: typeof $getPrototypeOf === 'function' | ||
? /** @type {import('./get')} */ function getDunder(value) { | ||
// eslint-disable-next-line eqeqeq | ||
return $getPrototypeOf(value == null ? value : $Object(value)); | ||
} | ||
: false; | ||
},{"call-bind-apply-helpers":8,"gopd":28}],15:[function(require,module,exports){ | ||
'use strict'; | ||
/** @type {import('.')} */ | ||
var $defineProperty = Object.defineProperty || false; | ||
if ($defineProperty) { | ||
try { | ||
$defineProperty({}, 'a', { value: 1 }); | ||
} catch (e) { | ||
// IE 8 has a broken defineProperty | ||
$defineProperty = false; | ||
} | ||
} | ||
module.exports = $defineProperty; | ||
},{}],16:[function(require,module,exports){ | ||
'use strict'; | ||
/** @type {import('./eval')} */ | ||
module.exports = EvalError; | ||
},{}],17:[function(require,module,exports){ | ||
'use strict'; | ||
/** @type {import('.')} */ | ||
module.exports = Error; | ||
},{}],18:[function(require,module,exports){ | ||
'use strict'; | ||
/** @type {import('./range')} */ | ||
module.exports = RangeError; | ||
},{}],19:[function(require,module,exports){ | ||
'use strict'; | ||
/** @type {import('./ref')} */ | ||
module.exports = ReferenceError; | ||
},{}],20:[function(require,module,exports){ | ||
'use strict'; | ||
/** @type {import('./syntax')} */ | ||
module.exports = SyntaxError; | ||
},{}],21:[function(require,module,exports){ | ||
'use strict'; | ||
/** @type {import('./type')} */ | ||
module.exports = TypeError; | ||
},{}],22:[function(require,module,exports){ | ||
'use strict'; | ||
/** @type {import('./uri')} */ | ||
module.exports = URIError; | ||
},{}],23:[function(require,module,exports){ | ||
'use strict'; | ||
/** @type {import('.')} */ | ||
module.exports = Object; | ||
},{}],24:[function(require,module,exports){ | ||
'use strict'; | ||
/* eslint no-invalid-this: 1 */ | ||
@@ -363,3 +482,3 @@ | ||
},{}],9:[function(require,module,exports){ | ||
},{}],25:[function(require,module,exports){ | ||
'use strict'; | ||
@@ -371,3 +490,3 @@ | ||
},{"./implementation":8}],10:[function(require,module,exports){ | ||
},{"./implementation":24}],26:[function(require,module,exports){ | ||
'use strict'; | ||
@@ -377,5 +496,19 @@ | ||
var $SyntaxError = SyntaxError; | ||
var $Object = require('es-object-atoms'); | ||
var $Error = require('es-errors'); | ||
var $EvalError = require('es-errors/eval'); | ||
var $RangeError = require('es-errors/range'); | ||
var $ReferenceError = require('es-errors/ref'); | ||
var $SyntaxError = require('es-errors/syntax'); | ||
var $TypeError = require('es-errors/type'); | ||
var $URIError = require('es-errors/uri'); | ||
var abs = require('math-intrinsics/abs'); | ||
var floor = require('math-intrinsics/floor'); | ||
var max = require('math-intrinsics/max'); | ||
var min = require('math-intrinsics/min'); | ||
var pow = require('math-intrinsics/pow'); | ||
var $Function = Function; | ||
var $TypeError = TypeError; | ||
@@ -389,10 +522,4 @@ // eslint-disable-next-line consistent-return | ||
var $gOPD = Object.getOwnPropertyDescriptor; | ||
if ($gOPD) { | ||
try { | ||
$gOPD({}, ''); | ||
} catch (e) { | ||
$gOPD = null; // this is IE 8, which has a broken gOPD | ||
} | ||
} | ||
var $gOPD = require('gopd'); | ||
var $defineProperty = require('es-define-property'); | ||
@@ -420,10 +547,11 @@ var throwTypeError = function () { | ||
var hasSymbols = require('has-symbols')(); | ||
var hasProto = require('has-proto')(); | ||
var getDunderProto = require('dunder-proto/get'); | ||
var getProto = Object.getPrototypeOf || ( | ||
hasProto | ||
? function (x) { return x.__proto__; } // eslint-disable-line no-proto | ||
: null | ||
); | ||
var getProto = (typeof Reflect === 'function' && Reflect.getPrototypeOf) | ||
|| $Object.getPrototypeOf | ||
|| getDunderProto; | ||
var $apply = require('call-bind-apply-helpers/functionApply'); | ||
var $call = require('call-bind-apply-helpers/functionCall'); | ||
var needsEval = {}; | ||
@@ -434,2 +562,3 @@ | ||
var INTRINSICS = { | ||
__proto__: null, | ||
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, | ||
@@ -455,5 +584,5 @@ '%Array%': Array, | ||
'%encodeURIComponent%': encodeURIComponent, | ||
'%Error%': Error, | ||
'%Error%': $Error, | ||
'%eval%': eval, // eslint-disable-line no-eval | ||
'%EvalError%': EvalError, | ||
'%EvalError%': $EvalError, | ||
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, | ||
@@ -475,3 +604,4 @@ '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, | ||
'%Number%': Number, | ||
'%Object%': Object, | ||
'%Object%': $Object, | ||
'%Object.getOwnPropertyDescriptor%': $gOPD, | ||
'%parseFloat%': parseFloat, | ||
@@ -481,4 +611,4 @@ '%parseInt%': parseInt, | ||
'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, | ||
'%RangeError%': RangeError, | ||
'%ReferenceError%': ReferenceError, | ||
'%RangeError%': $RangeError, | ||
'%ReferenceError%': $ReferenceError, | ||
'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, | ||
@@ -500,6 +630,15 @@ '%RegExp%': RegExp, | ||
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, | ||
'%URIError%': URIError, | ||
'%URIError%': $URIError, | ||
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, | ||
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, | ||
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet | ||
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet, | ||
'%Function.prototype.call%': $call, | ||
'%Function.prototype.apply%': $apply, | ||
'%Object.defineProperty%': $defineProperty, | ||
'%Math.abs%': abs, | ||
'%Math.floor%': floor, | ||
'%Math.max%': max, | ||
'%Math.min%': min, | ||
'%Math.pow%': pow | ||
}; | ||
@@ -543,2 +682,3 @@ | ||
var LEGACY_ALIASES = { | ||
__proto__: null, | ||
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], | ||
@@ -599,7 +739,7 @@ '%ArrayPrototype%': ['Array', 'prototype'], | ||
var hasOwn = require('hasown'); | ||
var $concat = bind.call(Function.call, Array.prototype.concat); | ||
var $spliceApply = bind.call(Function.apply, Array.prototype.splice); | ||
var $replace = bind.call(Function.call, String.prototype.replace); | ||
var $strSlice = bind.call(Function.call, String.prototype.slice); | ||
var $exec = bind.call(Function.call, RegExp.prototype.exec); | ||
var $concat = bind.call($call, Array.prototype.concat); | ||
var $spliceApply = bind.call($apply, Array.prototype.splice); | ||
var $replace = bind.call($call, String.prototype.replace); | ||
var $strSlice = bind.call($call, String.prototype.slice); | ||
var $exec = bind.call($call, RegExp.prototype.exec); | ||
@@ -735,9 +875,14 @@ /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ | ||
},{"function-bind":9,"has-proto":13,"has-symbols":14,"hasown":16}],11:[function(require,module,exports){ | ||
},{"call-bind-apply-helpers/functionApply":6,"call-bind-apply-helpers/functionCall":7,"dunder-proto/get":14,"es-define-property":15,"es-errors":17,"es-errors/eval":16,"es-errors/range":18,"es-errors/ref":19,"es-errors/syntax":20,"es-errors/type":21,"es-errors/uri":22,"es-object-atoms":23,"function-bind":25,"gopd":28,"has-symbols":30,"hasown":32,"math-intrinsics/abs":33,"math-intrinsics/floor":34,"math-intrinsics/max":35,"math-intrinsics/min":36,"math-intrinsics/pow":37}],27:[function(require,module,exports){ | ||
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
/** @type {import('./gOPD')} */ | ||
module.exports = Object.getOwnPropertyDescriptor; | ||
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); | ||
},{}],28:[function(require,module,exports){ | ||
'use strict'; | ||
/** @type {import('.')} */ | ||
var $gOPD = require('./gOPD'); | ||
if ($gOPD) { | ||
@@ -754,20 +899,9 @@ try { | ||
},{"get-intrinsic":10}],12:[function(require,module,exports){ | ||
},{"./gOPD":27}],29:[function(require,module,exports){ | ||
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var $defineProperty = require('es-define-property'); | ||
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); | ||
var hasPropertyDescriptors = function hasPropertyDescriptors() { | ||
if ($defineProperty) { | ||
try { | ||
$defineProperty({}, 'a', { value: 1 }); | ||
return true; | ||
} catch (e) { | ||
// IE 8 has a broken defineProperty | ||
return false; | ||
} | ||
} | ||
return false; | ||
return !!$defineProperty; | ||
}; | ||
@@ -777,3 +911,3 @@ | ||
// node v0.6 has a bug where array lengths can be Set but not Defined | ||
if (!hasPropertyDescriptors()) { | ||
if (!$defineProperty) { | ||
return null; | ||
@@ -791,21 +925,9 @@ } | ||
},{"get-intrinsic":10}],13:[function(require,module,exports){ | ||
},{"es-define-property":15}],30:[function(require,module,exports){ | ||
'use strict'; | ||
var test = { | ||
foo: {} | ||
}; | ||
var $Object = Object; | ||
module.exports = function hasProto() { | ||
return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object); | ||
}; | ||
},{}],14:[function(require,module,exports){ | ||
'use strict'; | ||
var origSymbol = typeof Symbol !== 'undefined' && Symbol; | ||
var hasSymbolSham = require('./shams'); | ||
/** @type {import('.')} */ | ||
module.exports = function hasNativeSymbols() { | ||
@@ -820,5 +942,6 @@ if (typeof origSymbol !== 'function') { return false; } | ||
},{"./shams":15}],15:[function(require,module,exports){ | ||
},{"./shams":31}],31:[function(require,module,exports){ | ||
'use strict'; | ||
/** @type {import('./shams')} */ | ||
/* eslint complexity: [2, 18], max-statements: [2, 33] */ | ||
@@ -829,2 +952,3 @@ module.exports = function hasSymbols() { | ||
/** @type {{ [k in symbol]?: unknown }} */ | ||
var obj = {}; | ||
@@ -848,3 +972,3 @@ var sym = Symbol('test'); | ||
obj[sym] = symVal; | ||
for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop | ||
for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop | ||
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } | ||
@@ -860,3 +984,4 @@ | ||
if (typeof Object.getOwnPropertyDescriptor === 'function') { | ||
var descriptor = Object.getOwnPropertyDescriptor(obj, sym); | ||
// eslint-disable-next-line no-extra-parens | ||
var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym)); | ||
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } | ||
@@ -868,3 +993,3 @@ } | ||
},{}],16:[function(require,module,exports){ | ||
},{}],32:[function(require,module,exports){ | ||
'use strict'; | ||
@@ -876,8 +1001,38 @@ | ||
/** @type {(o: {}, p: PropertyKey) => p is keyof o} */ | ||
/** @type {import('.')} */ | ||
module.exports = bind.call(call, $hasOwn); | ||
},{"function-bind":9}],17:[function(require,module,exports){ | ||
},{"function-bind":25}],33:[function(require,module,exports){ | ||
'use strict'; | ||
/** @type {import('./abs')} */ | ||
module.exports = Math.abs; | ||
},{}],34:[function(require,module,exports){ | ||
'use strict'; | ||
/** @type {import('./abs')} */ | ||
module.exports = Math.floor; | ||
},{}],35:[function(require,module,exports){ | ||
'use strict'; | ||
/** @type {import('./max')} */ | ||
module.exports = Math.max; | ||
},{}],36:[function(require,module,exports){ | ||
'use strict'; | ||
/** @type {import('./min')} */ | ||
module.exports = Math.min; | ||
},{}],37:[function(require,module,exports){ | ||
'use strict'; | ||
/** @type {import('./pow')} */ | ||
module.exports = Math.pow; | ||
},{}],38:[function(require,module,exports){ | ||
'use strict'; | ||
var keysShim; | ||
@@ -1004,3 +1159,3 @@ if (!Object.keys) { | ||
},{"./isArguments":19}],18:[function(require,module,exports){ | ||
},{"./isArguments":40}],39:[function(require,module,exports){ | ||
'use strict'; | ||
@@ -1039,3 +1194,3 @@ | ||
},{"./implementation":17,"./isArguments":19}],19:[function(require,module,exports){ | ||
},{"./implementation":38,"./isArguments":40}],40:[function(require,module,exports){ | ||
'use strict'; | ||
@@ -1059,3 +1214,3 @@ | ||
},{}],20:[function(require,module,exports){ | ||
},{}],41:[function(require,module,exports){ | ||
'use strict'; | ||
@@ -1068,5 +1223,6 @@ | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
var $TypeError = require('es-errors/type'); | ||
var $floor = GetIntrinsic('%Math.floor%'); | ||
/** @type {import('.')} */ | ||
module.exports = function setFunctionLength(fn, length) { | ||
@@ -1096,5 +1252,5 @@ if (typeof fn !== 'function') { | ||
if (hasDescriptors) { | ||
define(fn, 'length', length, true, true); | ||
define(/** @type {Parameters<define>[0]} */ (fn), 'length', length, true, true); | ||
} else { | ||
define(fn, 'length', length); | ||
define(/** @type {Parameters<define>[0]} */ (fn), 'length', length); | ||
} | ||
@@ -1105,3 +1261,3 @@ } | ||
},{"define-data-property":6,"get-intrinsic":10,"gopd":11,"has-property-descriptors":12}],21:[function(require,module,exports){ | ||
},{"define-data-property":12,"es-errors/type":21,"get-intrinsic":26,"gopd":28,"has-property-descriptors":29}],42:[function(require,module,exports){ | ||
'use strict'; | ||
@@ -1163,3 +1319,3 @@ | ||
},{"./implementation":2}],22:[function(require,module,exports){ | ||
},{"./implementation":2}],43:[function(require,module,exports){ | ||
'use strict'; | ||
@@ -1180,2 +1336,2 @@ | ||
},{"./polyfill":21,"define-properties":7}]},{},[1]); | ||
},{"./polyfill":42,"define-properties":13}]},{},[1]); |
@@ -6,7 +6,7 @@ 'use strict'; | ||
var hasSymbols = require('has-symbols/shams')(); | ||
var callBound = require('call-bind/callBound'); | ||
var toObject = Object; | ||
var callBound = require('call-bound'); | ||
var $Object = require('es-object-atoms'); | ||
var $push = callBound('Array.prototype.push'); | ||
var $propIsEnumerable = callBound('Object.prototype.propertyIsEnumerable'); | ||
var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null; | ||
var originalGetSymbols = hasSymbols ? $Object.getOwnPropertySymbols : null; | ||
@@ -16,3 +16,3 @@ // eslint-disable-next-line no-unused-vars | ||
if (target == null) { throw new TypeError('target must be an object'); } | ||
var to = toObject(target); // step 1 | ||
var to = $Object(target); // step 1 | ||
if (arguments.length === 1) { | ||
@@ -22,7 +22,7 @@ return to; // step 2 | ||
for (var s = 1; s < arguments.length; ++s) { | ||
var from = toObject(arguments[s]); // step 3.a.i | ||
var from = $Object(arguments[s]); // step 3.a.i | ||
// step 3.a.ii: | ||
var keys = objectKeys(from); | ||
var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols); | ||
var getSymbols = hasSymbols && ($Object.getOwnPropertySymbols || originalGetSymbols); | ||
if (getSymbols) { | ||
@@ -29,0 +29,0 @@ var syms = getSymbols(from); |
{ | ||
"name": "object.assign", | ||
"version": "4.1.5", | ||
"version": "4.1.6", | ||
"author": "Jordan Harband", | ||
@@ -15,3 +15,3 @@ "funding": { | ||
"test": "npm run tests-only && npm run test:ses", | ||
"posttest": "aud --production", | ||
"posttest": "npx npm@'>=10.2' audit --production", | ||
"tests-only": "npm run test:implementation && npm run test:shim", | ||
@@ -45,11 +45,11 @@ "test:native": "nyc node test/native", | ||
"dependencies": { | ||
"call-bind": "^1.0.5", | ||
"call-bind": "^1.0.8", | ||
"call-bound": "^1.0.3", | ||
"define-properties": "^1.2.1", | ||
"has-symbols": "^1.0.3", | ||
"has-symbols": "^1.1.0", | ||
"object-keys": "^1.1.1" | ||
}, | ||
"devDependencies": { | ||
"@es-shims/api": "^2.4.2", | ||
"@ljharb/eslint-config": "^21.1.0", | ||
"aud": "^2.0.3", | ||
"@es-shims/api": "^2.5.1", | ||
"@ljharb/eslint-config": "^21.1.1", | ||
"browserify": "^16.5.2", | ||
@@ -60,10 +60,10 @@ "eslint": "=8.8.0", | ||
"has-strict-mode": "^1.0.1", | ||
"hasown": "^2.0.0", | ||
"hasown": "^2.0.2", | ||
"is": "^3.3.0", | ||
"mock-property": "^1.0.3", | ||
"mock-property": "^1.1.0", | ||
"npmignore": "^0.3.1", | ||
"nyc": "^10.3.2", | ||
"safe-publish-latest": "^2.0.0", | ||
"ses": "^0.11.1", | ||
"tape": "^5.7.2" | ||
"ses": "^1.10.0", | ||
"tape": "^5.9.0" | ||
}, | ||
@@ -70,0 +70,0 @@ "testling": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
78032
15
1561
5
+ Addedcall-bound@^1.0.3
+ Addedcall-bound@1.0.3(transitive)
Updatedcall-bind@^1.0.8
Updatedhas-symbols@^1.1.0