New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

boring-router

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

boring-router - npm Package Compare versions

Comparing version 0.3.4 to 0.3.5

8

bld/library/route-match/route-match.d.ts

@@ -35,4 +35,4 @@ import { IAutorunOptions, IReactionDisposer, IReactionPublic } from 'mobx';

export declare type RouteBeforeLeaveCallback = () => Promise<boolean | void> | boolean | void;
export declare type RouteWillEnterCallback<TRouteMatch extends RouteMatch = RouteMatch> = (next: TRouteMatch['$next']) => void;
export declare type RouteWillUpdateCallback<TRouteMatch extends RouteMatch = RouteMatch> = (next: TRouteMatch['$next'], data: RouteUpdateCallbackData) => void;
export declare type RouteWillEnterCallback<TRouteMatch extends RouteMatch = RouteMatch> = (next: TRouteMatch['$next']) => Promise<void> | void;
export declare type RouteWillUpdateCallback<TRouteMatch extends RouteMatch = RouteMatch> = (next: TRouteMatch['$next'], data: RouteUpdateCallbackData) => Promise<void> | void;
export interface RouteWillUpdateOptions {

@@ -45,3 +45,3 @@ traceDescendants: boolean;

}
export declare type RouteWillLeaveCallback = () => void;
export declare type RouteWillLeaveCallback = () => Promise<void> | void;
export declare type RouteAfterEnterCallback = () => void;

@@ -69,3 +69,3 @@ /**

export declare type RouteBeforeEnterOrUpdateCallback<TRouteMatch extends RouteMatch = RouteMatch> = (next: TRouteMatch['$next']) => Promise<boolean | void> | boolean | void;
export declare type RouteWillEnterOrUpdateCallback<TRouteMatch extends RouteMatch = RouteMatch> = (next: TRouteMatch['$next']) => Promise<boolean | void> | boolean | void;
export declare type RouteWillEnterOrUpdateCallback<TRouteMatch extends RouteMatch = RouteMatch> = (next: TRouteMatch['$next']) => Promise<void> | void;
export declare type RouteAfterEnterOrUpdateCallback = () => void;

@@ -72,0 +72,0 @@ export declare type RouteServiceFactory<TRouteMatch extends RouteMatch> = (match: TRouteMatch) => IRouteService<TRouteMatch> | Promise<IRouteService<TRouteMatch>>;

@@ -335,9 +335,11 @@ "use strict";

}
for (let callback of this._willLeaveCallbackSet) {
_utils_1.tolerate(callback);
}
let service = await this._getService();
if (service && service.willLeave) {
_utils_1.tolerate(() => service.willLeave());
}
await Promise.all([
...Array.from(this._willLeaveCallbackSet).map(callback => _utils_1.tolerate(callback)),
(async () => {
let service = await this._getService();
if (service && service.willLeave) {
return _utils_1.tolerate(() => service.willLeave());
}
})(),
]);
}

@@ -347,9 +349,11 @@ /** @internal */

let next = this.$next;
for (let callback of this._willEnterCallbackSet) {
_utils_1.tolerate(callback, next);
}
let service = await this._getService();
if (service && service.willEnter) {
_utils_1.tolerate(() => service.willEnter(next));
}
await Promise.all([
...Array.from(this._willEnterCallbackSet).map(callback => _utils_1.tolerate(callback, next)),
(async () => {
let service = await this._getService();
if (service && service.willEnter) {
return _utils_1.tolerate(() => service.willEnter(next));
}
})(),
]);
}

@@ -359,11 +363,13 @@ /** @internal */

let next = this.$next;
for (let { callback, options } of this._willUpdateEntrySet) {
if (triggeredByDescendants ? options && options.traceDescendants : true) {
_utils_1.tolerate(callback, next, { descendants: triggeredByDescendants });
}
}
let service = await this._getService();
if (service && service.willUpdate) {
_utils_1.tolerate(() => service.willUpdate(next, { descendants: triggeredByDescendants }));
}
await Promise.all([
...Array.from(this._willUpdateEntrySet)
.filter(({ options }) => triggeredByDescendants ? options && options.traceDescendants : true)
.map(({ callback }) => _utils_1.tolerate(callback, next, { descendants: triggeredByDescendants })),
(async () => {
let service = await this._getService();
if (service && service.willUpdate) {
return _utils_1.tolerate(() => service.willUpdate(next, { descendants: triggeredByDescendants }));
}
})(),
]);
}

