schnee effeckt und fehler Korektur

This commit is contained in:
2023-08-14 17:52:24 +02:00
parent 4a843d4936
commit 79af4e9907
6813 changed files with 343821 additions and 356128 deletions

View File

@@ -1 +0,0 @@
dist/

View File

@@ -3,8 +3,10 @@
"extends": "@ljharb",
"ignorePatterns": ["dist/"],
"rules": {
"complexity": [2, 19],
"eqeqeq": [2, "allow-null"],
"id-length": [2, { "min": 1, "max": 30 }],
"max-statements": [2, 33],
"max-statements-per-line": [2, { "max": 2 }],

View File

@@ -1,15 +0,0 @@
name: Automatic Rebase
on: [pull_request_target]
jobs:
_:
name: "Automatic Rebase"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: ljharb/rebase@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,14 +0,0 @@
name: Require “Allow Edits”
on: [pull_request_target]
jobs:
_:
name: "Require “Allow Edits”"
runs-on: ubuntu-latest
steps:
- uses: ljharb/require-allow-edits@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

5
node_modules/object.assign/.nycrc generated vendored
View File

@@ -2,13 +2,8 @@
"all": true,
"check-coverage": false,
"reporter": ["text-summary", "text", "html", "json"],
"lines": 86,
"statements": 85.93,
"functions": 82.43,
"branches": 76.06,
"exclude": [
"coverage",
"operations",
"test"
]
}

View File

