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

@ -9,25 +9,9 @@
"max-lines-per-function": "off",
"new-cap": ["error", {
"capIsNewExceptions": [
"AddValueToKeyedGroup",
"Call",
"CreateDataPropertyOrThrow",
"GetIntrinsic",
"GetIterator",
"GetMethod",
"GroupBy",
"IsCallable",
"IteratorClose",
"IteratorComplete",
"IteratorNext",
"IteratorStep",
"IteratorValue",
"OrdinaryObjectCreate",
"RequireObjectCoercible",
"ThrowCompletion",
"ToPropertyKey",
"ToString",
"Type",
],
}],
},

View file

@ -5,6 +5,23 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v1.0.3](https://github.com/es-shims/Object.groupBy/compare/v1.0.2...v1.0.3) - 2024-03-18
### Commits
- [Deps] update `call-bind`, `es-abstract` [`f1d3e70`](https://github.com/es-shims/Object.groupBy/commit/f1d3e701aff0a36e4d7373059812a9b978c7ad7f)
- [Dev Deps] update `tape` [`272a736`](https://github.com/es-shims/Object.groupBy/commit/272a73672f27f90fd6d5054ca13e039c45815a8a)
- [meta] add missing `engines.node` [`7a9c8b0`](https://github.com/es-shims/Object.groupBy/commit/7a9c8b0f636a5703ea923c9d0721fbf5861c6949)
## [v1.0.2](https://github.com/es-shims/Object.groupBy/compare/v1.0.1...v1.0.2) - 2024-02-04
### Commits
- [Refactor] use `es-errors` where possible, so things that only need those do not need `get-intrinsic` [`a6c01d0`](https://github.com/es-shims/Object.groupBy/commit/a6c01d0ec46e7bb5ac68e8bfdce3a64fddc6b0a1)
- [Deps] update `call-bind`, `define-properties`, `es-abstract`, `get-intrinsic` [`65383da`](https://github.com/es-shims/Object.groupBy/commit/65383dad0b036ad3459def995c223a4afb1f6a50)
- [Dev Deps] update `aud`, `npmignore`, `tape` [`e8aeb5b`](https://github.com/es-shims/Object.groupBy/commit/e8aeb5b7b1d88bfbe8be1da369a374ec36cb459f)
- [Robustness] `filter` is not available pre-ES5 [`8f185b8`](https://github.com/es-shims/Object.groupBy/commit/8f185b851f155e41442714bea792b07df778f986)
## [v1.0.1](https://github.com/es-shims/Object.groupBy/compare/v1.0.0...v1.0.1) - 2023-08-28
### Commits

View file

@ -1,26 +0,0 @@
'use strict';
var callBound = require('call-bind/callBound');
var GetIntrinsic = require('get-intrinsic');
var SameValue = require('es-abstract/2023/SameValue');
var $TypeError = GetIntrinsic('%TypeError%');
var $filter = callBound('Array.prototype.filter');
var $push = callBound('Array.prototype.push');
module.exports = function AddValueToKeyedGroup(groups, key, value) {
var found = $filter(groups, function (group) {
return SameValue(group['[[Key]]'], key); // eslint-disable-line new-cap
});
if (found.length > 0) {
var g = found[0];
if (found.length !== 1) {
throw new $TypeError('Assertion failed: more than 1 Record inside `groups` has a `[[Key]]` that is SameValue to `key`');
}
$push(g['[[Elements]]'], value); // step 1.a.ii
} else {
var group = { '[[Key]]': key, '[[Elements]]': [value] }; // eslint-disable-line sort-keys
$push(groups, group); // step 3
}
};

View file

@ -1,77 +0,0 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var AddValueToKeyedGroup = require('./AddValueToKeyedGroup');
var Call = require('es-abstract/2023/Call');
var GetIterator = require('es-abstract/2023/GetIterator');
var IsCallable = require('es-abstract/2023/IsCallable');
var IteratorClose = require('es-abstract/2023/IteratorClose');
var IteratorStep = require('es-abstract/2023/IteratorStep');
var IteratorValue = require('es-abstract/2023/IteratorValue');
var RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');
var ThrowCompletion = require('es-abstract/2023/ThrowCompletion');
var ToPropertyKey = require('es-abstract/2023/ToPropertyKey');
var maxSafeInteger = require('es-abstract/helpers/maxSafeInteger');
var $TypeError = GetIntrinsic('%TypeError%');
module.exports = function GroupBy(items, callbackfn, coercion) {
if (coercion !== 'property' && coercion !== 'zero') {
throw new $TypeError('Assertion failed: `coercion` must be `"property"` or `"zero"`');
}
RequireObjectCoercible(items); // step 1
if (!IsCallable(callbackfn)) { // step 2
throw new $TypeError('`callbackfn` must be callable');
}
var groups = []; // step 3
var iteratorRecord = GetIterator(items, 'sync'); // step 4
var k = 0; // step 5
// eslint-disable-next-line no-constant-condition
while (true) { // step 6
if (k >= maxSafeInteger) { // step 6.a
var error = ThrowCompletion(new $TypeError('Iteration count exceeds the max safe integer value')); // step 6.a.i
return IteratorClose(iteratorRecord, error); // step 6.a.ii
}
var next = IteratorStep(iteratorRecord); // step 6.b
if (!next) { // step 6.c
return groups; // step 6.c.i
}
var value = IteratorValue(next); // step 6.d
var key;
try {
key = Call(callbackfn, undefined, [value, k]); // step 6.e
} catch (e) {
IteratorClose(iteratorRecord, ThrowCompletion(e)); // step 6.f
}
if (coercion === 'property') { // step 6.g
try {
key = ToPropertyKey(key); // step 6.g.i
} catch (e) {
IteratorClose(iteratorRecord, ThrowCompletion(e)); // step 6.g.ii
}
} else {
if (coercion !== 'zero') {
throw new $TypeError('Assertion failed: `coercion` should be `"zero"` here'); // step 6.h.i
}
if (key === 0) { // step 6.h.ii
key = 0; // handle negative zero
}
}
AddValueToKeyedGroup(groups, key, value); // step 6.i
k += 1; // step 6.j
}
};

View file

@ -1,14 +1,14 @@
'use strict';
var CreateDataPropertyOrThrow = require('es-abstract/2023/CreateDataPropertyOrThrow');
var OrdinaryObjectCreate = require('es-abstract/2023/OrdinaryObjectCreate');
var CreateDataPropertyOrThrow = require('es-abstract/2024/CreateDataPropertyOrThrow');
var OrdinaryObjectCreate = require('es-abstract/2024/OrdinaryObjectCreate');
var forEach = require('es-abstract/helpers/forEach');
var GroupBy = require('./aos/GroupBy'); // TODO: replace with es-abstract 2024 implementation
var GroupBy = require('es-abstract/2024/GroupBy'); // TODO: replace with es-abstract 2024 implementation
module.exports = function groupBy(items, callbackfn) {
var groups = GroupBy(items, callbackfn, 'property'); // step 1
var groups = GroupBy(items, callbackfn, 'PROPERTY'); // step 1
var obj = OrdinaryObjectCreate(null); // step 2

View file

@ -1,6 +1,6 @@
{
"name": "object.groupby",
"version": "1.0.1",
"version": "1.0.3",
"description": "An ESnext spec-compliant `Object.groupBy` shim/polyfill/replacement that works as far down as ES3.",
"main": "index.js",
"exports": {
@ -48,7 +48,7 @@
"devDependencies": {
"@es-shims/api": "^2.4.2",
"@ljharb/eslint-config": "^21.1.0",
"aud": "^2.0.3",
"aud": "^2.0.4",
"auto-changelog": "^2.4.0",
"es-value-fixtures": "^1.4.2",
"eslint": "=8.8.0",
@ -56,16 +56,16 @@
"for-each": "^0.3.3",
"functions-have-names": "^1.2.3",
"in-publish": "^2.0.1",
"npmignore": "^0.3.0",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.1",
"safe-publish-latest": "^2.0.0",
"tape": "^5.6.6"
"tape": "^5.7.5"
},
"dependencies": {
"call-bind": "^1.0.2",
"define-properties": "^1.2.0",
"es-abstract": "^1.22.1",
"get-intrinsic": "^1.2.1"
"call-bind": "^1.0.7",
"define-properties": "^1.2.1",
"es-abstract": "^1.23.2"
},
"auto-changelog": {
"output": "CHANGELOG.md",
@ -79,5 +79,8 @@
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}