October 2024 Summaries
3 posts from Nx
Filter
Month:
Year:
Post Summaries
Back to Blog
Nx has introduced a new command, `nx import`, to simplify the process of importing other repositories or projects into an organization's monorepo, addressing a growing demand from the community. This command facilitates the merging of existing projects, ensuring that the git history is preserved and selectively filtered for relevant files, which is particularly beneficial for complex codebases. The `nx import` tool guides users through an interactive process to import projects either from local directories or remote repositories, with steps to clone the source repository, transfer the project code, and integrate it with existing code while also suggesting relevant Nx plugins. Although the tool streamlines much of the process, some manual adjustments may still be needed for elements like CI pipelines. The feature is aimed at enhancing the efficiency and maintainability of monorepos, especially for enterprise-level users transitioning from legacy codebases.
Oct 29, 2024
737 words in the original blog post.
Adopting a monorepo approach with Nx requires understanding and restructuring to maximize benefits, such as reducing CI run times and costs. An example from a major US sports retailer demonstrates the challenges and improvements possible with this approach, as their initial migration resulted in long CI times and low cache hit rates, but by adhering to best practices, they significantly reduced these times. Effective monorepo management involves creating separate projects for shared code and applications, enabling faster task execution, better caching, and parallelization. This strategy involves moving common elements like UI features or utility functions into dedicated libraries, which enhances consistency and further reduces build times. While a monorepo structure does not automatically solve CI pipeline issues, evaluating and restructuring architecture with best practices can lead to substantial improvements in build efficiency.
Oct 25, 2024
1,045 words in the original blog post.
Nx 20 introduces significant enhancements and features aimed at improving the monorepo experience, with a focus on speed and efficiency for TypeScript projects. Key updates include the adoption of database-driven caching, which offers a faster and more robust solution over the previous file-based system, and the introduction of Project References in TypeScript monorepos to streamline build times by automatically managing dependencies. The release also marks a transition from the @nrwl to the @nx npm scope, facilitating a smoother migration for users with guidance available for updating dependencies. Additionally, Nx 20 integrates the @nx/rspack plugin to support faster builds and extends its functionality to Angular projects with the @ng-rspack/nx plugin. The update also enhances the nx import feature, which simplifies the process of incorporating external projects into Nx workspaces while preserving their git history and recommending suitable plugins. Moreover, the new release eliminates the use of derived directories, requiring users to specify exact paths for generating apps or libraries, and prepares for a revamped versioning logic set to support more complex workspaces across various languages in future releases.
Oct 03, 2024
1,658 words in the original blog post.