Bump the npm group with 3 updates (#2303)

* ---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update checked-in dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
dependabot[bot] 2024-05-20 12:17:29 -07:00 committed by GitHub
parent ebd27c09f6
commit b1bd8da5e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
212 changed files with 11182 additions and 16383 deletions

View file

@ -5,22 +5,22 @@ function flattenOptions(options) {
return {
capture: Boolean(options),
once: false,
passive: false
passive: false,
};
}
return {
capture: Boolean(options.capture),
once: Boolean(options.once),
passive: Boolean(options.passive)
passive: Boolean(options.passive),
};
}
function not(fn) {
return function() {
return function () {
return !fn.apply(this, arguments);
};
}
function hasListenerFilter(listener, capture) {
return function(listenerSpec) {
return function (listenerSpec) {
return (
listenerSpec.capture === capture &&
listenerSpec.listener === listener
@ -33,7 +33,7 @@ var EventTarget = {
addEventListener: function addEventListener(
event,
listener,
providedOptions
providedOptions,
) {
// 3. Let capture, passive, and once be the result of flattening more options.
// Flatten property before executing step 2,
@ -59,13 +59,13 @@ var EventTarget = {
// callback, capture is capture, passive is passive, and once is once.
if (
!this.eventListeners[event].some(
hasListenerFilter(listener, options.capture)
hasListenerFilter(listener, options.capture),
)
) {
this.eventListeners[event].push({
listener: listener,
capture: options.capture,
once: options.once
once: options.once,
});
}
},
@ -74,7 +74,7 @@ var EventTarget = {
removeEventListener: function removeEventListener(
event,
listener,
providedOptions
providedOptions,
) {
if (!this.eventListeners || !this.eventListeners[event]) {
return;
@ -88,7 +88,7 @@ var EventTarget = {
// and capture is capture, then set that event listeners
// removed to true and remove it from the associated list of event listeners.
this.eventListeners[event] = this.eventListeners[event].filter(
not(hasListenerFilter(listener, options.capture))
not(hasListenerFilter(listener, options.capture)),
);
},
@ -103,10 +103,10 @@ var EventTarget = {
// Remove listeners, that should be dispatched once
// before running dispatch loop to avoid nested dispatch issues
self.eventListeners[type] = listeners.filter(function(listenerSpec) {
self.eventListeners[type] = listeners.filter(function (listenerSpec) {
return !listenerSpec.once;
});
listeners.forEach(function(listenerSpec) {
listeners.forEach(function (listenerSpec) {
var listener = listenerSpec.listener;
if (typeof listener === "function") {
listener.call(self, event);
@ -116,7 +116,7 @@ var EventTarget = {
});
return Boolean(event.defaultPrevented);
}
},
};
module.exports = EventTarget;

View file

@ -5,7 +5,7 @@ function Event(type, bubbles, cancelable, target) {
}
Event.prototype = {
initEvent: function(type, bubbles, cancelable, target) {
initEvent: function (type, bubbles, cancelable, target) {
this.type = type;
this.bubbles = bubbles;
this.cancelable = cancelable;
@ -14,11 +14,11 @@ Event.prototype = {
},
// eslint-disable-next-line no-empty-function
stopPropagation: function() {},
stopPropagation: function () {},
preventDefault: function() {
preventDefault: function () {
this.defaultPrevented = true;
}
},
};
module.exports = Event;

View file

@ -4,5 +4,5 @@ module.exports = {
Event: require("./event"),
ProgressEvent: require("./progress-event"),
CustomEvent: require("./custom-event"),
EventTarget: require("./event-target")
EventTarget: require("./event-target"),
};