Nx 17.2 Update!!
Tags: nx, javascript, npm, rust
Published: 2023-12-20 17:02:39

---
title: Nx 17.2 Update!!
published: true
description: Release Notes and Updates for Nx 17.2 Release
tags: nx, javascript, npm, rust
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v5f9v2gdmatqrnf0egen.png
canonical_url: https://blog.nrwl.io/nx-17-2-update-b8f23ec42cbb?source=friends_link&sk=b2ea5cd1e07352936556a6ef5431a091
# Use a ratio of 100:42 for best results.
# published_at: 2023-12-20 04:03 +0000
---

It's been a bit since we launched [Nx 17](https://blog.nrwl.io/nx-17-0-has-landed-1dad19176ff3)! In this article, we'll go over some of the new developments and improvements that have landed in Nx 17.2:

- [Nx Closes In On 4 Million Weekly NPM Downloads!!](#chapter-1)
- [New Simplified Project Configuration On the Way](#chapter-2)
- [Rust for Speed, Typescript for extensibility](#chapter-3)
- [Module Federation Updates](#chapter-4)
- [Nx Release Updates](#chapter-5)
- [Angular 17 (AND NgRx 17) Support](#chapter-6)
- [Smart Monorepos - Fast CI](#chapter-7)
- [New Canary Releases](#chapter-8)


## Nx Closes In On 4 Million Weekly NPM Downloads!!<a name="chapter-1"></a>

2023 has been a great year for Nx! We worked with a lot of the teams out there building fantastic open source tools. And you can see the results: we made [Vite](https://vitejs.dev/) a first class citizen in many of our Nx plugins, we added support for [Rspack](https://youtu.be/jGTE7xAcg24?si=gyFyW_uYjMq_5ELF), streamlined our Node experience by adding an Nx team maintained [Fastify plugin](https://youtu.be/LHLW0b4fr2w?si=P5MPIiD_mxTpQStY), support for Storybook interaction testing, welcomed Playwright to the family and much more, continuing our missing to push developer productivity to the limits!

And our downloads on NPM keep confirming this. We are about to cross 4 million downloads per week.

![Almost 4 million weekly downloads!](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/srlp1bucdu4qsjdwcipj.png)

If this made you curious, keep an eye on [our blog](https://nx.dev/blog) or [X/Twitter](https://twitter.com/nxdevtools) as we're going to release a 2023 year recap blog post next week.

## New Simplified Project Configuration On the Way<a name="chapter-2"></a>

Adoption is crucial, and simplicity is the driver for adoption. Last year we heavily optimized how you can use Nx in an existing project. Just drop the `nx` package (or run `nx init`) and that's it. Nx understands your workspace and efficiently runs your `package.json` scripts.

Using Nx at that level is definitely useful as you get intelligent parallelization, task pipelines and caching. But it is just the tip of the iceberg of what Nx is actually capable of. Nx plugins provide much more, especially in terms of DX and developer productivity by taking away some of the burden of configuring your monorepo tooling. But many devs new to Nx found it harder to get started with them initially and incrementally migrating to Nx plugins wasn't as straightforward as we'd wanted it to be.

This is something that's gonna change drastically in 2024. And we've layed the first cornerstone for that. Nx 17.2 includes what we codename "Nx project config v3". But it is behind a feature flag still as we're streamlining the last bits. The goal?
- going almost configuration-less (good defaults, you customize when you need to)
- allowing easy drop-in of Nx plugins into existing workspaces (provides immediate productivity gains, but stays out of your way)


This opens up a series of possibilities which we're already super excited about. You'll hear more about this in the new year ;)

## Rust for Speed, Typescript for extensibility<a name="chapter-3"></a>

At Nx, we've heavily embraced Typescript from the beginning, and we've been very happy with that decision.

If you've been paying attention to previous release announcements though, you've probably noticed that we've been moving more and more of the computationally intensive and performance critical pieces of the core of Nx from Typescript to Rust.

That trend continues in Nx 17.2 with Nx [using Rust for its task hashing by default](https://github.com/nrwl/nx/pull/19617). There's no adjustments needed for this change, and Nx will continue to behave the same way, just faster!

{%twitter https://twitter.com/victorsavkin/status/1724464283227234420 %}


## Module Federation Updates<a name="chapter-4"></a>

Module Federation has been a particularly hot topic lately, and 17.2 is coming in with some great enhancements to Nx's already best-in-class support for Module Federation!

To start, we've greatly reduced the CPU and memory used for standing up your Module Federation "web" locally. These enhancements should be great news to larger workspaces using a Module Federation approach, where there were heavy CPU and memory costs to serving your entire federation locally.

We accomplished these improvements by batching any applications that are not being watched for changes (listed with the `--devRemotes` option) to a single server, rather than a unique server for each application. We also parallelized the builds of these static applications when you start up your serve! You can now use the `--parallel={number}` option to specify how many builds you want going at any given time.

In addition to performance improvements, we've brought the concept of dynamic federation to our React module federation support. Dynamic federation allows a host application to dynamically load remotes via the manifest file.

You can generate your react module federation workspace now to use dyanmic federation via the `--dynamic` flag:

```terminal
nx generate @nx/react:host acme --remotes=nx --dynamic
```

Or you can use the utility itself by importing from `@nx/react/mf`:

```typescript
import { loadRemoteModule } from '@nx/react/mf';
```

Lastly, we have an [example repo](https://github.com/jaysoo/nx-react-vite-module-federation) available now to illustrate how to create a plugin for Module Federation using Nx with Vite! This is something that we are monitoring and may provide an out-of-the-box solution to this in a future release!

## Nx Release Updates<a name="chapter-5"></a>

Nx 17 launched with the new `nx release` capability in the Nx CLI. Since then we've been streamlining the experience, accounting for various edge cases and release scenarios. (extensive docs are being worked on rn ;)


To give you full flexibility, in 17.2, we've added a programmatic API, which will allow you to easily write custom release scripts:

```typescript
import {
  releaseChangelog,
  releasePublish,
  releaseVersion,
} from 'nx/release';

(async () => {
  const { workspaceVersion, projectsVersionData } = await releaseVersion({
    specifier: 'minor'
  });
  await releaseChangelog({
    versionData: projectsVersionData,
    version: workspaceVersion,
  });
  await releasePublish();
    
  process.exit(0);
})();
```

This script above demonstrates how you can use this API to create your own script for updating your workspace's version, then creating a changelog, and then publishing your package!

We've also added first class support for independently released projects, meaning you can now target a specific project for release with the `--projects` command. For example, you can create a new version for just one project in your workspace with the command:

```terminal
nx release version patch --project=my-project
```

## Angular 17 (AND NgRx 17) Support<a name="chapter-6"></a>

![Angular new](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y9jklw76upfhu8eef5q8.png)

[Angular](https://angular.dev/) is in the middle of [a HUGE renaissance](https://blog.angular.io/introducing-angular-v17-4d7033312e4b), between their new logo, new docs site, and introduction of some awesome features like Signals.

Nx is here to support the transition! Nx has always been a great fit for Angular, and now supports Angular 17 as well as NgRx 17.

To automatically migrate existing workspaces to Angular v17, run the commands:

```terminal
> nx migrate latest
> nx migrate --run-migrations
```

You can also use the `--interactive` flag if you want to migrate your workspace to the latest version of Nx while staying on your current version of Angular:

```terminal
> nx migrate latest --interactive
✔ Do you want to update to TypeScript v5.2? (Y/n) · true
✔ Do you want to update the Angular version to v17? (Y/n) · false

 >  NX   The migrate command has run successfully.

   - package.json has been updated.
   - migrations.json has been generated.

 >  NX   Next steps:

   - Run 'nx migrate --run-migrations'
```

## Smart Monorepos - Fast CI<a name="chapter-7"></a>

We just gave our [Nx homepage](https://nx.dev) a small facelift, including a new tagline, subtagline and illustration to better reflect Nx's mission statement.

![New HomePage!](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cxsdzq77zhjj4skrme2v.png)

When you enter the monorepo space, having good local development experience and tooling to support you is one thing, scaling is the other. And scaling comes with multiple challenges, from scaling teams working on the monorepo to maintaining high throughput on CI.

The latter is a common headache and we've seen companies struggle. With Nx we're moving into the direction of becoming your e2e solution for monorepos, where we don't just cover your local dev experience, but also provide robust and scalable solutions on CI.

![Effortless, Fast CI](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/snk6hlu5btscrx4052hz.png)

We're super excited to have launched "Nx Agents" to Early Access. If you haven't seen Victor's video yet about how he reduced e2e tests from 90 minutes to 10, then make sure [to check it out](https://nx.dev/ci/features/nx-agents).

**"Nx Agents"** are the next iteration of DTE, providing a more flexible, cost effective and more performant approach to distribution on CI. This includes things like being able to dynamically allocate machines based on the size of the PR and flaky task detection and re-running. Also, it can be configured with a single line:

```yaml
- name: Start CI run
  run: 'npx nx-cloud start-ci-run --distributes-on="8 linux-medium-js"'
  ...
```

You can run Nx Agents on any CI provider. If you're curious, [sign up for early access](https://go.nx.dev/nx-agents-ea)!

## New Canary Releases<a name="chapter-8"></a>

We've added a new npm release tag: canary!

![New NPM Release Tag: Canary](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tep342gapxheetlbye5m.png)

This canary release is created via a [cron job](https://github.com/nrwl/nx/blob/master/.github/workflows/publish.yml#L5C61-L5C61) that will regularly publish the current contents of the master branch of Nx.

You can give the canary version a try new for a new workspace using the command:

```terminal!
> npx create-nx-workspace@canary
```

This should be useful for previewing new not-yet released features!

## Upcoming Release Livestream<a name="chapter-9"></a>

{%youtube OXXTUjSO1hs %}

We're going live in January with the Nx team to go over these updates as well! Be sure to click the link to get notified when we go live! And feel free to come with your questions in the chat!

## Automatically Update Nx<a name="chapter-10"></a>

Updating Nx and its plugins is easy as we ship an [automated migration command](https://nx.dev/core-features/automate-updating-dependencies).

```
npx nx migrate latest
```

After updating your dependencies, run any necessary migrations.

```
npx nx migrate --run-migrations
```

## Wrapping up<a name="chapter-11"></a>

That’s all for now folks! We’re just starting up a new iteration of development on Nx, so be sure to subscribe to our [YouTube channel](https://www.youtube.com/@nxdevtools) to get updates when new features land! Until next time, KEEP WORKING HARD!

### Learn more
- 🧠 [Nx Docs](https://nx.dev)
- 👩‍💻 [Nx GitHub](https://github.com/nrwl/nx)
- 💬 [Nx Official Discord Server](https://go.nx.dev/community)
- 📹 [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- 🚀 [Speed up your CI](https://nx.app)

### More Nx Release Notes:

- [Nx 17](https://blog.nrwl.io/nx-17-0-has-landed-1dad19176ff3)
- [Nx 16.8](https://blog.nrwl.io/nx-16-8-release-e38e3bb503b5)
- [Nx 16.5](https://blog.nrwl.io/nx-16-5-release-7887a27cb5)
- [Nx 16.0](https://blog.nrwl.io/nx-16-is-here-69584ec87053)
- [Nx 15.8](https://blog.nrwl.io/nx-15-8-rust-hasher-nx-console-for-intellij-deno-node-and-storybook-aa2b8585772e)
- [Nx 15.7](https://blog.nrwl.io/nx-15-7-node-support-angular-lts-lockfile-pruning-46f067090711)
- [Nx 15.4](https://blog.nrwl.io/nx-15-4-vite-4-support-a-new-nx-watch-command-and-more-77cbf6c9a711)
- [Nx 15.3](https://blog.nrwl.io/nx-15-3-standalone-projects-vite-task-graph-and-more-3ed23f7827ed)