@graphql-yoga/subscription
Advanced tools
Comparing version 2.0.0 to 3.0.0-canary-66e3b48.0
18
index.js
@@ -40,9 +40,7 @@ 'use strict'; | ||
const createPubSub = (config) => { | ||
var _a; | ||
const { Event, EventTarget } = resolveGlobalConfig(config === null || config === void 0 ? void 0 : config.event); | ||
const target = (_a = config === null || config === void 0 ? void 0 : config.eventTarget) !== null && _a !== void 0 ? _a : new EventTarget(); | ||
const { Event, EventTarget } = resolveGlobalConfig(config?.event); | ||
const target = config?.eventTarget ?? new EventTarget(); | ||
return { | ||
publish(routingKey, ...args) { | ||
var _a; | ||
const payload = (_a = args[1]) !== null && _a !== void 0 ? _a : args[0]; | ||
const payload = args[1] ?? args[0]; | ||
const topic = args[1] === undefined | ||
@@ -76,4 +74,3 @@ ? routingKey | ||
stop.then(() => { | ||
var _a; | ||
(_a = iterable.return) === null || _a === void 0 ? void 0 : _a.call(iterable); | ||
iterable.return?.(); | ||
}); | ||
@@ -91,4 +88,3 @@ let latest; | ||
stop.then(() => { | ||
var _a; | ||
(_a = iterable.return) === null || _a === void 0 ? void 0 : _a.call(iterable); | ||
iterable.return?.(); | ||
}); | ||
@@ -136,5 +132,3 @@ let latest; | ||
enumerable: true, | ||
get: function () { | ||
return repeater.Repeater; | ||
} | ||
get: function () { return repeater.Repeater; } | ||
}); | ||
@@ -141,0 +135,0 @@ exports.createPubSub = createPubSub; |
{ | ||
"name": "@graphql-yoga/subscription", | ||
"version": "2.0.0", | ||
"version": "3.0.0-canary-66e3b48.0", | ||
"description": "", | ||
@@ -30,8 +30,20 @@ "dependencies": { | ||
".": { | ||
"require": "./index.js", | ||
"import": "./index.mjs" | ||
"require": { | ||
"default": "./index.js", | ||
"types": "./index.d.ts" | ||
}, | ||
"import": { | ||
"default": "./index.mjs", | ||
"types": "./index.d.ts" | ||
} | ||
}, | ||
"./*": { | ||
"require": "./*.js", | ||
"import": "./*.mjs" | ||
"require": { | ||
"default": "./*.js", | ||
"types": "./*.d.ts" | ||
}, | ||
"import": { | ||
"default": "./*.mjs", | ||
"types": "./*.d.ts" | ||
} | ||
}, | ||
@@ -38,0 +50,0 @@ "./package.json": "./package.json" |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
17459
340
2