News

What are the latest updates and new features in Jeasx?

Welcome to the news section of Jeasx. Here we are going to post updates about new features, bug fixes, and general information about the project.

2025-04-21 - Jeasx 1.7.2 released

๐ŸŽ‰ This release is brings only minor changes:

  • FASTIFY_STATIC_HEADERS: Apply all matching headers to the current path. Use an empty string ("") as first rule to set default headers, which can be overridden by more specific rules later. Please checkout the updated configuration.
    Please note: You may need to adjust your existing configuration by moving the wildcard rule to the top of the JSON file to ensure it can be overridden by more specific rules defined below.
  • env.sh: Removed logging of loaded environment files. Minor refactoring to clean up the code.

Dependency updates: fastify@5.3.2, @types/node@22.14.1


Release History

2025-03-31 - Jeasx 1.7.1 released

๐ŸŽ‰ This release enhances support for Bun as an alternative JavaScript runtime for both development and production. Use bun -b dev to start development with Jeasx and Bun. With Bun 1.2.8, the entire Jeasx expo functions without any issues. While Node.js remains the primary focus of the project, Bun support will continue to improve. Having multiple options is always beneficial.

Route loading in development has been enhanced. It now relies on the modification time of the module, eliminating the need to calculate a hash for the file content. Additionally, a redundant file existence check for route handlers has been removed, resulting in more streamlined core code.

From now on, source maps for serverless.js are provided to enhance debugging.

Dependency updates: esbuild@0.25.2

2025-03-27 - Jeasx 1.7.0 released

๐ŸŽ‰ This release removes pm2 as a dependency and utilizes the powerful file watching capabilities of esbuild directly. This enhancement significantly improves build performance because esbuild only re-compiles linked files. Additionally, sharing code between the server and browser now works seamlessly without any additional configurations.

As an added benefit, Jeasx now works with Bun as an alternative JavaScript runtime, although this setup is not yet recommended for development or production.

Dependency updates: @types/node@22.13.14

2025-03-26 - Jeasx 1.6.3 released

๐ŸŽ‰ This release fixes a bug with the recently introduced env file loading. The env files were loaded in the wrong order, so that overwriting existing env variables didn't work.

Dependency updates: fastify@5.2.2, @types/node@22.13.13

2025-03-19 - Jeasx 1.6.2 released

๐ŸŽ‰ This release introduces a try/catch block in the central request handler, ensuring that proper error messages are logged. Additionally, it enables sourcemaps for both server and browser code, making debugging a breeze.

To enable sourcemap support for Node.js, add the following code to the root of your project as a .npmrc file:

node-options=--enable-source-maps

If you are using Docker, you need to modify the following lines in your Dockerfile to enable support for .npmrc:

# RUN npx jeasx build
RUN npm run build
# CMD ["npx","jeasx","start"]
CMD ["npm","start"]
2025-03-15 - Jeasx 1.6.1 released

๐ŸŽ‰ This releases replaces the dependency on dotenv-flow with a native implementation provided by Node.js (using process.loadEnvFile introduced with Node v20.12.0) to load environment variables from .env-files. The order of loading .env-files is the same as before:

  1. .env.defaults
  2. .env
  3. .env.local
  4. .env.[NODE_ENV] (e.g. .env.development or .env.production)
  5. .env.[NODE_ENV].local (e.g. .env.development.local or .env.production.local)

Breaking change: If you use .env-files to configure Jeasx and deploy to Vercel, please update your vercel.json. You'll need to change "includeFiles": "{node_modules,dist,public}/**/*" to "includeFiles": "./**/*"to make sure Vercel includes the .env-files in the deployment.

Additionally a fix for correctly parsing environment variables to configure Fastify (FASTIFY_DISABLE_REQUEST_LOGGING, FASTIFY_TRUST_PROXY) was implemented.

Dependency updates: jsx-async-runtime@1.0.0, esbuild@0.25.1, pm2@6.0.5

Please note: version 1.6.0 was unpublished from NPM right after the release due to a mistake.

2025-03-09 - Jeasx 1.5.0 released

๐ŸŽ‰ This release features two new configurations:

  • FASTIFY_REWRITE_URL allows you to rewrite incoming URLs. Useful when running behind proxies or when you want to fake URLs.
  • JEASX_BUILD_ROUTES_IGNORE_WATCH allows watching for changes in src/browser when importing browser code into server code.

Dependency updates: @types/node@22.13.10.

2025-03-01 - Jeasx 1.4.1 released

