Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

msw-storybook-addon

Package Overview
Dependencies
Maintainers
3
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

msw-storybook-addon - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3--canary.edc76c3.0

22

dist/index.browser.js

@@ -12,3 +12,6 @@ // src/initialize.browser.ts

"__webpack_hmr",
"sb-vite"
"sb-vite",
"/virtual:",
".stories.",
".mdx"
];

@@ -54,6 +57,17 @@ var shouldFilterUrl = (url) => {

const worker = setupWorker(...initialHandlers);
worker.start(augmentInitializeOptions(options));
worker.context.activationPromise = worker.start(
augmentInitializeOptions(options)
);
api = worker;
return worker;
}
async function waitForMswReady() {
const msw = getWorker();
if (!!msw.context?.isMockingEnabled) {
return;
}
if (msw.context.activationPromise) {
return await msw.context.activationPromise;
}
}
function getWorker() {

@@ -169,6 +183,4 @@ if (api === void 0) {

var mswLoader = async (context) => {
await waitForMswReady();
applyRequestHandlers(context.parameters.msw);
if (typeof window !== "undefined" && "navigator" in window && navigator.serviceWorker?.controller) {
await navigator.serviceWorker.ready;
}
return {};

@@ -175,0 +187,0 @@ };

@@ -12,3 +12,6 @@ // src/initialize.react-native.ts

"__webpack_hmr",
"sb-vite"
"sb-vite",
"/virtual:",
".stories.",
".mdx"
];

@@ -58,2 +61,5 @@ var shouldFilterUrl = (url) => {

}
async function waitForMswReady() {
getWorker();
}
function getWorker() {

@@ -169,6 +175,4 @@ if (api === void 0) {

var mswLoader = async (context) => {
await waitForMswReady();
applyRequestHandlers(context.parameters.msw);
if (typeof window !== "undefined" && "navigator" in window && navigator.serviceWorker?.controller) {
await navigator.serviceWorker.ready;
}
return {};

@@ -175,0 +179,0 @@ };

{
"name": "msw-storybook-addon",
"version": "2.0.2",
"version": "2.0.3--canary.edc76c3.0",
"description": "Mock API requests in Storybook with Mock Service Worker.",

@@ -5,0 +5,0 @@ "keywords": [

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