You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@tanstack/router

Package Overview
Dependencies
Maintainers
1
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1-beta.56 to 0.0.1-beta.57

9

build/cjs/routeMatch.js

@@ -47,10 +47,10 @@ /**

};
load = async () => {
load = async opts => {
// If the match is invalid, errored or idle, trigger it to load
if (this.store.state.status !== 'pending') {
await this.fetch();
await this.fetch(opts);
}
};
#latestId = '';
fetch = async () => {
fetch = async opts => {
this.__loadPromise = Promise.resolve().then(async () => {

@@ -90,3 +90,4 @@ const loadId = '' + Date.now() + Math.random();

search: this.store.state.search,
signal: this.abortController.signal
signal: this.abortController.signal,
preload: !!opts?.preload
});

@@ -93,0 +94,0 @@ }

@@ -358,3 +358,5 @@ /**

}
match.load();
match.load({
preload: loaderOpts?.preload
});
if (match.store.state.status !== 'success' && match.__loadPromise) {

@@ -361,0 +363,0 @@ // Wait for the first sign of activity from the match

@@ -548,10 +548,10 @@ /**

};
load = async () => {
load = async opts => {
// If the match is invalid, errored or idle, trigger it to load
if (this.store.state.status !== 'pending') {
await this.fetch();
await this.fetch(opts);
}
};
#latestId = '';
fetch = async () => {
fetch = async opts => {
this.__loadPromise = Promise.resolve().then(async () => {

@@ -591,3 +591,4 @@ const loadId = '' + Date.now() + Math.random();

search: this.store.state.search,
signal: this.abortController.signal
signal: this.abortController.signal,
preload: !!opts?.preload
});

@@ -1043,3 +1044,5 @@ }

}
match.load();
match.load({
preload: loaderOpts?.preload
});
if (match.store.state.status !== 'success' && match.__loadPromise) {

@@ -1046,0 +1049,0 @@ // Wait for the first sign of activity from the match

@@ -11,3 +11,3 @@ {

"name": "node_modules/.pnpm/tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js",
"uid": "9447-32"
"uid": "740d-32"
},

@@ -21,39 +21,39 @@ {

{
"uid": "9447-34",
"uid": "740d-34",
"name": "history.ts"
},
{
"uid": "9447-36",
"uid": "740d-36",
"name": "utils.ts"
},
{
"uid": "9447-38",
"uid": "740d-38",
"name": "path.ts"
},
{
"uid": "9447-40",
"uid": "740d-40",
"name": "qss.ts"
},
{
"uid": "9447-42",
"uid": "740d-42",
"name": "route.ts"
},
{
"uid": "9447-44",
"uid": "740d-44",
"name": "routeConfig.ts"
},
{
"uid": "9447-48",
"uid": "740d-48",
"name": "routeMatch.ts"
},
{
"uid": "9447-50",
"uid": "740d-50",
"name": "searchParams.ts"
},
{
"uid": "9447-52",
"uid": "740d-52",
"name": "router.ts"
},
{
"uid": "9447-54",
"uid": "740d-54",
"name": "index.ts"

@@ -65,3 +65,3 @@ }

"name": "store/build/esm/index.js",
"uid": "9447-46"
"uid": "740d-46"
}

@@ -76,80 +76,80 @@ ]

"nodeParts": {
"9447-32": {
"740d-32": {
"renderedLength": 199,
"gzipLength": 134,
"brotliLength": 0,
"mainUid": "9447-31"
"mainUid": "740d-31"
},
"9447-34": {
"740d-34": {
"renderedLength": 4236,
"gzipLength": 1085,
"brotliLength": 0,
"mainUid": "9447-33"
"mainUid": "740d-33"
},
"9447-36": {
"740d-36": {
"renderedLength": 2572,
"gzipLength": 950,
"brotliLength": 0,
"mainUid": "9447-35"
"mainUid": "740d-35"
},
"9447-38": {
"740d-38": {
"renderedLength": 5601,
"gzipLength": 1328,
"brotliLength": 0,
"mainUid": "9447-37"
"mainUid": "740d-37"
},
"9447-40": {
"740d-40": {
"renderedLength": 1395,
"gzipLength": 558,
"brotliLength": 0,
"mainUid": "9447-39"
"mainUid": "740d-39"
},
"9447-42": {
"740d-42": {
"renderedLength": 415,
"gzipLength": 208,
"brotliLength": 0,
"mainUid": "9447-41"
"mainUid": "740d-41"
},
"9447-44": {
"740d-44": {
"renderedLength": 1261,
"gzipLength": 478,
"brotliLength": 0,
"mainUid": "9447-43"
"mainUid": "740d-43"
},
"9447-46": {
"renderedLength": 1341,
"gzipLength": 493,
"740d-46": {
"renderedLength": 1386,
"gzipLength": 501,
"brotliLength": 0,
"mainUid": "9447-45"
"mainUid": "740d-45"
},
"9447-48": {
"renderedLength": 4823,
"gzipLength": 1337,
"740d-48": {
"renderedLength": 4873,
"gzipLength": 1357,
"brotliLength": 0,
"mainUid": "9447-47"
"mainUid": "740d-47"
},
"9447-50": {
"740d-50": {
"renderedLength": 1387,
"gzipLength": 483,
"brotliLength": 0,
"mainUid": "9447-49"
"mainUid": "740d-49"
},
"9447-52": {
"renderedLength": 24154,
"gzipLength": 5637,
"740d-52": {
"renderedLength": 24208,
"gzipLength": 5647,
"brotliLength": 0,
"mainUid": "9447-51"
"mainUid": "740d-51"
},
"9447-54": {
"740d-54": {
"renderedLength": 0,
"gzipLength": 0,
"brotliLength": 0,
"mainUid": "9447-53"
"mainUid": "740d-53"
}
},
"nodeMetas": {
"9447-31": {
"740d-31": {
"id": "/node_modules/.pnpm/tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js",
"moduleParts": {
"index.production.js": "9447-32"
"index.production.js": "740d-32"
},

@@ -159,16 +159,16 @@ "imported": [],

{
"uid": "9447-53"
"uid": "740d-53"
},
{
"uid": "9447-43"
"uid": "740d-43"
},
{
"uid": "9447-51"
"uid": "740d-51"
}
]
},
"9447-33": {
"740d-33": {
"id": "/packages/router/src/history.ts",
"moduleParts": {
"index.production.js": "9447-34"
"index.production.js": "740d-34"
},

@@ -178,13 +178,13 @@ "imported": [],

{
"uid": "9447-53"
"uid": "740d-53"
},
{
"uid": "9447-51"
"uid": "740d-51"
}
]
},
"9447-35": {
"740d-35": {
"id": "/packages/router/src/utils.ts",
"moduleParts": {
"index.production.js": "9447-36"
"index.production.js": "740d-36"
},

@@ -194,20 +194,20 @@ "imported": [],

{
"uid": "9447-53"
"uid": "740d-53"
},
{
"uid": "9447-37"
"uid": "740d-37"
},
{
"uid": "9447-51"
"uid": "740d-51"
}
]
},
"9447-37": {
"740d-37": {
"id": "/packages/router/src/path.ts",
"moduleParts": {
"index.production.js": "9447-38"
"index.production.js": "740d-38"
},
"imported": [
{
"uid": "9447-35"
"uid": "740d-35"
}

@@ -217,16 +217,16 @@ ],

{
"uid": "9447-53"
"uid": "740d-53"
},
{
"uid": "9447-43"
"uid": "740d-43"
},
{
"uid": "9447-51"
"uid": "740d-51"
}
]
},
"9447-39": {
"740d-39": {
"id": "/packages/router/src/qss.ts",
"moduleParts": {
"index.production.js": "9447-40"
"index.production.js": "740d-40"
},

@@ -236,13 +236,13 @@ "imported": [],

{
"uid": "9447-53"
"uid": "740d-53"
},
{
"uid": "9447-49"
"uid": "740d-49"
}
]
},
"9447-41": {
"740d-41": {
"id": "/packages/router/src/route.ts",
"moduleParts": {
"index.production.js": "9447-42"
"index.production.js": "740d-42"
},

@@ -252,20 +252,20 @@ "imported": [],

{
"uid": "9447-53"
"uid": "740d-53"
},
{
"uid": "9447-51"
"uid": "740d-51"
}
]
},
"9447-43": {
"740d-43": {
"id": "/packages/router/src/routeConfig.ts",
"moduleParts": {
"index.production.js": "9447-44"
"index.production.js": "740d-44"
},
"imported": [
{
"uid": "9447-31"
"uid": "740d-31"
},
{
"uid": "9447-37"
"uid": "740d-37"
}

@@ -275,10 +275,10 @@ ],

{
"uid": "9447-53"
"uid": "740d-53"
}
]
},
"9447-45": {
"740d-45": {
"id": "/packages/store/build/esm/index.js",
"moduleParts": {
"index.production.js": "9447-46"
"index.production.js": "740d-46"
},

@@ -288,17 +288,17 @@ "imported": [],

{
"uid": "9447-47"
"uid": "740d-47"
},
{
"uid": "9447-51"
"uid": "740d-51"
}
]
},
"9447-47": {
"740d-47": {
"id": "/packages/router/src/routeMatch.ts",
"moduleParts": {
"index.production.js": "9447-48"
"index.production.js": "740d-48"
},
"imported": [
{
"uid": "9447-45"
"uid": "740d-45"
}

@@ -308,17 +308,17 @@ ],

{
"uid": "9447-53"
"uid": "740d-53"
},
{
"uid": "9447-51"
"uid": "740d-51"
}
]
},
"9447-49": {
"740d-49": {
"id": "/packages/router/src/searchParams.ts",
"moduleParts": {
"index.production.js": "9447-50"
"index.production.js": "740d-50"
},
"imported": [
{
"uid": "9447-39"
"uid": "740d-39"
}

@@ -328,38 +328,38 @@ ],

{
"uid": "9447-53"
"uid": "740d-53"
},
{
"uid": "9447-51"
"uid": "740d-51"
}
]
},
"9447-51": {
"740d-51": {
"id": "/packages/router/src/router.ts",
"moduleParts": {
"index.production.js": "9447-52"
"index.production.js": "740d-52"
},
"imported": [
{
"uid": "9447-45"
"uid": "740d-45"
},
{
"uid": "9447-31"
"uid": "740d-31"
},
{
"uid": "9447-37"
"uid": "740d-37"
},
{
"uid": "9447-41"
"uid": "740d-41"
},
{
"uid": "9447-47"
"uid": "740d-47"
},
{
"uid": "9447-49"
"uid": "740d-49"
},
{
"uid": "9447-35"
"uid": "740d-35"
},
{
"uid": "9447-33"
"uid": "740d-33"
}

@@ -369,50 +369,50 @@ ],

{
"uid": "9447-53"
"uid": "740d-53"
}
]
},
"9447-53": {
"740d-53": {
"id": "/packages/router/src/index.ts",
"moduleParts": {
"index.production.js": "9447-54"
"index.production.js": "740d-54"
},
"imported": [
{
"uid": "9447-31"
"uid": "740d-31"
},
{
"uid": "9447-33"
"uid": "740d-33"
},
{
"uid": "9447-55"
"uid": "740d-55"
},
{
"uid": "9447-56"
"uid": "740d-56"
},
{
"uid": "9447-37"
"uid": "740d-37"
},
{
"uid": "9447-39"
"uid": "740d-39"
},
{
"uid": "9447-41"
"uid": "740d-41"
},
{
"uid": "9447-43"
"uid": "740d-43"
},
{
"uid": "9447-57"
"uid": "740d-57"
},
{
"uid": "9447-47"
"uid": "740d-47"
},
{
"uid": "9447-51"
"uid": "740d-51"
},
{
"uid": "9447-49"
"uid": "740d-49"
},
{
"uid": "9447-35"
"uid": "740d-35"
}

@@ -423,3 +423,3 @@ ],

},
"9447-55": {
"740d-55": {
"id": "/packages/router/src/frameworks.ts",

@@ -430,7 +430,7 @@ "moduleParts": {},

{
"uid": "9447-53"
"uid": "740d-53"
}
]
},
"9447-56": {
"740d-56": {
"id": "/packages/router/src/link.ts",

@@ -441,7 +441,7 @@ "moduleParts": {},

{
"uid": "9447-53"
"uid": "740d-53"
}
]
},
"9447-57": {
"740d-57": {
"id": "/packages/router/src/routeInfo.ts",

@@ -452,3 +452,3 @@ "moduleParts": {},

{
"uid": "9447-53"
"uid": "740d-53"
}

@@ -455,0 +455,0 @@ ]

@@ -279,4 +279,8 @@ /**

cancel: () => void;
load: () => Promise<void>;
fetch: () => Promise<void>;
load: (opts?: {
preload?: boolean;
}) => Promise<void>;
fetch: (opts?: {
preload?: boolean;
}) => Promise<void>;
__setParentMatch: (parentMatch?: RouteMatch) => void;

@@ -310,2 +314,3 @@ __validate: () => void;

signal?: AbortSignal;
preload: boolean;
}

@@ -312,0 +317,0 @@ type UnloaderFn<TPath extends string> = (routeMatch: RouteMatch<any, RouteInfo<string, TPath>>) => void;

@@ -559,2 +559,3 @@ /**

this.state = this.options?.updateFn ? this.options.updateFn(previous)(updater) : updater(previous);
if (this.state === previous) return;
this.queue.push(() => {

@@ -609,10 +610,10 @@ this.listeners.forEach(listener => listener(this.state, previous));

};
load = async () => {
load = async opts => {
// If the match is invalid, errored or idle, trigger it to load
if (this.store.state.status !== 'pending') {
await this.fetch();
await this.fetch(opts);
}
};
#latestId = '';
fetch = async () => {
fetch = async opts => {
this.__loadPromise = Promise.resolve().then(async () => {

@@ -652,3 +653,4 @@ const loadId = '' + Date.now() + Math.random();

search: this.store.state.search,
signal: this.abortController.signal
signal: this.abortController.signal,
preload: !!opts?.preload
});

@@ -1104,3 +1106,5 @@ }

}
match.load();
match.load({
preload: loaderOpts?.preload
});
if (match.store.state.status !== 'success' && match.__loadPromise) {

@@ -1107,0 +1111,0 @@ // Wait for the first sign of activity from the match

@@ -22,3 +22,3 @@ /**

*/
class C{listeners=new Set;batching=!1;queue=[];constructor(t,e){this.state=t,this.options=e}subscribe=t=>{this.listeners.add(t);const e=this.options?.onSubscribe?.(t,this);return()=>{this.listeners.delete(t),e?.()}};setState=t=>{const e=this.state;this.state=this.options?.updateFn?this.options.updateFn(e)(t):t(e),this.queue.push((()=>{this.listeners.forEach((t=>t(this.state,e))),this.options?.onUpdate?.(this.state,e)})),this.#t()};#t=()=>{this.batching||(this.queue.forEach((t=>t())),this.queue=[])};batch=t=>{this.batching=!0,t(),this.batching=!1,this.#t()}}const A=["component","errorComponent","pendingComponent"];class I{abortController=new AbortController;onLoaderDataListeners=new Set;constructor(t,e,s){Object.assign(this,{route:e,router:t,id:s.id,pathname:s.pathname,params:s.params,store:new C({updatedAt:0,routeSearch:{},search:{},status:"idle"})}),this.#e()||this.store.setState((t=>({...t,status:"success"})))}cancel=()=>{this.abortController?.abort()};load=async()=>{"pending"!==this.store.state.status&&await this.fetch()};#s="";fetch=async()=>(this.__loadPromise=Promise.resolve().then((async()=>{const t=""+Date.now()+Math.random();this.#s=t;const e=()=>t!==this.#s?this.__loadPromise:void 0;let s;this.store.batch((()=>{"idle"===this.store.state.status&&this.store.setState((t=>({...t,status:"pending"})))}));const a=(async()=>{await Promise.all(A.map((async t=>{const e=this.route.options[t];this[t]?.preload&&(this[t]=await this.router.options.loadComponent(e))})))})(),o=Promise.resolve().then((()=>{if(this.route.options.onLoad)return this.route.options.onLoad({params:this.params,search:this.store.state.search,signal:this.abortController.signal})}));try{if(await a,await o,s=e())return await s;this.store.setState((t=>({...t,error:void 0,status:"success",updatedAt:Date.now()})))}catch(t){this.store.setState((e=>({...e,error:t,status:"error",updatedAt:Date.now()})))}finally{delete this.__loadPromise}})),this.__loadPromise);#e=()=>!(!this.route.options.onLoad&&!A.some((t=>this.route.options[t]?.preload)));__setParentMatch=t=>{!this.parentMatch&&t&&(this.parentMatch=t)};__validate=()=>{const t=this.parentMatch?.store.state.search??this.router.store.state.latestLocation.search;try{let e=("object"==typeof this.route.options.validateSearch?this.route.options.validateSearch.parse:this.route.options.validateSearch)?.(t)??{};this.store.setState((s=>({...s,routeSearch:e,search:{...t,...e}}))),A.map((async t=>{const e=this.route.options[t];"function"!=typeof this[t]&&(this[t]=e)}))}catch(t){console.error(t);const e=new Error("Invalid search params found",{cause:t});return e.code="INVALID_SEARCH_PARAMS",void this.store.setState((t=>({...t,status:"error",error:e})))}}}const F=T(JSON.parse),k=j(JSON.stringify);function T(t){return e=>{"?"===e.substring(0,1)&&(e=e.substring(1));let s=E(e);for(let e in s){const a=s[e];if("string"==typeof a)try{s[e]=t(a)}catch(t){}}return s}}function j(t){return e=>{(e={...e})&&Object.keys(e).forEach((s=>{const a=e[s];if(void 0===a||void 0===a)delete e[s];else if(a&&"object"==typeof a&&null!==a)try{e[s]=t(a)}catch(t){}}));const s=P(e).toString();return s?`?${s}`:""}}const O=async({router:t,routeMatch:e})=>{const s=t.buildNext({to:".",search:t=>({...t??{},__data:{matchId:e.id}})}),a=await fetch(s.href,{method:"GET",signal:e.abortController.signal});if(a.ok)return a.json();throw new Error("Failed to fetch match data")};const D="undefined"==typeof window||!window.document.createElement;function H(){return{status:"idle",latestLocation:null,currentLocation:null,currentMatches:[],lastUpdated:Date.now()}}t.Route=M,t.RouteMatch=I,t.Router=class{#a;startedLoadingAt=Date.now();resolveNavigation=()=>{};constructor(t){this.options={defaultPreloadDelay:50,context:void 0,...t,stringifySearch:t?.stringifySearch??k,parseSearch:t?.parseSearch??F,fetchServerDataFn:t?.fetchServerDataFn??O},this.store=new C(H()),this.basepath="",this.update(t),this.options.Router?.(this)}reset=()=>{this.store.setState((t=>Object.assign(t,H())))};mount=()=>{if(!D){this.store.state.currentMatches.length||this.load();const t="visibilitychange",e="focus";return window.addEventListener&&(window.addEventListener(t,this.#o,!1),window.addEventListener(e,this.#o,!1)),()=>{window.removeEventListener&&(window.removeEventListener(t,this.#o),window.removeEventListener(e,this.#o))}}return()=>{}};update=t=>{if(Object.assign(this.options,t),!this.history||this.options.history&&this.options.history!==this.history){this.#a&&this.#a(),this.history=this.options.history??(D?r():o());const t=this.#r();this.store.setState((e=>({...e,latestLocation:t,currentLocation:t}))),this.#a=this.history.listen((()=>{this.load(this.#r(this.store.state.latestLocation))}))}const{basepath:e,routeConfig:s}=this.options;return this.basepath=`/${w(e??"")??""}`,s&&(this.routesById={},this.routeTree=this.#i(s)),this};buildNext=t=>{const e=this.#n(t),s=this.matchRoutes(e.pathname),a=s.map((t=>t.route.options.preSearchFilters??[])).flat().filter(Boolean),o=s.map((t=>t.route.options.postSearchFilters??[])).flat().filter(Boolean);return this.#n({...t,__preSearchFilters:a,__postSearchFilters:o})};cancelMatches=()=>{[...this.store.state.currentMatches,...this.store.state.pendingMatches||[]].forEach((t=>{t.cancel()}))};load=async t=>{let s=Date.now();const a=s;let o;this.startedLoadingAt=a,this.cancelMatches(),this.store.batch((()=>{t&&this.store.setState((e=>({...e,latestLocation:t}))),o=this.matchRoutes(this.store.state.latestLocation.pathname,{strictParseParams:!0}),this.store.setState((t=>({...t,status:"pending",pendingMatches:o,pendingLocation:this.store.state.latestLocation})))}));try{await this.loadMatches(o)}catch(t){console.warn(t),e(!1)}if(this.startedLoadingAt!==a)return this.navigationPromise;const r=this.store.state.currentMatches,i=[],n=[];r.forEach((t=>{o.find((e=>e.id===t.id))?n.push(t):i.push(t)}));const h=o.filter((t=>!r.find((e=>e.id===t.id))));s=Date.now(),i.forEach((t=>{t.__onExit?.({params:t.params,search:t.store.state.routeSearch}),"error"===t.store.state.status&&this.store.setState((t=>({...t,status:"idle",error:void 0})))})),n.forEach((t=>{t.route.options.onTransition?.({params:t.params,search:t.store.state.routeSearch})})),h.forEach((t=>{t.__onExit=t.route.options.onLoaded?.({params:t.params,search:t.store.state.search})})),this.store.setState((t=>({...t,status:"idle",currentLocation:this.store.state.latestLocation,currentMatches:o,pendingLocation:void 0,pendingMatches:void 0}))),this.options.onRouteChange?.(),this.resolveNavigation()};getRoute=t=>{const s=this.routesById[t];return e(s),s};loadRoute=async(t=this.store.state.latestLocation)=>{const e=this.buildNext(t),s=this.matchRoutes(e.pathname,{strictParseParams:!0});return await this.loadMatches(s),s};preloadRoute=async(t=this.store.state.latestLocation)=>{const e=this.buildNext(t),s=this.matchRoutes(e.pathname,{strictParseParams:!0});return await this.loadMatches(s,{preload:!0}),s};matchRoutes=(t,e)=>{const s=[];if(!this.routeTree)return s;const a=[...this.store.state.currentMatches,...this.store.state.pendingMatches??[]],o=async r=>{let i=h(s)?.params??{};const n=this.options.filterRoutes?.(r)??r;let c=[];const u=(s,a)=>(a.some((a=>{if(!a.path&&a.childRoutes?.length)return u([...c,a],a.childRoutes);const o=!("/"===a.path&&!a.childRoutes?.length),r=S(this.basepath,t,{to:a.fullPath,fuzzy:o,caseSensitive:a.options.caseSensitive??this.options.caseSensitive});if(r){let t;try{t=a.options.parseParams?.(r)??r}catch(t){if(e?.strictParseParams)throw t}i={...i,...t}}return r&&(c=[...s,a]),!!c.length})),!!c.length);if(u([],n),!c.length)return;c.forEach((t=>{const e=L(t.path,i),o=L(t.id,i,!0),r=a.find((t=>t.id===o))||new I(this,t,{id:o,params:i,pathname:f([this.basepath,e])});s.push(r)}));const l=h(c);l.childRoutes?.length&&o(l.childRoutes)};return o([this.routeTree]),function(t){t.forEach(((e,s)=>{const a=t[s-1];a&&e.__setParentMatch(a)}))}(s),s};loadMatches=async(t,e)=>{t.forEach((async t=>{t.__validate()})),await Promise.all(t.map((async t=>{try{await(t.route.options.beforeLoad?.({router:this,match:t}))}catch(s){throw e?.preload||t.route.options.onLoadError?.(s),s}})));const s=t.map((async(e,s)=>{const a=t[1],o=e.store.state.search;o.__data?.matchId&&o.__data.matchId!==e.id||(e.load(),"success"!==e.store.state.status&&e.__loadPromise&&await e.__loadPromise,a&&await a.__loadPromise)}));await Promise.all(s)};reload=()=>{this.navigate({fromCurrent:!0,replace:!0,search:!0})};resolvePath=(t,e)=>v(this.basepath,t,m(e));navigate=async({from:t,to:s=".",search:a,hash:o,replace:r,params:i})=>{const n=String(s),h=void 0===t?t:String(t);let c;try{new URL(`${n}`),c=!0}catch(t){}return e(!c),this.#h({from:h,to:n,search:a,hash:o,replace:r,params:i})};matchRoute=(t,e)=>{t={...t,to:t.to?this.resolvePath(t.from??"",t.to):void 0};const s=this.buildNext(t);return e?.pending?!!this.store.state.pendingLocation&&S(this.basepath,this.store.state.pendingLocation.pathname,{...e,to:s.pathname}):S(this.basepath,this.store.state.currentLocation.pathname,{...e,to:s.pathname})};buildLink=({from:t,to:e=".",search:s,params:a,hash:o,target:r,replace:i,activeOptions:n,preload:h,preloadMaxAge:c,preloadGcMaxAge:u,preloadDelay:l,disabled:p})=>{try{return new URL(`${e}`),{type:"external",href:e}}catch(t){}const d={from:t,to:e,search:s,params:a,hash:o,replace:i},f=this.buildNext(d);h=h??this.options.defaultPreload;const m=l??this.options.defaultPreloadDelay??0,g=this.store.state.currentLocation.pathname===f.pathname,y=this.store.state.currentLocation.pathname.split("/"),w=f.pathname.split("/").every(((t,e)=>t===y[e])),v=this.store.state.currentLocation.hash===f.hash;return{type:"internal",next:f,handleFocus:t=>{h&&this.preloadRoute(d).catch((t=>{console.warn(t),console.warn("Error preloading route! ☝️")}))},handleClick:t=>{p||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||t.defaultPrevented||r&&"_self"!==r||0!==t.button||(t.preventDefault(),this.#h(d))},handleEnter:t=>{const e=t.target||{};if(h){if(e.preloadTimeout)return;e.preloadTimeout=setTimeout((()=>{e.preloadTimeout=null,this.preloadRoute(d).catch((t=>{console.warn(t),console.warn("Error preloading route! ☝️")}))}),m)}},handleLeave:t=>{const e=t.target||{};e.preloadTimeout&&(clearTimeout(e.preloadTimeout),e.preloadTimeout=null)},isActive:(n?.exact?g:w)&&(!n?.includeHash||v),disabled:p}};dehydrate=()=>({state:{...u(this.store.state,["latestLocation","currentLocation","status","lastUpdated"]),currentMatches:this.store.state.currentMatches.map((t=>({id:t.id,state:{...u(t.store.state,["status"])}})))},context:this.options.context});hydrate=t=>{this.store.setState((s=>{this.options.context=t.context;const a=this.matchRoutes(t.state.latestLocation.pathname,{strictParseParams:!0});return a.forEach(((s,a)=>{const o=t.state.currentMatches[a];e(o&&o.id===s.id),s.store.setState((t=>({...t,...o.state})))})),a.forEach((t=>t.__validate())),{...s,...t.state,currentMatches:a}}))};#i=t=>{const e=(t,s)=>t.map(((t,a)=>{const o=t.options,r=new M(t,o,a,s,this);if(this.routesById[r.id])throw new Error;this.routesById[r.id]=r;const i=t.children;return r.childRoutes=i.length?e(i,r):void 0,r}));return e([t])[0]};#r=t=>{let{pathname:e,search:s,hash:a,state:o}=this.history.location;const r=this.options.parseSearch(s);return{pathname:e,searchStr:s,search:l(t?.search,r),hash:a.split("#").reverse()[0]??"",href:`${e}${s}${a}`,state:o,key:o?.key||"__init__"}};#o=()=>{this.load()};#n=(t={})=>{const e=t.fromCurrent?this.store.state.latestLocation.pathname:t.from??this.store.state.latestLocation.pathname;let s=v(this.basepath??"/",e,`${t.to??"."}`);const a=this.matchRoutes(this.store.state.latestLocation.pathname,{strictParseParams:!0}),o=this.matchRoutes(s),r={...h(a)?.params};let i=!0===(t.params??!0)?r:c(t.params,r);i&&o.map((t=>t.route.options.stringifyParams)).filter(Boolean).forEach((t=>{Object.assign({},i,t(i))})),s=L(s,i??{});const n=t.__preSearchFilters?.length?t.__preSearchFilters?.reduce(((t,e)=>e(t)),this.store.state.latestLocation.search):this.store.state.latestLocation.search,u=!0===t.search?n:t.search?c(t.search,n)??{}:t.__preSearchFilters?.length?n:{},p=t.__postSearchFilters?.length?t.__postSearchFilters.reduce(((t,e)=>e(t)),u):u,d=l(this.store.state.latestLocation.search,p),f=this.options.stringifySearch(d);let m=!0===t.hash?this.store.state.latestLocation.hash:c(t.hash,this.store.state.latestLocation.hash);return m=m?`#${m}`:"",{pathname:s,search:d,searchStr:f,state:this.store.state.latestLocation.state,hash:m,href:`${s}${f}${m}`,key:t.key}};#h=t=>{const e=this.buildNext(t),s=""+Date.now()+Math.random();this.navigateTimeout&&clearTimeout(this.navigateTimeout);let a="replace";t.replace||(a="push");this.store.state.latestLocation.href===e.href&&!e.key&&(a="replace");const o=`${e.pathname}${e.searchStr}${e.hash?`#${e.hash}`:""}`;return this.history["push"===a?"push":"replace"](o,{id:s,...e.state}),this.navigationPromise=new Promise((t=>{const e=this.resolveNavigation;this.resolveNavigation=()=>{e(),t()}}))}},t.cleanPath=m,t.createBrowserHistory=o,t.createHashHistory=function(){return o({getHref:()=>window.location.hash.substring(1),createHref:t=>`#${t}`})},t.createMemoryHistory=r,t.createRouteConfig=$,t.decode=E,t.defaultFetchServerDataFn=O,t.defaultParseSearch=F,t.defaultStringifySearch=k,t.encode=P,t.functionalUpdate=c,t.interpolatePath=L,t.invariant=e,t.isPlainObject=p,t.joinPaths=f,t.last=h,t.matchByPath=_,t.matchPathname=S,t.parsePathname=b,t.parseSearchWith=T,t.pick=u,t.replaceEqualDeep=l,t.resolvePath=v,t.rootRouteId=x,t.stringifySearchWith=j,t.trimPath=w,t.trimPathLeft=g,t.trimPathRight=y,t.warning=function(t,e){if(t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch{}}return!0},Object.defineProperty(t,"__esModule",{value:!0})}));
class C{listeners=new Set;batching=!1;queue=[];constructor(t,e){this.state=t,this.options=e}subscribe=t=>{this.listeners.add(t);const e=this.options?.onSubscribe?.(t,this);return()=>{this.listeners.delete(t),e?.()}};setState=t=>{const e=this.state;this.state=this.options?.updateFn?this.options.updateFn(e)(t):t(e),this.state!==e&&(this.queue.push((()=>{this.listeners.forEach((t=>t(this.state,e))),this.options?.onUpdate?.(this.state,e)})),this.#t())};#t=()=>{this.batching||(this.queue.forEach((t=>t())),this.queue=[])};batch=t=>{this.batching=!0,t(),this.batching=!1,this.#t()}}const A=["component","errorComponent","pendingComponent"];class I{abortController=new AbortController;onLoaderDataListeners=new Set;constructor(t,e,s){Object.assign(this,{route:e,router:t,id:s.id,pathname:s.pathname,params:s.params,store:new C({updatedAt:0,routeSearch:{},search:{},status:"idle"})}),this.#e()||this.store.setState((t=>({...t,status:"success"})))}cancel=()=>{this.abortController?.abort()};load=async t=>{"pending"!==this.store.state.status&&await this.fetch(t)};#s="";fetch=async t=>(this.__loadPromise=Promise.resolve().then((async()=>{const e=""+Date.now()+Math.random();this.#s=e;const s=()=>e!==this.#s?this.__loadPromise:void 0;let a;this.store.batch((()=>{"idle"===this.store.state.status&&this.store.setState((t=>({...t,status:"pending"})))}));const o=(async()=>{await Promise.all(A.map((async t=>{const e=this.route.options[t];this[t]?.preload&&(this[t]=await this.router.options.loadComponent(e))})))})(),r=Promise.resolve().then((()=>{if(this.route.options.onLoad)return this.route.options.onLoad({params:this.params,search:this.store.state.search,signal:this.abortController.signal,preload:!!t?.preload})}));try{if(await o,await r,a=s())return await a;this.store.setState((t=>({...t,error:void 0,status:"success",updatedAt:Date.now()})))}catch(t){this.store.setState((e=>({...e,error:t,status:"error",updatedAt:Date.now()})))}finally{delete this.__loadPromise}})),this.__loadPromise);#e=()=>!(!this.route.options.onLoad&&!A.some((t=>this.route.options[t]?.preload)));__setParentMatch=t=>{!this.parentMatch&&t&&(this.parentMatch=t)};__validate=()=>{const t=this.parentMatch?.store.state.search??this.router.store.state.latestLocation.search;try{let e=("object"==typeof this.route.options.validateSearch?this.route.options.validateSearch.parse:this.route.options.validateSearch)?.(t)??{};this.store.setState((s=>({...s,routeSearch:e,search:{...t,...e}}))),A.map((async t=>{const e=this.route.options[t];"function"!=typeof this[t]&&(this[t]=e)}))}catch(t){console.error(t);const e=new Error("Invalid search params found",{cause:t});return e.code="INVALID_SEARCH_PARAMS",void this.store.setState((t=>({...t,status:"error",error:e})))}}}const F=T(JSON.parse),k=j(JSON.stringify);function T(t){return e=>{"?"===e.substring(0,1)&&(e=e.substring(1));let s=E(e);for(let e in s){const a=s[e];if("string"==typeof a)try{s[e]=t(a)}catch(t){}}return s}}function j(t){return e=>{(e={...e})&&Object.keys(e).forEach((s=>{const a=e[s];if(void 0===a||void 0===a)delete e[s];else if(a&&"object"==typeof a&&null!==a)try{e[s]=t(a)}catch(t){}}));const s=P(e).toString();return s?`?${s}`:""}}const O=async({router:t,routeMatch:e})=>{const s=t.buildNext({to:".",search:t=>({...t??{},__data:{matchId:e.id}})}),a=await fetch(s.href,{method:"GET",signal:e.abortController.signal});if(a.ok)return a.json();throw new Error("Failed to fetch match data")};const D="undefined"==typeof window||!window.document.createElement;function H(){return{status:"idle",latestLocation:null,currentLocation:null,currentMatches:[],lastUpdated:Date.now()}}t.Route=M,t.RouteMatch=I,t.Router=class{#a;startedLoadingAt=Date.now();resolveNavigation=()=>{};constructor(t){this.options={defaultPreloadDelay:50,context:void 0,...t,stringifySearch:t?.stringifySearch??k,parseSearch:t?.parseSearch??F,fetchServerDataFn:t?.fetchServerDataFn??O},this.store=new C(H()),this.basepath="",this.update(t),this.options.Router?.(this)}reset=()=>{this.store.setState((t=>Object.assign(t,H())))};mount=()=>{if(!D){this.store.state.currentMatches.length||this.load();const t="visibilitychange",e="focus";return window.addEventListener&&(window.addEventListener(t,this.#o,!1),window.addEventListener(e,this.#o,!1)),()=>{window.removeEventListener&&(window.removeEventListener(t,this.#o),window.removeEventListener(e,this.#o))}}return()=>{}};update=t=>{if(Object.assign(this.options,t),!this.history||this.options.history&&this.options.history!==this.history){this.#a&&this.#a(),this.history=this.options.history??(D?r():o());const t=this.#r();this.store.setState((e=>({...e,latestLocation:t,currentLocation:t}))),this.#a=this.history.listen((()=>{this.load(this.#r(this.store.state.latestLocation))}))}const{basepath:e,routeConfig:s}=this.options;return this.basepath=`/${w(e??"")??""}`,s&&(this.routesById={},this.routeTree=this.#i(s)),this};buildNext=t=>{const e=this.#n(t),s=this.matchRoutes(e.pathname),a=s.map((t=>t.route.options.preSearchFilters??[])).flat().filter(Boolean),o=s.map((t=>t.route.options.postSearchFilters??[])).flat().filter(Boolean);return this.#n({...t,__preSearchFilters:a,__postSearchFilters:o})};cancelMatches=()=>{[...this.store.state.currentMatches,...this.store.state.pendingMatches||[]].forEach((t=>{t.cancel()}))};load=async t=>{let s=Date.now();const a=s;let o;this.startedLoadingAt=a,this.cancelMatches(),this.store.batch((()=>{t&&this.store.setState((e=>({...e,latestLocation:t}))),o=this.matchRoutes(this.store.state.latestLocation.pathname,{strictParseParams:!0}),this.store.setState((t=>({...t,status:"pending",pendingMatches:o,pendingLocation:this.store.state.latestLocation})))}));try{await this.loadMatches(o)}catch(t){console.warn(t),e(!1)}if(this.startedLoadingAt!==a)return this.navigationPromise;const r=this.store.state.currentMatches,i=[],n=[];r.forEach((t=>{o.find((e=>e.id===t.id))?n.push(t):i.push(t)}));const h=o.filter((t=>!r.find((e=>e.id===t.id))));s=Date.now(),i.forEach((t=>{t.__onExit?.({params:t.params,search:t.store.state.routeSearch}),"error"===t.store.state.status&&this.store.setState((t=>({...t,status:"idle",error:void 0})))})),n.forEach((t=>{t.route.options.onTransition?.({params:t.params,search:t.store.state.routeSearch})})),h.forEach((t=>{t.__onExit=t.route.options.onLoaded?.({params:t.params,search:t.store.state.search})})),this.store.setState((t=>({...t,status:"idle",currentLocation:this.store.state.latestLocation,currentMatches:o,pendingLocation:void 0,pendingMatches:void 0}))),this.options.onRouteChange?.(),this.resolveNavigation()};getRoute=t=>{const s=this.routesById[t];return e(s),s};loadRoute=async(t=this.store.state.latestLocation)=>{const e=this.buildNext(t),s=this.matchRoutes(e.pathname,{strictParseParams:!0});return await this.loadMatches(s),s};preloadRoute=async(t=this.store.state.latestLocation)=>{const e=this.buildNext(t),s=this.matchRoutes(e.pathname,{strictParseParams:!0});return await this.loadMatches(s,{preload:!0}),s};matchRoutes=(t,e)=>{const s=[];if(!this.routeTree)return s;const a=[...this.store.state.currentMatches,...this.store.state.pendingMatches??[]],o=async r=>{let i=h(s)?.params??{};const n=this.options.filterRoutes?.(r)??r;let c=[];const u=(s,a)=>(a.some((a=>{if(!a.path&&a.childRoutes?.length)return u([...c,a],a.childRoutes);const o=!("/"===a.path&&!a.childRoutes?.length),r=S(this.basepath,t,{to:a.fullPath,fuzzy:o,caseSensitive:a.options.caseSensitive??this.options.caseSensitive});if(r){let t;try{t=a.options.parseParams?.(r)??r}catch(t){if(e?.strictParseParams)throw t}i={...i,...t}}return r&&(c=[...s,a]),!!c.length})),!!c.length);if(u([],n),!c.length)return;c.forEach((t=>{const e=L(t.path,i),o=L(t.id,i,!0),r=a.find((t=>t.id===o))||new I(this,t,{id:o,params:i,pathname:f([this.basepath,e])});s.push(r)}));const l=h(c);l.childRoutes?.length&&o(l.childRoutes)};return o([this.routeTree]),function(t){t.forEach(((e,s)=>{const a=t[s-1];a&&e.__setParentMatch(a)}))}(s),s};loadMatches=async(t,e)=>{t.forEach((async t=>{t.__validate()})),await Promise.all(t.map((async t=>{try{await(t.route.options.beforeLoad?.({router:this,match:t}))}catch(s){throw e?.preload||t.route.options.onLoadError?.(s),s}})));const s=t.map((async(s,a)=>{const o=t[1],r=s.store.state.search;r.__data?.matchId&&r.__data.matchId!==s.id||(s.load({preload:e?.preload}),"success"!==s.store.state.status&&s.__loadPromise&&await s.__loadPromise,o&&await o.__loadPromise)}));await Promise.all(s)};reload=()=>{this.navigate({fromCurrent:!0,replace:!0,search:!0})};resolvePath=(t,e)=>v(this.basepath,t,m(e));navigate=async({from:t,to:s=".",search:a,hash:o,replace:r,params:i})=>{const n=String(s),h=void 0===t?t:String(t);let c;try{new URL(`${n}`),c=!0}catch(t){}return e(!c),this.#h({from:h,to:n,search:a,hash:o,replace:r,params:i})};matchRoute=(t,e)=>{t={...t,to:t.to?this.resolvePath(t.from??"",t.to):void 0};const s=this.buildNext(t);return e?.pending?!!this.store.state.pendingLocation&&S(this.basepath,this.store.state.pendingLocation.pathname,{...e,to:s.pathname}):S(this.basepath,this.store.state.currentLocation.pathname,{...e,to:s.pathname})};buildLink=({from:t,to:e=".",search:s,params:a,hash:o,target:r,replace:i,activeOptions:n,preload:h,preloadMaxAge:c,preloadGcMaxAge:u,preloadDelay:l,disabled:p})=>{try{return new URL(`${e}`),{type:"external",href:e}}catch(t){}const d={from:t,to:e,search:s,params:a,hash:o,replace:i},f=this.buildNext(d);h=h??this.options.defaultPreload;const m=l??this.options.defaultPreloadDelay??0,g=this.store.state.currentLocation.pathname===f.pathname,y=this.store.state.currentLocation.pathname.split("/"),w=f.pathname.split("/").every(((t,e)=>t===y[e])),v=this.store.state.currentLocation.hash===f.hash;return{type:"internal",next:f,handleFocus:t=>{h&&this.preloadRoute(d).catch((t=>{console.warn(t),console.warn("Error preloading route! ☝️")}))},handleClick:t=>{p||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||t.defaultPrevented||r&&"_self"!==r||0!==t.button||(t.preventDefault(),this.#h(d))},handleEnter:t=>{const e=t.target||{};if(h){if(e.preloadTimeout)return;e.preloadTimeout=setTimeout((()=>{e.preloadTimeout=null,this.preloadRoute(d).catch((t=>{console.warn(t),console.warn("Error preloading route! ☝️")}))}),m)}},handleLeave:t=>{const e=t.target||{};e.preloadTimeout&&(clearTimeout(e.preloadTimeout),e.preloadTimeout=null)},isActive:(n?.exact?g:w)&&(!n?.includeHash||v),disabled:p}};dehydrate=()=>({state:{...u(this.store.state,["latestLocation","currentLocation","status","lastUpdated"]),currentMatches:this.store.state.currentMatches.map((t=>({id:t.id,state:{...u(t.store.state,["status"])}})))},context:this.options.context});hydrate=t=>{this.store.setState((s=>{this.options.context=t.context;const a=this.matchRoutes(t.state.latestLocation.pathname,{strictParseParams:!0});return a.forEach(((s,a)=>{const o=t.state.currentMatches[a];e(o&&o.id===s.id),s.store.setState((t=>({...t,...o.state})))})),a.forEach((t=>t.__validate())),{...s,...t.state,currentMatches:a}}))};#i=t=>{const e=(t,s)=>t.map(((t,a)=>{const o=t.options,r=new M(t,o,a,s,this);if(this.routesById[r.id])throw new Error;this.routesById[r.id]=r;const i=t.children;return r.childRoutes=i.length?e(i,r):void 0,r}));return e([t])[0]};#r=t=>{let{pathname:e,search:s,hash:a,state:o}=this.history.location;const r=this.options.parseSearch(s);return{pathname:e,searchStr:s,search:l(t?.search,r),hash:a.split("#").reverse()[0]??"",href:`${e}${s}${a}`,state:o,key:o?.key||"__init__"}};#o=()=>{this.load()};#n=(t={})=>{const e=t.fromCurrent?this.store.state.latestLocation.pathname:t.from??this.store.state.latestLocation.pathname;let s=v(this.basepath??"/",e,`${t.to??"."}`);const a=this.matchRoutes(this.store.state.latestLocation.pathname,{strictParseParams:!0}),o=this.matchRoutes(s),r={...h(a)?.params};let i=!0===(t.params??!0)?r:c(t.params,r);i&&o.map((t=>t.route.options.stringifyParams)).filter(Boolean).forEach((t=>{Object.assign({},i,t(i))})),s=L(s,i??{});const n=t.__preSearchFilters?.length?t.__preSearchFilters?.reduce(((t,e)=>e(t)),this.store.state.latestLocation.search):this.store.state.latestLocation.search,u=!0===t.search?n:t.search?c(t.search,n)??{}:t.__preSearchFilters?.length?n:{},p=t.__postSearchFilters?.length?t.__postSearchFilters.reduce(((t,e)=>e(t)),u):u,d=l(this.store.state.latestLocation.search,p),f=this.options.stringifySearch(d);let m=!0===t.hash?this.store.state.latestLocation.hash:c(t.hash,this.store.state.latestLocation.hash);return m=m?`#${m}`:"",{pathname:s,search:d,searchStr:f,state:this.store.state.latestLocation.state,hash:m,href:`${s}${f}${m}`,key:t.key}};#h=t=>{const e=this.buildNext(t),s=""+Date.now()+Math.random();this.navigateTimeout&&clearTimeout(this.navigateTimeout);let a="replace";t.replace||(a="push");this.store.state.latestLocation.href===e.href&&!e.key&&(a="replace");const o=`${e.pathname}${e.searchStr}${e.hash?`#${e.hash}`:""}`;return this.history["push"===a?"push":"replace"](o,{id:s,...e.state}),this.navigationPromise=new Promise((t=>{const e=this.resolveNavigation;this.resolveNavigation=()=>{e(),t()}}))}},t.cleanPath=m,t.createBrowserHistory=o,t.createHashHistory=function(){return o({getHref:()=>window.location.hash.substring(1),createHref:t=>`#${t}`})},t.createMemoryHistory=r,t.createRouteConfig=$,t.decode=E,t.defaultFetchServerDataFn=O,t.defaultParseSearch=F,t.defaultStringifySearch=k,t.encode=P,t.functionalUpdate=c,t.interpolatePath=L,t.invariant=e,t.isPlainObject=p,t.joinPaths=f,t.last=h,t.matchByPath=_,t.matchPathname=S,t.parsePathname=b,t.parseSearchWith=T,t.pick=u,t.replaceEqualDeep=l,t.resolvePath=v,t.rootRouteId=x,t.stringifySearchWith=j,t.trimPath=w,t.trimPathLeft=g,t.trimPathRight=y,t.warning=function(t,e){if(t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch{}}return!0},Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=index.production.js.map
{
"name": "@tanstack/router",
"author": "Tanner Linsley",
"version": "0.0.1-beta.56",
"version": "0.0.1-beta.57",
"license": "MIT",

@@ -40,4 +40,4 @@ "repository": "tanstack/router",

"tiny-invariant": "^1.3.1",
"@tanstack/store": "0.0.1-beta.56"
"@tanstack/store": "0.0.1-beta.57"
}
}

@@ -61,2 +61,3 @@ import invariant from 'tiny-invariant'

signal?: AbortSignal
preload: boolean
// parentLoaderPromise?: Promise<TParentRouteLoaderData>

@@ -63,0 +64,0 @@ }

@@ -94,6 +94,6 @@ import { Store } from '@tanstack/store'

load = async (): Promise<void> => {
load = async (opts?: { preload?: boolean }): Promise<void> => {
// If the match is invalid, errored or idle, trigger it to load
if (this.store.state.status !== 'pending') {
await this.fetch()
await this.fetch(opts)
}

@@ -104,3 +104,3 @@ }

fetch = async (): Promise<void> => {
fetch = async (opts?: { preload?: boolean }): Promise<void> => {
this.__loadPromise = Promise.resolve().then(async () => {

@@ -149,2 +149,3 @@ const loadId = '' + Date.now() + Math.random()

signal: this.abortController.signal,
preload: !!opts?.preload,
})

@@ -151,0 +152,0 @@ }

@@ -689,3 +689,3 @@ import { Store } from '@tanstack/store'

match.load()
match.load({ preload: loaderOpts?.preload })

@@ -692,0 +692,0 @@ if (match.store.state.status !== 'success' && match.__loadPromise) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc