mswjs / msw-storybook-addon

Mock API requests in Storybook with Mock Service Worker.
https://msw-sb.vercel.app
MIT License
410 stars 39 forks source link

Specify strict version range for the "msw" peer dependency #33

Closed kettanaito closed 3 years ago

kettanaito commented 3 years ago

Current behavior

The msw package is specified as a peer dependency of the add-on using a wildcard as the expected version range:

https://github.com/mswjs/msw-storybook-addon/blob/3185bb6d610f109194fa51844d0db3f9cd3d7481/packages/msw-addon/package.json#L38-L40

Expected behavior

The latest version of msw is specified as the acceptable range:

{
  "peerDependencies": {
    "msw": "^0.29.0"
  }
}

Motivation

Using a wildcard version range leaks breaking changes from MSW to the add-on users who are using a version of the add-on that hasn't yet been optimized for the breaking change. Restricting and maintaining the peer dependency's version range will allow us to distribute breaking changes properly.