@dldc/pubsub
Advanced tools
Comparing version 5.1.3 to 5.2.0
@@ -1,2 +0,2 @@ | ||
import * as erreur from 'erreur'; | ||
import * as _dldc_erreur from '@dldc/erreur'; | ||
@@ -78,13 +78,13 @@ type Unsubscribe = () => void; | ||
declare const SuubErreur: { | ||
SubscriptionDestroyed: erreur.ErreurDeclaration<null, []>; | ||
MaxSubscriptionCountReached: erreur.ErreurDeclaration<null, []>; | ||
MaxRecursiveEmitReached: erreur.ErreurDeclaration<{ | ||
SubscriptionDestroyed: _dldc_erreur.IErreurType<undefined, false, []>; | ||
MaxSubscriptionCountReached: _dldc_erreur.IErreurType<undefined, false, []>; | ||
MaxRecursiveEmitReached: _dldc_erreur.IErreurType<{ | ||
limit: number; | ||
}, [limit: number]>; | ||
MaxUnsubscribeAllLoopReached: erreur.ErreurDeclaration<{ | ||
}, false, [limit: number]>; | ||
MaxUnsubscribeAllLoopReached: _dldc_erreur.IErreurType<{ | ||
limit: number; | ||
}, [limit: number]>; | ||
InvalidCallback: erreur.ErreurDeclaration<null, []>; | ||
}, false, [limit: number]>; | ||
InvalidCallback: _dldc_erreur.IErreurType<undefined, false, []>; | ||
}; | ||
export { ChannelMethod, DeferredMethod, IMultiSubscription, ISubscription, ISubscriptionOptions, IVoidSubscription, IsSubscribedByIdMethod, IsSubscribedMethod, MultiCreateChannelMethod, MultiCreateVoidChannelMethod, OnUnsubscribed, SubscribeByIdMethod, SubscribeMethod, SubscriptionCallback, Suub, SuubErreur, Unsubscribe, UnsubscribeAllMethod, UnsubscribeByIdMethod, UnsubscribeMethod, VoidChannelMethod, VoidIsSubscribedByIdMethod, VoidIsSubscribedMethod, VoidSubscribeByIdMethod, VoidSubscribeMethod, VoidSubscriptionCallback, VoidUnsubscribeByIdMethod, VoidUnsubscribeMethod }; |
@@ -27,3 +27,3 @@ "use strict"; | ||
module.exports = __toCommonJS(mod_exports); | ||
var import_erreur = require("erreur"); | ||
var import_erreur = require("@dldc/erreur"); | ||
var Suub = (() => { | ||
@@ -273,21 +273,31 @@ const DEFAULT_CHANNEL = Symbol("DEFAULT_CHANNEL"); | ||
var SuubErreur = { | ||
SubscriptionDestroyed: import_erreur.Erreur.declare( | ||
"SubscriptionDestroyed", | ||
() => `The subscription has been destroyed` | ||
).withTransform(() => null), | ||
MaxSubscriptionCountReached: import_erreur.Erreur.declare( | ||
"MaxSubscriptionCountReached", | ||
() => `The maxSubscriptionCount has been reached. If this is expected you can use the maxSubscriptionCount option to raise the limit` | ||
).withTransform(() => null), | ||
MaxRecursiveEmitReached: import_erreur.Erreur.declare( | ||
SubscriptionDestroyed: import_erreur.ErreurType.defineEmpty("SubscriptionDestroyed", (err, provider) => { | ||
return err.with(provider).withMessage(`The subscription has been destroyed`); | ||
}), | ||
MaxSubscriptionCountReached: import_erreur.ErreurType.defineEmpty("MaxSubscriptionCountReached", (err, provider) => { | ||
return err.with(provider).withMessage( | ||
`The maxSubscriptionCount has been reached. If this is expected you can use the maxSubscriptionCount option to raise the limit` | ||
); | ||
}), | ||
MaxRecursiveEmitReached: import_erreur.ErreurType.defineWithTransform( | ||
"MaxRecursiveEmitReached", | ||
({ limit }) => `The maxRecursiveEmit limit (${limit}) has been reached, did you emit() in a callback ? If this is expected you can use the maxRecursiveEmit option to raise the limit` | ||
).withTransform((limit) => ({ limit })), | ||
MaxUnsubscribeAllLoopReached: import_erreur.Erreur.declare( | ||
(limit) => ({ limit }), | ||
(err, provider, { limit }) => { | ||
return err.with(provider).withMessage( | ||
`The maxRecursiveEmit limit (${limit}) has been reached, did you emit() in a callback ? If this is expected you can use the maxRecursiveEmit option to raise the limit` | ||
); | ||
} | ||
), | ||
MaxUnsubscribeAllLoopReached: import_erreur.ErreurType.defineWithTransform( | ||
"MaxUnsubscribeAllLoopReached", | ||
({ limit }) => `The maxUnsubscribeAllLoop limit (${limit}) has been reached, did you call subscribe() in the onUnsubscribe callback then called unsubscribeAll ? If this is expected you can use the maxUnsubscribeAllLoop option to raise the limit` | ||
).withTransform((limit) => ({ limit })), | ||
InvalidCallback: import_erreur.Erreur.declare("InvalidCallback", () => `The callback is not a function`).withTransform( | ||
() => null | ||
) | ||
(limit) => ({ limit }), | ||
(err, provider, { limit }) => { | ||
return err.with(provider).withMessage( | ||
`The maxUnsubscribeAllLoop limit (${limit}) has been reached, did you call subscribe() in the onUnsubscribe callback then called unsubscribeAll ? If this is expected you can use the maxUnsubscribeAllLoop option to raise the limit` | ||
); | ||
} | ||
), | ||
InvalidCallback: import_erreur.ErreurType.defineEmpty("InvalidCallback", (err, provider) => { | ||
return err.with(provider).withMessage(`The callback is not a function`); | ||
}) | ||
}; | ||
@@ -294,0 +304,0 @@ // Annotate the CommonJS export names for ESM import in node: |
{ | ||
"name": "@dldc/pubsub", | ||
"version": "5.1.3", | ||
"version": "5.2.0", | ||
"description": "A simple pub/sub written in Typescript", | ||
@@ -47,10 +47,10 @@ "keywords": [ | ||
"dependencies": { | ||
"erreur": "^2.1.0" | ||
"@dldc/erreur": "^3.0.6" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.3.1", | ||
"@typescript-eslint/eslint-plugin": "^5.59.11", | ||
"@typescript-eslint/parser": "^5.59.11", | ||
"@vitest/coverage-v8": "^0.32.0", | ||
"eslint": "^8.42.0", | ||
"@types/node": "^20.3.3", | ||
"@typescript-eslint/eslint-plugin": "^5.61.0", | ||
"@typescript-eslint/parser": "^5.61.0", | ||
"@vitest/coverage-v8": "^0.32.4", | ||
"eslint": "^8.44.0", | ||
"eslint-config-prettier": "^8.8.0", | ||
@@ -60,6 +60,5 @@ "prettier": "^2.8.8", | ||
"rimraf": "^5.0.1", | ||
"tslib": "^2.5.3", | ||
"tsup": "^6.7.0", | ||
"typescript": "^5.1.3", | ||
"vitest": "^0.32.0" | ||
"tsup": "^7.1.0", | ||
"typescript": "^5.1.6", | ||
"vitest": "^0.32.4" | ||
}, | ||
@@ -66,0 +65,0 @@ "packageManager": "pnpm@8.6.1", |
Sorry, the diff of this file is not supported yet
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
40160
12
7
674
+ Added@dldc/erreur@^3.0.6
+ Added@dldc/erreur@3.1.0(transitive)
+ Added@dldc/stack@3.1.4(transitive)
- Removederreur@^2.1.0
- Removederreur@2.1.0(transitive)