Monday, July 25, 2022

v2.2.0 - Moving Forward

As the framework has been moving forward, there has been a drive and goal to align with the growing standards in the TS/JS community. The last version (2.1.0) and the current release, have been about removing technical debt, and aligning with the changing landscape. In this release, the fundamental shift has been towards: 
  • Removing exceptions to Typescript strict mode, and relying on strict mode as the standard 
  • Explicit typing of every method, which has had the side effect of changing some return types slightly. 
  • Stricter linting rules to help enforce better practices (e.g. treating type casts as an antipattern) 
  • Swapping out use of NodeJS.ReadableStream for stream.Readable. 
  • Various dependency updates 

Whats Next?

The JS community is starting the long hard journey towards proper Ecmascript Module (ESM) support, application and usage of heap snapshotting, as well as the newly passed standards (finally!!) for decorators.  Both of these changes will have an impact on the framework, as there is real work to adjust to these changes. 

ESM Support

ESM  support is definitely the highest priority, but the custom loader support is currently experimental and does not have a clear timeline for when it will be ready.  This is a requirement to allow the framework to do the advanced analysis during compilation/loading of code.  There is still a gap on the dynamic/real-time hotloading code within the framwork, as the ESM standard looks to not provide a clear way of "unloading" modules.  Some thought will be required to ensure that the development experience is not hindered.

Heap Snapshotting

With the ESM support on the horizon (and the impact it has on unloading modules at runtime), there is real impact on the testing framework performance. With the ongoing work for heap snapshot support in V8/NodeJS, this opens the door for minimizing the performance issues, while dramatically simplifying the testing/loading code.  

Decorators FTW

This has been an ongoing battle, with a lot of complexity and challenges.  Many frameworks have adopted the current decorator implementation that Angular's collaboration with Microsoft helped to bring into Typescript.  The main change here will be impact to AST manipulation, as well as the actual decorators themselves.  The overall code should be much simpler as decorators will be properly supported at the syntax level.