@@ -1,3 +1,27 @@
4.1.4 / 2022-08-16
==================
* [meta] fix `npmignore` integration (#83)
4.1.3 / 2022-08-05
==================
* [Refactor] make steps closer to actual spec
* [Refactor] simplify object coercible check
* [readme] remove defunct badges, add coverage and actions badges
* [eslint] ignore coverage output
* [meta] use `npmignore` to autogenerate an npmignore file
* [meta] remove audit-level
* [Deps] update `call-bind`, `define-properties`, `has-symbols`
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `functions-have-names`, `safe-publish-latest`, `ses`, `tape`
* [actions] use `node/install` instead of `node/run`; use `codecov` action
* [actions] reuse common workflows
* [actions] update codecov uploader
* [Tests] add implementation tests
* [Tests] use `mock-property`
* [Tests] disable posttest pending `aud` handling `file:` deps
* [Tests] migrate remaining tests to Github Actions (#81)
* [Tests] gitignore coverage output
* [Tests] test node v1-v9 on Github Actions instead of travis; resume testing all minors (#80)
4.1.2 / 2020-10-30
==================
* [Refactor] use extracted `call-bind` instead of full `es-abstract`

13
node_modules/object.assign/README.md generated vendored
View File

@@ -1,6 +1,7 @@
#object.assign <sup>[![Version Badge][npm-version-svg]][npm-url]</sup>
# object.assign <sup>[![Version Badge][npm-version-svg]][npm-url]</sup>
[![Build Status][travis-svg]][travis-url]
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![dependency status][deps-svg]][deps-url]
[![dev dependency status][dev-deps-svg]][dev-deps-url]
[![License][license-image]][license-url]
@@ -8,8 +9,6 @@
[![npm badge][npm-badge-png]][npm-url]
[![browser support][testling-png]][testling-url]
An Object.assign shim. Invoke its "shim" method to shim Object.assign if it is unavailable.
This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](http://www.ecma-international.org/ecma-262/6.0/#sec-object.assign). In an ES6 environment, it will also work properly with `Symbol`s.
@@ -126,10 +125,12 @@ Simply clone the repo, `npm install`, and run `npm test`
[deps-url]: https://david-dm.org/ljharb/object.assign
[dev-deps-svg]: https://david-dm.org/ljharb/object.assign/dev-status.svg?theme=shields.io
[dev-deps-url]: https://david-dm.org/ljharb/object.assign#info=devDependencies
[testling-png]: https://ci.testling.com/ljharb/object.assign.png
[testling-url]: https://ci.testling.com/ljharb/object.assign
[npm-badge-png]: https://nodei.co/npm/object.assign.png?downloads=true&stars=true
[license-image]: http://img.shields.io/npm/l/object.assign.svg
[license-url]: LICENSE
[downloads-image]: http://img.shields.io/npm/dm/object.assign.svg
[downloads-url]: http://npm-stat.com/charts.html?package=object.assign
[codecov-image]: https://codecov.io/gh/ljharb/object.assign/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/ljharb/object.assign/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/object.assign
[actions-url]: https://github.com/ljharb/object.assign/actions

View File

@@ -10,14 +10,11 @@ module.exports = assign.shim();
delete assign.shim;
},{"./":3,"object-keys":14}],2:[function(require,module,exports){
},{"./":3,"object-keys":15}],2:[function(require,module,exports){
'use strict';
// modified from https://github.com/es-shims/es6-shim
var keys = require('object-keys');
var canBeObject = function (obj) {
return typeof obj !== 'undefined' && obj !== null;
};
var objectKeys = require('object-keys');
var hasSymbols = require('has-symbols/shams')();
var callBound = require('call-bind/callBound');
var toObject = Object;
@@ -27,34 +24,41 @@ var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null;
// eslint-disable-next-line no-unused-vars
module.exports = function assign(target, source1) {
if (!canBeObject(target)) { throw new TypeError('target must be an object'); }
var objTarget = toObject(target);
var s, source, i, props, syms, value, key;
for (s = 1; s < arguments.length; ++s) {
source = toObject(arguments[s]);
props = keys(source);
if (target == null) { throw new TypeError('target must be an object'); }
var to = toObject(target); // step 1
if (arguments.length === 1) {
return to; // step 2
}
for (var s = 1; s < arguments.length; ++s) {
var from = toObject(arguments[s]); // step 3.a.i
// step 3.a.ii:
var keys = objectKeys(from);
var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols);
if (getSymbols) {
syms = getSymbols(source);
for (i = 0; i < syms.length; ++i) {
key = syms[i];
if ($propIsEnumerable(source, key)) {
$push(props, key);
var syms = getSymbols(from);
for (var j = 0; j < syms.length; ++j) {
var key = syms[j];
if ($propIsEnumerable(from, key)) {
$push(keys, key);
}
}
}
for (i = 0; i < props.length; ++i) {
key = props[i];
value = source[key];
if ($propIsEnumerable(source, key)) {
objTarget[key] = value;
// step 3.a.iii:
for (var i = 0; i < keys.length; ++i) {
var nextKey = keys[i];
if ($propIsEnumerable(from, nextKey)) { // step 3.a.iii.2
var propValue = from[nextKey]; // step 3.a.iii.2.a
to[nextKey] = propValue; // step 3.a.iii.2.b
}
}
}
return objTarget;
return to; // step 4
};
},{"call-bind/callBound":4,"has-symbols/shams":11,"object-keys":14}],3:[function(require,module,exports){
},{"call-bind/callBound":4,"has-symbols/shams":12,"object-keys":15}],3:[function(require,module,exports){
'use strict';
var defineProperties = require('define-properties');
@@ -78,7 +82,7 @@ defineProperties(bound, {
module.exports = bound;
},{"./implementation":2,"./polyfill":16,"./shim":17,"call-bind":5,"define-properties":6}],4:[function(require,module,exports){
},{"./implementation":2,"./polyfill":17,"./shim":18,"call-bind":5,"define-properties":6}],4:[function(require,module,exports){
'use strict';
var GetIntrinsic = require('get-intrinsic');
@@ -105,7 +109,9 @@ var $apply = GetIntrinsic('%Function.prototype.apply%');
var $call = GetIntrinsic('%Function.prototype.call%');
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
var $max = GetIntrinsic('%Math.max%');
if ($defineProperty) {
try {
@@ -116,8 +122,20 @@ if ($defineProperty) {
}
}
module.exports = function callBind() {
return $reflectApply(bind, $call, arguments);
module.exports = function callBind(originalFunction) {
var func = $reflectApply(bind, $call, arguments);
if ($gOPD && $defineProperty) {
var desc = $gOPD(func, 'length');
if (desc.configurable) {
// original length, plus the receiver, minus any additional arguments (after the receiver)
$defineProperty(
func,
'length',
{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
);
}
}
return func;
};
var applyBind = function applyBind() {
@@ -144,20 +162,9 @@ var isFunction = function (fn) {
return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
};
var arePropertyDescriptorsSupported = function () {
var obj = {};
try {
origDefineProperty(obj, 'x', { enumerable: false, value: obj });
// eslint-disable-next-line no-unused-vars, no-restricted-syntax
for (var _ in obj) { // jscs:ignore disallowUnusedVariables
return false;
}
return obj.x === obj;
} catch (e) { /* this is IE 8. */
return false;
}
};
var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();
var hasPropertyDescriptors = require('has-property-descriptors')();
var supportsDescriptors = origDefineProperty && hasPropertyDescriptors;
var defineProperty = function (object, name, value, predicate) {
if (name in object && (!isFunction(predicate) || !predicate())) {
@@ -171,7 +178,7 @@ var defineProperty = function (object, name, value, predicate) {
writable: true
});
} else {
object[name] = value;
object[name] = value; // eslint-disable-line no-param-reassign
}
};
@@ -190,7 +197,7 @@ defineProperties.supportsDescriptors = !!supportsDescriptors;
module.exports = defineProperties;
},{"object-keys":14}],7:[function(require,module,exports){
},{"has-property-descriptors":10,"object-keys":15}],7:[function(require,module,exports){
'use strict';
/* eslint no-invalid-this: 1 */
@@ -254,14 +261,6 @@ module.exports = Function.prototype.bind || implementation;
},{"./implementation":7}],9:[function(require,module,exports){
'use strict';
/* globals
AggregateError,
Atomics,
FinalizationRegistry,
SharedArrayBuffer,
WeakRef,
*/
var undefined;
var $SyntaxError = SyntaxError;
@@ -271,8 +270,7 @@ var $TypeError = TypeError;
// eslint-disable-next-line consistent-return
var getEvalledConstructor = function (expressionSyntax) {
try {
// eslint-disable-next-line no-new-func
return Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
} catch (e) {}
};
@@ -309,9 +307,7 @@ var hasSymbols = require('has-symbols')();
var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
var asyncGenFunction = getEvalledConstructor('async function* () {}');
var asyncGenFunctionPrototype = asyncGenFunction ? asyncGenFunction.prototype : undefined;
var asyncGenPrototype = asyncGenFunctionPrototype ? asyncGenFunctionPrototype.prototype : undefined;
var needsEval = {};
var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
@@ -321,10 +317,10 @@ var INTRINSICS = {
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
'%AsyncFromSyncIteratorPrototype%': undefined,
'%AsyncFunction%': getEvalledConstructor('async function () {}'),
'%AsyncGenerator%': asyncGenFunctionPrototype,
'%AsyncGeneratorFunction%': asyncGenFunction,
'%AsyncIteratorPrototype%': asyncGenPrototype ? getProto(asyncGenPrototype) : undefined,
'%AsyncFunction%': needsEval,
'%AsyncGenerator%': needsEval,
'%AsyncGeneratorFunction%': needsEval,
'%AsyncIteratorPrototype%': needsEval,
'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
'%Boolean%': Boolean,
@@ -341,7 +337,7 @@ var INTRINSICS = {
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
'%Function%': $Function,
'%GeneratorFunction%': getEvalledConstructor('function* () {}'),
'%GeneratorFunction%': needsEval,
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
@@ -382,6 +378,31 @@ var INTRINSICS = {
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
};
var doEval = function doEval(name) {
var value;
if (name === '%AsyncFunction%') {
value = getEvalledConstructor('async function () {}');
} else if (name === '%GeneratorFunction%') {
value = getEvalledConstructor('function* () {}');
} else if (name === '%AsyncGeneratorFunction%') {
value = getEvalledConstructor('async function* () {}');
} else if (name === '%AsyncGenerator%') {
var fn = doEval('%AsyncGeneratorFunction%');
if (fn) {
value = fn.prototype;
}
} else if (name === '%AsyncIteratorPrototype%') {
var gen = doEval('%AsyncGenerator%');
if (gen) {
value = getProto(gen.prototype);
}
}
INTRINSICS[name] = value;
return value;
};
var LEGACY_ALIASES = {
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
'%ArrayPrototype%': ['Array', 'prototype'],
@@ -441,11 +462,19 @@ var hasOwn = require('has');
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);
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
var stringToPath = function stringToPath(string) {
var first = $strSlice(string, 0, 1);
var last = $strSlice(string, -1);
if (first === '%' && last !== '%') {
throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
} else if (last === '%' && first !== '%') {
throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
}
var result = [];
$replace(string, rePropName, function (match, number, quote, subString) {
result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
@@ -464,6 +493,9 @@ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
if (hasOwn(INTRINSICS, intrinsicName)) {
var value = INTRINSICS[intrinsicName];
if (value === needsEval) {
value = doEval(intrinsicName);
}
if (typeof value === 'undefined' && !allowMissing) {
throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
}
@@ -502,6 +534,17 @@ module.exports = function GetIntrinsic(name, allowMissing) {
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
var part = parts[i];
var first = $strSlice(part, 0, 1);
var last = $strSlice(part, -1);
if (
(
(first === '"' || first === "'" || first === '`')
|| (last === '"' || last === "'" || last === '`')
)
&& first !== last
) {
throw new $SyntaxError('property names with quotes must have matching quotes');
}
if (part === 'constructor' || !isOwn) {
skipFurtherCaching = true;
}
@@ -512,13 +555,16 @@ module.exports = function GetIntrinsic(name, allowMissing) {
if (hasOwn(INTRINSICS, intrinsicRealName)) {
value = INTRINSICS[intrinsicRealName];
} else if (value != null) {
if (!(part in value)) {
if (!allowMissing) {
throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
}
return void undefined;
}
if ($gOPD && (i + 1) >= parts.length) {
var desc = $gOPD(value, part);
isOwn = !!desc;
if (!allowMissing && !(part in value)) {
throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
}
// By convention, when a data property is converted to an accessor
// property to emulate a data property that does not suffer from
// the override mistake, that accessor's getter is marked with
@@ -544,11 +590,45 @@ module.exports = function GetIntrinsic(name, allowMissing) {
return value;
};
},{"function-bind":8,"has":12,"has-symbols":10}],10:[function(require,module,exports){
(function (global){(function (){
},{"function-bind":8,"has":13,"has-symbols":11}],10:[function(require,module,exports){
'use strict';
var origSymbol = global.Symbol;
var GetIntrinsic = require('get-intrinsic');
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;
};
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
// node v0.6 has a bug where array lengths can be Set but not Defined
if (!hasPropertyDescriptors()) {
return null;
}
try {
return $defineProperty([], 'length', { value: 1 }).length !== 1;
} catch (e) {
// In Firefox 4-22, defining length on an array throws an exception.
return true;
}
};
module.exports = hasPropertyDescriptors;
},{"get-intrinsic":9}],11:[function(require,module,exports){
'use strict';
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
var hasSymbolSham = require('./shams');
module.exports = function hasNativeSymbols() {
@@ -560,8 +640,7 @@ module.exports = function hasNativeSymbols() {
return hasSymbolSham();
};
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"./shams":11}],11:[function(require,module,exports){
},{"./shams":12}],12:[function(require,module,exports){
'use strict';
/* eslint complexity: [2, 18], max-statements: [2, 33] */
@@ -587,7 +666,7 @@ module.exports = function hasSymbols() {
var symVal = 42;
obj[sym] = symVal;
for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax
for (sym 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; }
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
@@ -605,14 +684,14 @@ module.exports = function hasSymbols() {
return true;
};
},{}],12:[function(require,module,exports){
},{}],13:[function(require,module,exports){
'use strict';
var bind = require('function-bind');
module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
},{"function-bind":8}],13:[function(require,module,exports){
},{"function-bind":8}],14:[function(require,module,exports){
'use strict';
var keysShim;
@@ -736,7 +815,7 @@ if (!Object.keys) {
}
module.exports = keysShim;
},{"./isArguments":15}],14:[function(require,module,exports){
},{"./isArguments":16}],15:[function(require,module,exports){
'use strict';
var slice = Array.prototype.slice;
@@ -770,7 +849,7 @@ keysShim.shim = function shimObjectKeys() {
module.exports = keysShim;
},{"./implementation":13,"./isArguments":15}],15:[function(require,module,exports){
},{"./implementation":14,"./isArguments":16}],16:[function(require,module,exports){
'use strict';
var toStr = Object.prototype.toString;
@@ -789,7 +868,7 @@ module.exports = function isArguments(value) {
return isArgs;
};
},{}],16:[function(require,module,exports){
},{}],17:[function(require,module,exports){
'use strict';
var implementation = require('./implementation');
@@ -846,7 +925,7 @@ module.exports = function getPolyfill() {
return Object.assign;
};
},{"./implementation":2}],17:[function(require,module,exports){
},{"./implementation":2}],18:[function(require,module,exports){
'use strict';
var define = require('define-properties');
@@ -862,4 +941,4 @@ module.exports = function shimAssign() {
return polyfill;
};
},{"./polyfill":16,"define-properties":6}]},{},[1]);
},{"./polyfill":17,"define-properties":6}]},{},[1]);

View File

@@ -1,10 +1,7 @@
'use strict';
// modified from https://github.com/es-shims/es6-shim
var keys = require('object-keys');
var canBeObject = function (obj) {
return typeof obj !== 'undefined' && obj !== null;
};
var objectKeys = require('object-keys');
var hasSymbols = require('has-symbols/shams')();
var callBound = require('call-bind/callBound');
var toObject = Object;
@@ -14,29 +11,36 @@ var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null;
// eslint-disable-next-line no-unused-vars
module.exports = function assign(target, source1) {
if (!canBeObject(target)) { throw new TypeError('target must be an object'); }
var objTarget = toObject(target);
var s, source, i, props, syms, value, key;
for (s = 1; s < arguments.length; ++s) {
source = toObject(arguments[s]);
props = keys(source);
if (target == null) { throw new TypeError('target must be an object'); }
var to = toObject(target); // step 1
if (arguments.length === 1) {
return to; // step 2
}
for (var s = 1; s < arguments.length; ++s) {
var from = toObject(arguments[s]); // step 3.a.i
// step 3.a.ii:
var keys = objectKeys(from);
var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols);
if (getSymbols) {
syms = getSymbols(source);
for (i = 0; i < syms.length; ++i) {
key = syms[i];
if ($propIsEnumerable(source, key)) {
$push(props, key);
var syms = getSymbols(from);
for (var j = 0; j < syms.length; ++j) {
var key = syms[j];
if ($propIsEnumerable(from, key)) {
$push(keys, key);
}
}
}
for (i = 0; i < props.length; ++i) {
key = props[i];
value = source[key];
if ($propIsEnumerable(source, key)) {
objTarget[key] = value;
// step 3.a.iii:
for (var i = 0; i < keys.length; ++i) {
var nextKey = keys[i];
if ($propIsEnumerable(from, nextKey)) { // step 3.a.iii.2
var propValue = from[nextKey]; // step 3.a.iii.2.a
to[nextKey] = propValue; // step 3.a.iii.2.b
}
}
}
return objTarget;
return to; // step 4
};

View File

@@ -1,6 +1,6 @@
{
"name": "object.assign",
"version": "4.1.2",
"version": "4.1.4",
"author": "Jordan Harband",
"funding": {
"url": "https://github.com/sponsors/ljharb"
@@ -9,6 +9,7 @@
"license": "MIT",
"main": "index.js",
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"pretest": "npm run lint && es-shim-api --bound",
"test": "npm run tests-only && npm run test:ses",
"posttest": "aud --production",
@@ -19,7 +20,8 @@
"test:ses": "node test/ses-compat",
"lint": "eslint .",
"build": "mkdir -p dist && browserify browserShim.js > dist/browser.js",
"prepublish": "safe-publish-latest && npm run build"
"prepublishOnly": "safe-publish-latest && npm run build",
"prepublish": "not-in-publish || npm run prepublishOnly"
},
"repository": {
"type": "git",
@@ -39,25 +41,28 @@
"shim"
],
"dependencies": {
"call-bind": "^1.0.0",
"define-properties": "^1.1.3",
"has-symbols": "^1.0.1",
"call-bind": "^1.0.2",
"define-properties": "^1.1.4",
"has-symbols": "^1.0.3",
"object-keys": "^1.1.1"
},
"devDependencies": {
"@es-shims/api": "^2.1.2",
"@ljharb/eslint-config": "^17.2.0",
"aud": "^1.1.2",
"@es-shims/api": "^2.2.3",
"@ljharb/eslint-config": "^21.0.0",
"aud": "^2.0.0",
"browserify": "^16.5.2",
"eslint": "^7.12.1",
"eslint": "=8.8.0",
"for-each": "^0.3.3",
"functions-have-names": "^1.2.1",
"functions-have-names": "^1.2.3",
"has": "^1.0.3",
"has-strict-mode": "^1.0.1",
"is": "^3.3.0",
"mock-property": "^1.0.0",
"npmignore": "^0.3.0",
"nyc": "^10.3.2",
"safe-publish-latest": "^1.1.4",
"ses": "^0.10.4",
"tape": "^5.0.1"
"safe-publish-latest": "^2.0.0",
"ses": "^0.11.1",
"tape": "^5.5.3"
},
"testling": {
"files": "test/index.js",
@@ -79,5 +84,13 @@
},
"engines": {
"node": ">= 0.4"
},
"publishConfig": {
"ignore": [
".github/workflows",
"bower.json",
"browserShim.js",
"!dist/"
]
}
}

18458
node_modules/object.assign/test.html generated vendored Normal file

File diff suppressed because one or more lines are too long

19
node_modules/object.assign/test/implementation.js generated vendored Normal file
View File

@@ -0,0 +1,19 @@
'use strict';
var implementation = require('../implementation');
var callBind = require('call-bind');
var test = require('tape');
var hasStrictMode = require('has-strict-mode')();
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad first arg/receiver', { skip: !hasStrictMode }, function (st) {
st['throws'](function () { implementation(undefined); }, TypeError, 'undefined is not an object');
st['throws'](function () { implementation(null); }, TypeError, 'null is not an object');
st.end();
});
runTests(callBind(implementation, Object), t);
t.end();
});

View File

@@ -3,6 +3,7 @@
var hasSymbols = require('has-symbols/shams')();
var forEach = require('for-each');
var has = require('has');
var mockProperty = require('mock-property');
module.exports = function (assign, t) {
t.test('error cases', function (st) {
@@ -160,11 +161,7 @@ module.exports = function (assign, t) {
});
t.test('does not fail when symbols are not present', { skip: !Object.isFrozen || Object.isFrozen(Object) }, function (st) {
var getSyms;
if (hasSymbols) {
getSyms = Object.getOwnPropertySymbols;
delete Object.getOwnPropertySymbols;
}
st.teardown(mockProperty(Object, 'getOwnPropertySymbols', { 'delete': true }));
var visited = [];
var obj = {};
@@ -184,8 +181,6 @@ module.exports = function (assign, t) {
if (hasSymbols) {
st.equal(target[symbol], Infinity);
Object.getOwnPropertySymbols = getSyms;
}
st.end();
});