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

router-dom

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

router-dom - npm Package Compare versions

Comparing version 2.2.6 to 2.2.7

10

dist/router.js

@@ -13,4 +13,6 @@ import { pathToRegexp, match } from "path-to-regexp";

addEventListener("popstate", async (e) => {
//@ts-expect-error
router.doRouting(location.pathname + location.search, e);
if (!window.isHMR) {
//@ts-expect-error
router.doRouting(location.pathname + location.search, e);
}
});

@@ -302,4 +304,6 @@ // Reload -> store scrollPosition

const copy = where.cloneNode();
copy.append(html `${(await cacheObj.html) || ""}`);
copy.append(window.isHMR
? html `${await (await fetch(route.templateUrl)).text()}`
: html `${(await cacheObj.html) || ""}`);
render(copy, where, false);
}
{
"name": "router-dom",
"version": "2.2.6",
"version": "2.2.7",
"description": "A lightweight router for everyone",

@@ -29,6 +29,6 @@ "type": "module",

"@esm-bundle/chai": "^4.3.4",
"@web/test-runner": "^0.13.20",
"@web/test-runner": "^0.13.23",
"@web/test-runner-playwright": "^0.8.8",
"esbuild": "^0.13.9",
"typescript": "^4.4.4"
"esbuild": "^0.14.8",
"typescript": "^4.5.4"
},

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

"dependencies": {
"hydro-js": "^1.4.6",
"hydro-js": "^1.5.2",
"path-to-regexp": "^6.2.0"
}
}

@@ -15,5 +15,12 @@ import type { MatchResult } from "path-to-regexp";

interface CustomWindow extends Window {
isHMR: boolean;
}
declare var window: CustomWindow;
addEventListener("popstate", async (e) => {
//@ts-expect-error
router.doRouting(location.pathname + location.search, e);
if (!window.isHMR) {
//@ts-expect-error
router.doRouting(location.pathname + location.search, e);
}
});

@@ -348,3 +355,7 @@

const copy = where.cloneNode();
(copy as Element).append(html`${(await cacheObj!.html) || ""}`);
(copy as Element).append(
window.isHMR
? html`${await (await fetch(route.templateUrl!)).text()}`
: html`${(await cacheObj!.html) || ""}`
);
render(copy, where, false);

@@ -351,0 +362,0 @@ }

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