The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.
nx
Package reference
Here is a list of all the executors, generators and migrations available from this package.
Guides
Executors
An executor that does nothing
Run any custom commands with Nx.
Run an NPM script using Nx.
Generators
Connect a workspace to Nx Cloud
Migrations
21.0.x
20.0.x
19.2.x
release-version-config-changes
Updates release version config based on the breaking changes in Nx v21
Nx Release Version Config Changes
In Nx v21, the implementation details of versioning were rewritten to massively enhance flexibility and lay the groundwork for future features.
As part of this, some elements of the release configuration were updated. During the lifecycle of Nx v21, you can still opt into the old versioning by setting release.version.useLegacyVersioning
to true
, in which case the release configuration should remain unchanged.
In Nx v22, the legacy versioning implementation will be removed entirely and the configuration will have to be updated to match what this migration does for you.
Sample Code Changes
"generatorOptions" is longer exists and most non-ecosystem specific options have moved to the top level of "version" and are therefore fully documented on the JSON schema as a core option.
"packageRoot: string" has been replaced by the more flexible concept of "manifestRootsToUpdate: string[]", allowing for multiple manifest files (such as package.json
in the JS/TS ecosystem) to be updated in a single versioning run.
Ecosystem specific options, such as "skipLockFileUpdate", which is specific to the JS/TS ecosystem, are available via the new "versionActionsOptions" object, which is so named because of the new VersionActions
abstraction introduced in Nx v21, which allows for different ecosystems and use-cases to be supported via very minimal implementation effort.
"preserveLocalDependencyProtocols" changed from false
by default to true
by default in Nx v21, so it can simply be removed from the configuration when set to true.
The migration will also update release groups version configuration, as well as project.json and package.json version configuration, if applicable.
1{
2 "release": {
3 "version": {
4 "generatorOptions": {
5 "packageRoot": "build/packages/{projectName}",
6 "currentVersionResolver": "registry",
7 "skipLockFileUpdate": true,
8 "preserveLocalDependencyProtocols": true
9 }
10 }
11 }
12}
13
use-legacy-cache
Set `useLegacyCache` to true for migrating workspaces
Use Legacy Cache
Set useLegacyCache
to true for migrating workspaces
Sample Code Changes
Add useLegacyCache
to nx.json
unless enableDbCache
was set to true.
1{
2 "targetDefaults": {}
3}
4
move-use-daemon-process
Migration for v20.0.0-beta.7
Move useDaemonProcess
Move the useDaemonProcess
to the root of nx.json
Sample Code Changes
1{
2 "tasksRunnerOptions": {
3 "default": {
4 "options": {
5 "useDaemonProcess": false
6 }
7 }
8 }
9}
10
19-2-4-set-project-name
Set project name in nx.json explicitly
19-2-2-update-nx-wrapper
Updates the nx wrapper.
19-2-0-move-graph-cache-directory
Updates the default workspace data directory to .nx/workspace-data