Skip to content

Commit

Permalink
Add changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
255kb committed Oct 30, 2023
1 parent 9a77aa1 commit f5594d4
Show file tree
Hide file tree
Showing 7 changed files with 96 additions and 26 deletions.
5 changes: 3 additions & 2 deletions components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,10 @@ const Footer: FunctionComponent<{
</Link>
</li>
<li className='mb-2'>
<Link href='/releases/5.0.0/' className='text-reset'>
{/* Do not use <Link>, as routes with a dot inside get rewritten without trailing slash */}
<a href='/releases/5.1.0/' className='text-reset'>
Releases
</Link>
</a>
</li>
<li className='mb-2'>
<Link href='/tutorials/' className='text-reset'>
Expand Down
8 changes: 8 additions & 0 deletions content/docs/latest/response-configuration/file-serving.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,11 @@ By default, Mockoon will return an error in the body when a file is not found. I
![tick the 404 fallback checkbox{1066x231}](docs-img:enable-404-fallback.png)

This option will also fall back to use the content present in the body editor.

## Serving a range of bytes from a file

Mockoon supports the `Range` header for files that are not parsed by the templating engine or when the templating is disabled on the response (see [above](#file-content-templating)).

To use this feature, you must provide a `Range` header in your request. The header value must be in the form `bytes=start-end` where `start` and `end` are the byte positions of the file you want to return. For example, `bytes=0-100` will return the first 100 bytes of the file.

The server will answer with a `206 Partial Content` status code and the `Content-Range` header containing the range of bytes returned. If the range is invalid, the server will answer with a `416 Range Not Satisfiable` status code.
67 changes: 67 additions & 0 deletions content/releases/5.1.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
meta:
title: Mockoon release v5.1.0
description: Discover Mockoon applications new v5.1.0 release with new command palette, Faker.js v8 migration, Range header support and more.
date: '2023-10-30'
---

Welcome to this new release of Mockoon. It brings exciting features like a new command palette and the migration to Faker.js v8. We also fixed some bugs in the desktop application and CLI. Read on to learn more about this release.

---

## Our platinum sponsors

[![GitHub](https://mockoon.com/images/sponsors/github.png)](https://github.blog/2023-04-12-github-accelerator-our-first-cohort-and-whats-next/)
[![Localazy](https://mockoon.com/images/sponsors/localazy.png)](https://localazy.com/register?ref=a9CiDC61gOac-azO)
[![Peakcrypto](https://mockoon.com/images/sponsors/peakcrypto.png)](https://www.peakcrypto.com/)

Mockoon is an open-source project built by volunteer maintainers. If you like our application, please consider sponsoring us and join all the [Sponsors and Backers](https://github.com/mockoon/mockoon/blob/main/backers.md) who helped this project over time!

[![sponsor button](https://mockoon.com/images/sponsor-btn-250.png?)](https://github.com/sponsors/mockoon)

---

## | New command palette

We added a new command palette in the desktop application to quickly access all the application's features. You can open it by pressing `Ctrl+P` (Windows/Linux) or `Cmd+P` (MacOS). You can also access it by clicking on the icon in the header (see capture below).

It currently supports most common actions like creating new environments, starting/stopping them, opening the settings, etc. You can also search for any environment, route, or data bucket by typing their name or path. We will add more actions in the future. Let us know what you think, and do not hesitate to suggest new actions on our [Discord server](https://discord.gg/FtJjkejKGp) or [GitHub discussions](https://github.com/mockoon/mockoon/discussions).

![Command palette showing a search for the word create](/images/releases/5.1.0/command-palette.png)

## | Faker.js v8 migration (⚠️ potentially breaking)

Mockoon now uses [Faker.js v8](https://fakerjs.dev/guide/upgrading.html). This update packs a lot of changes regarding the helper names. Some were removed, and many were renamed. For example, `name.firstName` moved to `person.firstName`. Some new locales were also added, like Danish. Be sure to check their [migration guide](https://fakerjs.dev/guide/upgrading.html) to learn more.

We added a migration script to make the transition easier. It will automatically update your environment's inline bodies and data buckets content. However, it won't migrate external files (JSON, CSV, etc.) containing templating helpers, and you will have to do it manually.

All the [documentation](https://mockoon.com/docs/latest/about/) and [mock samples](https://mockoon.com/mock-samples/category/all/) were updated to reflect these changes and avoid any confusion with old helpers names.

(Issue [#1150](https://github.com/mockoon/mockoon/issues/1150))

## | Range header support

Mockoon now supports the `Range` header. This header is used to request only a part of a resource, like a binary file, to allow the download in chunks. You can now use it in your routes to simulate this behavior.

Head over to the [documentation](http://mockoon.com/docs/latest/response-configuration/file-serving/#serving-a-range-of-bytes-from-a-file) to learn more about this header.

(Issue [#1044](https://github.com/mockoon/mockoon/issues/1044))

## | Desktop application

- We fixed a bug occurring at startup when the application was maximized causing the environments and routes menus sizes to not be correctly restored from the settings and often reduced in size. We also fixed a rare bug caused by the same resizing feature that could propagate an erroneous state of the settings and result in an empty UI at startup. (Issue [#1167](https://github.com/mockoon/mockoon/issues/1167))
- We fixed a bug where the data bucket dropdowns would overflow the screen when displaying long names.
- The log in modal is now automatically closed when the authentication happens through the custom protocol. (Issue [#1158](https://github.com/mockoon/mockoon/issues/1158))

## | CLI

- We improved the error reporting during OpenAPI/data file parsing. (Issue [#1161](https://github.com/mockoon/mockoon/issues/1161))

---

### Thank you

A big thank you to the following people that helped to make Mockoon better:

- [@ajatkj](https://github.com/ajatkj): Faker.js v8 migration. (Issue [#1150](https://github.com/mockoon/mockoon/issues/1150))
- [@PineappleIOnic](https://github.com/PineappleIOnic): Range header support. (Issue [#1044](https://github.com/mockoon/mockoon/issues/1044))
2 changes: 1 addition & 1 deletion firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
{
"source": "/releases{,/}",
"destination": "/releases/5.0.0/",
"destination": "/releases/5.1.0/",
"type": 302
},
{
Expand Down
2 changes: 1 addition & 1 deletion mocks/mockoon-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"responses": [
{
"uuid": "6bd199ae-db7f-42f9-8056-c47490765ce9",
"body": "{\n \"tag\": \"5.0.0\"\n}",
"body": "{\n \"tag\": \"5.1.0\"\n}",
"latency": 0,
"statusCode": 200,
"label": "",
Expand Down
38 changes: 16 additions & 22 deletions pages/public-roadmap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,21 @@ const faq: AccordionData = [

const tasks = {
released: [
{
link: '/releases/5.1.0#new-command-palette',
title: 'Desktop application command palette',
pro: false
},
{
link: '/docs/latest/templating/fakerjs-helpers/',
title: 'Faker.js v8 support',
pro: false
},
{
link: '/docs/latest/response-configuration/file-serving/#serving-a-range-of-bytes-from-a-file',
title: 'Support for Range header',
pro: false
},
{
link: 'https://github.com/mockoon/mockoon/issues/995',
title: 'Support for JSON path',
Expand All @@ -62,25 +77,9 @@ const tasks = {
link: '/docs/latest/logging-and-recording/auto-mocking-and-recording/#record-your-api-calls',
title: 'Auto-mocking with recording',
pro: false
},
{
link: '/docs/latest/api-endpoints/crud-routes/',
title: 'CRUD routes',
pro: false
},
{
link: '/serverless/',
title: 'Serverless package',
pro: false
}
],
inProgress: [
{
link: 'https://github.com/mockoon/mockoon/issues/1150',
title: 'Faker.js v8 support',
pro: false,
target: '_blank'
},
{
link: 'https://github.com/mockoon/mockoon/issues/678',
title: 'OpenAPI import/export in CLI',
Expand All @@ -99,12 +98,7 @@ const tasks = {
pro: false,
target: '_blank'
},
{
link: 'https://github.com/mockoon/mockoon/issues/1044',
title: 'Support for Range header',
pro: false,
target: '_blank'
},

{
link: '/pro/',
title: 'Data synchronization for solo developers',
Expand Down
Binary file added public/images/releases/5.1.0/command-palette.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f5594d4

Please sign in to comment.