๐ŸŽ‰ This release features an updated jsx-async-runtime@0.8.1 which brings typings for SVGs for a better developer experience in the IDE of your choice.

3rd-party dependencies were updated to the latest versions: @fastify/static@8.1.1, @types/node@22.13.5

2025-02-12 - Jeasx 1.4.0 released

๐ŸŽ‰ This release adds the route property to the current endpoint handler (e.g., /[index] or /bar/[...path]) to the request object (accessible via request.route). This makes it much easier to calculate trailing path segments for wildcard routes.

Also several dependencies were updated to the latest versions: esbuild@0.25.0, @fastify/static@8.1.0, @fastify/multipart@9.0.3, @fastify/formbody@8.0.3, @types/node@22.13.1

2025-01-18 - Jeasx 1.3.0 released

๐ŸŽ‰ We are excited to announce the release of jsx-async-runtime@0.7.1, which now includes proper typings for all HTML attributes in accordance with the Mozilla Developer Network. This ensures that code completion in your IDE for all HTML attributes works now as expected in Jeasx. Special thanks to Rebecca for highlighting this issue!

The updated version of jsx-async-runtime now supports using an array of strings for the class attribute, making it easier to create complex classnames. You can now construct classnames using plain strings or template strings, an array of strings, or an object, covering most use-cases known from other libraries like classnames.

As always, we've updated to the latest versions of our dependencies: fastify/formbody@8.0.2, fastify/multipart@9.0.2, fastify/static@8.0.4, and types/node@22.10.7.

2025-01-06 - Jeasx 1.2.2 released

๐ŸŽ‰ This release is just a minor dependency update: fastify@5.2.1, fastify/cookie@11.0.2 and types/node@22.10.5.

2024-12-12 - Jeasx 1.2.1 released

๐ŸŽ‰ This release fixes a bug introduced by the recently introduced route caching feature: if a guard returned different response types (e.g. JSX code for a forbidden route, otherwise props for the guarded routes), the guarded routes weren't resolved anymore.

2024-12-07 - Jeasx 1.2.0 released

๐ŸŽ‰ This release brings a major performance boost (about 2-5 times faster in benchmarks) by introducing runtime caches for resolved routes and loaded JavaScript modules. The caches are only used in production and won't interfere with your development workflow. This change was triggered by a PR submitted by Bryce, Kudos to him for bringing this topic onto the radar.

It also features an update to jsx-async-runtime which provides more accurate and also deprecated typings for HTML tags and attributes according to the fantastic HTML reference from the Mozilla Development Network.

Added two new environment variables (FASTIFY_DISABLE_REQUEST_LOGGING and FASTIFY_TRUST_PROXY) to give you more control over how Jeasx should behave in different environments.

2024-12-01 - Jeasx 1.1.0 released

๐ŸŽ‰ Migrated from dotenv to dotenv-flow, so you can use NODE_ENV-specific .env* files (like .env.development) to configure different environments for production and development. This is useful to disable caching headers (e.g. via FASTIFY_STATIC_HEADERS) in development, as Jeasx applies FASTIFY_STATIC_HEADERS in development from now on for a more consistent developer expierence. See updated .env-files in the quickstart-project for an example how to disable caching in development. This is only needed if you have configured FASTIFY_STATIC_HEADERS for your existing projects.

Bumped default environment variable ESBUILD_BROWSER_TARGET to more recent browser versions (e.g. chrome126, edge126, firefox128, safari17). If you want to stick with older versions, you can override it via the environment. Learn more about possible values at the esbuild website.

Updated jsx-async-runtime which fixes a bug in escapeEntities which escaped existing & two times. This release also removes the deprecated renderToString function. Simply replace it with jsxToString.

The default host is now :: which binds to all available network interfaces (e.g. IPv6). You can change it via the HOST environment variable (e.g. HOST=0.0.0.0 for the old behaviour). The change is especially useful to connect to Jeasx via private networking on hosting platforms like Railway.

2024-11-15 - Jeasx 1.0.2 released

๐ŸŽ‰ Disabled cache-control for fastify-static, so proper Cache-Control response header could be applied via the environment variable FASTIFY_STATIC_HEADERS. Have a look at the env-file in the quickstart project for an example.

2024-11-01 - Jeasx 1.0.1 released

๐ŸŽ‰ This version brings official support for Node 22. Also dependencies were updated to latest versions of fastify@5.0.1, fastify/static@8.0.2 and fastify/cookie@11.0.1. Added new examples for template fragments in combination with HTMX and image optimization with sharp.

2024-10-04 - Jeasx 1.0.0 released

It's finally here! Jeasx 1.0.0 is ready for production. We are proud to announce that the framework has reached feature completeness and is now ready for the masses. Lots of hours of work have been put into this project to make sure you have the best experience possible.

2024-09-23 - Jeasx 0.15.2 released

Updates to all @fastify-plugins and esbuild@0.24.0.

2024-09-21 - Jeasx 0.15.1 released

Decorate the Fastify request object with "path" property, so you can easily access the route path without query parameters via request.path. This solves 99% of all use-cases for recently removed @fastity/url-data.

2024-09-20 - Jeasx 0.15.0 released

This release comes with Fastify 5. It also removes @fastify/url-data and @fastify/accepts as dependencies, therefore your code might break. The reason behind this removal is to depend on less dependencies in the long run which makes maintenance of the core easier.

If you rely on either accepts or url-data, you must provide appropriate changes in userland code. For @fastify/url-data I would recommend to use fast-uri and for @fastify/accepts jshttp/accepts for parsing accept-header if needed.

Please note: there were some intermediate releases since the past proper release which shouldn't be used (and are mostly unpublished from npm).

2024-08-21 - Jeasx 0.11.2 released

Added simple Dockerfile to quickstart template. Dependency updates: esbuild@0.23.1, @fastify/cookie@9.4.0, @types/node@20.16.1

2024-07-27 - Jeasx 0.11.1 released

Performance optimization: if response is string or buffer, break evaluation loop early. This allows to build caches for pages and binary assets in userland.

2024-07-26 - Jeasx 0.11.0 released

Updated to jsx-async-runtime@0.5.0 which allows to override jsxToString from jsx-async-runtime to intercept / modify / replace JSX components via this context. Have a look at the example to see how it works.

2024-07-19 - Jeasx 0.10.1 released

Breaking change: removed @fastify/request-context in favor of the recently introduced this context. Changing your code should be straightforward. This change decouples userland code from Fastify. Additionally code for Jeasx and jsx-async-runtime is provided unminified, so debugging and testing is far easier now.

2024-07-12 - Jeasx 0.9.1 released

Updated to jsx-async-runtime@0.4.1 which fixes a problem when running tests with Vitest.

2024-07-10 - Jeasx 0.9.0 released

Updated to jsx-async-runtime@0.4.0 which allows to use 'this' as context object to avoid prop drilling. Have a look at the demo to see how things work.

2024-07-05 - Jeasx 0.8.0 released

Updated to jsx-async-runtime@0.3.0 (deprecated renderToString in favor of jsxToString)

2024-07-03 - Jeasx 0.7.6 released

Updated to esbuild@0.23.0

2024-07-01 - Jeasx 0.7.5 released

Updated to fastify@4.28.1, esbuild@0.22.0, pm2@5.4.1

2024-05-28 - Jeasx 0.7.4 released

Updated to esbuild@0.21.4, pm2@5.4.0

2024-05-17 - Jeasx 0.7.3 released

Updated to esbuild@0.21.3, @types/node@20.12.12

2024-05-08 - Jeasx 0.7.2 released

Updated to fastify@4.27.0, esbuild@0.21.1, @fastify/static@7.0.4

2024-05-07 - Jeasx 0.7.1 released

Updated esbuild to 0.21.0.

2024-04-27 - Jeasx 0.7.0 released

This release introduces a new feature that allows you to post-process the resulting payloads, such as prettifying the HTML output. You can now set up a response handler, for example, in a guard. The response handler takes the resulting payload as a parameter and returns the modified payload.


import * as prettier from "prettier";
...
export default function RootGuard({ request, reply }) {
  this.response = async (payload) => {
    return typeof payload === "string" &&
      String(reply.getHeader("content-type")).startsWith("text/html")
      ? await prettier.format(payload, { parser: "html" })
      : payload;
  };
}
Shame on me...

I have recently started writing news as we approach the 1.0 release. But you can study the changelog at GitHub to see what has happend in the past.

2023-12-30 - First public commit

Our Journey Begins! ๐ŸŽ‰ Introducing Jeasx, a revolutionary web development framework born out of a summer experiment in 2023. Our mission? To simplify web development using server-rendered JSX as the cornerstone, bringing back the essence of the web: HTML, CSS, and progressive enhancing JavaScript. Join us as we redefine the future of web development together!