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

boring-router-react

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

boring-router-react - npm Package Compare versions

Comparing version 0.3.0-alpha.35 to 0.3.0-alpha.36

LICENSE.md

1

bld/library/browser-history.d.ts

@@ -26,2 +26,3 @@ import { AbstractHistory, HistorySnapshot } from 'boring-router';

constructor({ prefix, hash }?: BrowserHistoryOptions);
readonly ref: string;
private readonly hashPrefix;

@@ -28,0 +29,0 @@ getHRefByRef(ref: string): string;

@@ -52,2 +52,5 @@ "use strict";

}
get ref() {
return boring_router_1.getActiveHistoryEntry(this.snapshot).ref;
}
get hashPrefix() {

@@ -88,2 +91,5 @@ return `${location.pathname}${location.search}`;

return tslib_1.__awaiter(this, void 0, void 0, function* () {
if (ref === this.ref) {
return this.replace(ref, data);
}
yield this.restoringPromise;

@@ -90,0 +96,0 @@ let snapshot = this.pushEntry({

5

bld/library/link.d.ts

@@ -1,8 +0,7 @@

import { RouteMatch } from 'boring-router';
import { RouteMatch, RouteMatchSharedToParamDict } from 'boring-router';
import { Component, HTMLAttributes, ReactNode } from 'react';
import { EmptyObjectPatch } from 'tslang';
export interface LinkProps<TRouteMatch extends RouteMatch> extends HTMLAttributes<HTMLAnchorElement> {
className?: string;
to: TRouteMatch;
params?: TRouteMatch extends RouteMatch<infer TParamDict> ? Partial<TParamDict> & EmptyObjectPatch : never;
params?: RouteMatchSharedToParamDict<TRouteMatch>;
replace?: boolean;

@@ -9,0 +8,0 @@ toggle?: boolean;

@@ -44,3 +44,3 @@ "use strict";

try {
this.href = to.$href(params);
this.href = to.$router.$(to, params).$href();
}

@@ -47,0 +47,0 @@ catch (error) {

{
"name": "boring-router-react",
"version": "0.3.0-alpha.35",
"version": "0.3.0-alpha.36",
"description": "A light-weight, type-safe, yet reactive router service using MobX.",

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

},
"gitHead": "6f117e59ef34354bc4356a9dfbb3a5da4bfcfb25"
"gitHead": "f13e5c9589a987a1697772efeff1fddea17a9e28"
}

@@ -5,2 +5,3 @@ import {

HistorySnapshot,
getActiveHistoryEntry,
getActiveHistoryEntryIndex,

@@ -75,2 +76,6 @@ isHistoryEntryEqual,

get ref(): string {
return getActiveHistoryEntry(this.snapshot).ref;
}
private get hashPrefix(): string {

@@ -113,2 +118,6 @@ return `${location.pathname}${location.search}`;

async push(ref: string, data?: TData): Promise<void> {
if (ref === this.ref) {
return this.replace(ref, data);
}
await this.restoringPromise;

@@ -115,0 +124,0 @@

Sorry, the diff of this file is not supported yet

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