-
feat(devkit): bump compatibility to Nx 19 - 21.x (#28243)
发布于
2024-10-15 16:40:12 +00:00 BREAKING CHANGE
@nx/devkitsupports Nx 17 - 20.- Node 18 - 22 is supported
ExecutorContext.projectGraph,ExecutorContext.nxJsonConfiguration,
andExecutorContext.projectsConfigurationsis marked as optional
becauseExecutorContextin some versions of Nx did not have them.ExecutorContext.workspaceis marked as optional because
ExecutorContextin some versions of Nx did not have the above
properties which contain the same information.ProjectGraphNodeis deprecated.NxPluginV1.processProjectGraphwas deprecated long ago and there has
been a warning since.appRootPathhas been deprecated for a long time.parseTargetStringhad a variant that did not take either the project
graph or the executor context.readNxJsonhas a variant which does not take a tree. This was not
clearly deprecated.- There are handlers to require from
@nx/instead of@nrwl - Nx tries to get a root install from
@nrwl/cli
@nx/devkitsupports Nx 19 - 21.- Node 20 - 22 is supported
ExecutorContext.projectGraph,ExecutorContext.nxJsonConfiguration,
andExecutorContext.projectsConfigurationsis marked as required
becauseExecutorContextin Nx 19+ is guaranteed to have them.ExecutorContext.workspaceis removed because the same information is
available in the above propertiesProjectGraphNodeis removed.NxPluginV1is no more. All plugins should beNxPluginV2.workspaceRootis the replacement forappRootPath.appRootPathis
removed.parseTargetStringno longer has a variant that did not take either
the project graph or the executor context.readNxJsonstill has a variant which does not take a tree but it's
clearly deprecated to be removed in Nx 21.@nrwlpackages are no more so we don't have to redirect requires
anymore.@nrwl/cliis no more so Nx shouldn't try to get a root install there
Fixes #
下载附件