@@ -370,0 +376,0 @@ /** @internal */

{
"name": "boring-router",
"version": "0.3.4",
"version": "0.3.5",
"description": "A type-safe MobX router with parallel routing support.",

@@ -36,3 +36,3 @@ "repository": {

},
"gitHead": "b877ac4e63e5709a987c55c7ce32318451eed6ae"
"gitHead": "6d8af973b03546e13926c2f53c099aa7b3fec6a4"
}

@@ -24,5 +24,5 @@ import {

//////////////////////
// life-cycle hooks //
//////////////////////
/////////////////////
// lifecycle hooks //
/////////////////////

@@ -85,3 +85,3 @@ export interface RouteUpdateCallbackData {

TRouteMatch extends RouteMatch = RouteMatch
> = (next: TRouteMatch['$next']) => void;
> = (next: TRouteMatch['$next']) => Promise<void> | void;

@@ -92,3 +92,6 @@ // will update //

TRouteMatch extends RouteMatch = RouteMatch
> = (next: TRouteMatch['$next'], data: RouteUpdateCallbackData) => void;
> = (
next: TRouteMatch['$next'],
data: RouteUpdateCallbackData,
) => Promise<void> | void;

@@ -108,3 +111,3 @@ export interface RouteWillUpdateOptions {

export type RouteWillLeaveCallback = () => void;
export type RouteWillLeaveCallback = () => Promise<void> | void;

@@ -155,3 +158,3 @@ // after enter //

TRouteMatch extends RouteMatch = RouteMatch
> = (next: TRouteMatch['$next']) => Promise<boolean | void> | boolean | void;
> = (next: TRouteMatch['$next']) => Promise<void> | void;

@@ -736,11 +739,14 @@ export type RouteAfterEnterOrUpdateCallback = () => void;

for (let callback of this._willLeaveCallbackSet) {
tolerate(callback);
}
await Promise.all([
...Array.from(this._willLeaveCallbackSet).map(callback =>
tolerate(callback),
),
(async () => {
let service = await this._getService();
let service = await this._getService();
if (service && service.willLeave) {
tolerate(() => service!.willLeave!());
}
if (service && service.willLeave) {
return tolerate(() => service!.willLeave!());
}
})(),
]);
}

@@ -752,11 +758,14 @@

for (let callback of this._willEnterCallbackSet) {
tolerate(callback, next);
}
await Promise.all([
...Array.from(this._willEnterCallbackSet).map(callback =>
tolerate(callback, next),
),
(async () => {
let service = await this._getService();
let service = await this._getService();
if (service && service.willEnter) {
tolerate(() => service!.willEnter!(next));
}
if (service && service.willEnter) {
return tolerate(() => service!.willEnter!(next));
}
})(),
]);
}

@@ -768,15 +777,20 @@

for (let {callback, options} of this._willUpdateEntrySet) {
if (triggeredByDescendants ? options && options.traceDescendants : true) {
tolerate(callback, next, {descendants: triggeredByDescendants});
}
}
await Promise.all([
...Array.from(this._willUpdateEntrySet)
.filter(({options}) =>
triggeredByDescendants ? options && options.traceDescendants : true,
)
.map(({callback}) =>
tolerate(callback, next, {descendants: triggeredByDescendants}),
),
(async () => {
let service = await this._getService();
let service = await this._getService();
if (service && service.willUpdate) {
tolerate(() =>
service!.willUpdate!(next, {descendants: triggeredByDescendants}),
);
}
if (service && service.willUpdate) {
return tolerate(() =>
service!.willUpdate!(next, {descendants: triggeredByDescendants}),
);
}
})(),
]);
}

@@ -783,0 +797,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc