Skip to main content

News 05/2024

This has probably been the most active month for the nimpl family. Therefore, the decision was made to start collecting changes in the form of separate articles. This will talk about key innovations, as well as plans and new perspectives. This article will describe the changes for April-May.

General changes 

It's worth starting with the most basic, but very delayed part. Eslint and prettier were added to all packages. At the same time, all packages were brought to a unified structure, translated into pnpm, and husky was configured. In large part, this was done with the aim of appearing the possibility of comfortable contribute to the projects.

Packages working with next.js cache have been rewritten to TS (nimpl-cache ). Initially, they were made on typing using js-doc to remove the build step and problems from it. However, both from the point of view of DX, and from the point of view of quality, this approach lost to TS (in my subjective opinion).

Documentation 

A contribution guide  was added. It fits any package. Any suggestions and ideas are welcome. In turn, I try to respond in a timely manner and make the desired changes.

Documentation for a number of packages has been improved (nimpl-docs/pulls ). The main documentation page  has also been improved and now it looks lively and more reflects the goals of the task. Thanks to ʏᴜᴢᴢᴜᴡᴏ from the next.js discord for ideas .

Problem fixes 

Weak points of packages are gradually being fixed. In get-params from the @nimpl/getters  package, errors in obtaining parameters for intercepted segments and groups were fixed. This part was covered by new tests (nimpl-getters/pull/57 , nimpl-getters/pull/62 ). Thanks to Antonio Laguna  for the issues (nimpl-getters/issues/56 , nimpl-getters/issues/61 ) and help

In classnames-minifier, information about errors in the configuration part has been improved (classnames-minifier/pull/19/files ). It also has a disableDistDeletion option added, in case your system has problems with deletion nimpl-classnames-minifier/pull/93 .

Improvements 

Of course, there were also improvements. In @nimpl/config , the targetEnvKey option was added (nimpl-config/pull/36 ), which allows you to specify from which environment variable to take the current config key.

A series of small but important changes in the concepts of @nimpl/ab-tests . Now the package writes only one cookie (nimpl-ab-tests/pull/32 ). The idea with recording two turned out to be an unnecessary complication. The cookie itself can now be configured by setting the flags you need (nimpl-ab-tests/pull/30 ). Another useful improvement was the addition of redirect support as a test option (nimpl-ab-tests/pull/25 ).

New items and major changes 

In connection with the imminent release of react v19, contexts have been moved to a separate package - @nimpl/context . However, at the same time, they are marked as unstable. The node.js functionality used inside contexts can lose content (and this is a quote from the developers and all the available information). If you have experience with this problem - please share in the tasks and discussions of the package.

And finally, major changes. The first utility of the family (@nimpl/versioner ). It is not ready for use and is primarily performed as an example of possible implementation of documentation versioning and grew from an attempt to perform a task in nextra.

In the near future, another very useful utility will appear, but I will tell about it already in the next selection or in the form of a separate article.

And, perhaps, the main news - @nimpl/i18n  v2.0.0 . The long-awaited release with fixes for all problems and errors. Removed package caching, updated API, the getLanguage function returned to the configuration, the package can work without changing the next.js configuration and other useful improvements. These were difficult decisions to remove a number of functionalities, but it was decided to leave the main advantage of the package its simplicity.