Releases: miragejs/miragejs
v0.1.48
What's Changed
🚀 Enhancements
- Add Middleware support via
server.middleware = [/*...*/]
by @osi-jehrlich in #1089 - Allow for keyForId and valueForId on the serializer by @cah-brian-gantzler in #1086
🐛 Bugfixes
- Don't require testConfig for timing to respect environment. by @rmjohnson-olo in #1080
- Update typing for
Request.queryParams
by @jasikpark in #1027
🏠 Internal
New Contributors
- @jasikpark made their first contribution in #1027
- @rmjohnson-olo made their first contribution in #1080
- @osi-jehrlich made their first contribution in #1089
Full Changelog: v0.1.47...v0.1.48
v0.1.47
🚀 Enhancements
🐛 Bugfixes
- Establish precedence for embed over serializeIds by @NoneOfMaster in #1074
New Contributors
Full Changelog: v0.1.46...v0.1.47
v0.1.46
What's Changed
🚀 Enhancements
- Support selected embedded relationships by @NoneOfMaster in #850
- Add resource function type definition by @morganmspencer in #1059
🐛 Bugfixes
- Fixed timing being incorrectly passed to pretender by @cah-brian-gantzler in #1051
- Fix includes query params by @mansona in #1064
🗂 Types
- Align passthrough type declaration with implementation by @brzosthub in #1061
New Contributors
- @brzosthub made their first contribution in #1061
- @NoneOfMaster made their first contribution in #850
- @morganmspencer made their first contribution in #1059
- @mansona made their first contribution in #1064
Full Changelog: v0.1.45...v0.1.46
v0.1.45
🚀 Enhancements
- #1041 - Add more descriptive namespace error by @srikanthkyatham
🐛 Bugfixes
- #1045 - Fixed assert about changing Pretender config by @cah-briangantzler
New Contributors
- @srikanthkyatham made their first contribution in #1041
Full Changelog: v0.1.44...v0.1.45
v0.1.44
🐛 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 toserver.interceptor._getFullPath()
. -
Dependency updates
New Contributors
- @cah-briangantzler made their first contribution in #1036
Full Changelog: v0.1.43...v0.1.44
v0.1.43
What's Changed
🐛 Bugfixes
- Update collection TS definitions by @adc-mhaugen in #900
- Add more useful typescript type for
modelInstance.attrs
by @IanVS in #1002 - Route handler return types by @pleek91 in #1009
- Add a type for findBy with a predicate function by @gentoid in #793
🏠 Internal
- Create RELEASE.md
- Move to github actions for CI by @IanVS in #990
- Upgrade and lock-down prettier version by @IanVS in #988
- Update dependencies (#989, #991, #992, #995, #996)
- Enforce prettier in typescript files by @IanVS in #1010
- Switch to maintained @rollup/plugin-node-resolve by @pravi in #748
- Update babel plugin by @pravi in #749
New Contributors
- @dependabot made their first contribution in #994
- @adc-mhaugen made their first contribution in #900
- @pleek91 made their first contribution in #1009
- @pravi made their first contribution in #748
- @gentoid made their first contribution in #793
Full Changelog: v0.1.42...v0.1.43
v0.1.42
🚀 Enhancements
- #695 [TypeScript] Basic support for functions in factories
- #977 [TypeScript] Add type for head request handler
🐛 Bugfixes
- #643 Model.toJSON should copy attrs
- #667 [TypeScript] Fix DbLookup Type for db
- #984 [TypeScript] Remove type assertion that fails in TS 4.0
- #978 Passthrough no longer results in error in native code for react native
📝 Docs
🏠 Internal
- Dependency updates
v0.1.41
🏠 Internal
- Dependency updates
v0.1.40
🚀 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 thisimport { Server } from 'miragejs' if (process.env.NODE_ENV !== 'production') { new Server() }
should get all of
miragejs
automatically tree-shaken from their production builds!
🏠 Internal
- Dependency updates
v0.1.39
🚀 Enhancements
-
Introduce
createServer
#467Mirage now provides a
createServer
function as an alternative tonew Server
. This function was added for type-safe interactions with the server in the context of your config. See #467 for more details.
📝 Docs
- Update serializer docs
🏠 Internal
- Dependency updates