A client-side server to build, test and share your JavaScript app
🚀 Enhancements
server.middleware = [/*...*/]
by @osi-jehrlich in https://github.com/miragejs/miragejs/pull/1089
🐛 Bugfixes
Request.queryParams
by @jasikpark in https://github.com/miragejs/miragejs/pull/1027
🏠 Internal
Full Changelog: https://github.com/miragejs/miragejs/compare/v0.1.47...v0.1.48
🚀 Enhancements
🐛 Bugfixes
Full Changelog: https://github.com/miragejs/miragejs/compare/v0.1.46...v0.1.47
🚀 Enhancements
🐛 Bugfixes
🗂 Types
Full Changelog: https://github.com/miragejs/miragejs/compare/v0.1.45...v0.1.46
🚀 Enhancements
🐛 Bugfixes
Full Changelog: https://github.com/miragejs/miragejs/compare/v0.1.44...v0.1.45
🐛 Bugfixes
🏠 Internal
#1036 Extract pretender code to its own module for future move to another package by @cah-briangantzler
This is a step towards decoupling pretender from Mirage, with the goal of Mirage supporting MSW or other mocking layers. There should not be any user-facing changes here, so long as you were not using internal methods like server._getFullPath()
. If you were, you may need to change these to server.interceptor._getFullPath()
.
Dependency updates
Full Changelog: https://github.com/miragejs/miragejs/compare/v0.1.43...v0.1.44
🐛 Bugfixes
modelInstance.attrs
by @IanVS in https://github.com/miragejs/miragejs/pull/1002
🏠 Internal
Full Changelog: https://github.com/miragejs/miragejs/compare/v0.1.42...v0.1.43
🚀 Enhancements
🐛 Bugfixes
📝 Docs
🏠 Internal
🏠 Internal
🚀 Enhancements
#481 Mark Mirage as tree-shakable via sideEffects key.
Prior to this change, Webpack (in common tools like Create React App + Vue CLI) would not tree-shake Mirage from production builds, since Mirage does indeed have side effects. However, these side effects are only relevant during development, and should not prevent Mirage from being tree-shaken from production builds.
The sideEffects
key is an escape hatch and can be used to tell Webpack exactly this. With this change, apps with modern build setups that use Mirage like this
import { Server } from 'miragejs'
if (process.env.NODE_ENV !== 'production') {
new Server()
}
should get all of miragejs
automatically tree-shaken from their production builds!
🏠 Internal
🚀 Enhancements
Introduce createServer
#467
Mirage now provides a createServer
function as an alternative to new Server
. This function was added for type-safe interactions with the server in the context of your config. See #467 for more details.
📝 Docs
🏠 Internal