swr-devtools
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -1,1 +0,1 @@ | ||
export { SWRDevTools } from "./SWRDevTools"; | ||
export { SWRDevTools, DevToolsMessage } from "./SWRDevTools"; |
@@ -29,3 +29,2 @@ "use strict"; | ||
var match = key.match(/^\$inf\$(?<cacheKey>.*)?/); | ||
console.log(match, key); | ||
return (_b = (_a = match === null || match === void 0 ? void 0 : match.groups) === null || _a === void 0 ? void 0 : _a.cacheKey) !== null && _b !== void 0 ? _b : key; | ||
@@ -32,0 +31,0 @@ }; |
import React from "react"; | ||
export declare type DevToolsMessage = { | ||
type: "updated_swr_cache"; | ||
payload: { | ||
key: string; | ||
value: any; | ||
}; | ||
}; | ||
export declare const SWRDevTools: ({ children }: { | ||
children: React.ReactNode; | ||
}) => JSX.Element; |
@@ -16,3 +16,9 @@ "use strict"; | ||
} | ||
window.postMessage({ __SWR_DEVTOOLS__: { cacheData: { key: key, value: value } } }, "*"); | ||
window.postMessage({ | ||
type: "updated_swr_cache", | ||
payload: { | ||
key: key, | ||
value: value, | ||
}, | ||
}, "*"); | ||
}); | ||
@@ -19,0 +25,0 @@ }; |
{ | ||
"name": "swr-devtools", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "A React component for SWR DevTools", | ||
@@ -37,3 +37,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "bd1b8d9f9a488e4c3507e0db5e6c5bf5fb83c88a" | ||
"gitHead": "bb2e93268fda7b80da7e496a4c268807f9d4f184" | ||
} |
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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
8636
100
0