nx/docs/generated/devkit/ProjectConfiguration.md
James Henry ee097a8e10
feat(release)!: useLegacyVersioning is false by default, migrate config (#30838)
This PR updates `nx release` to use the revamped versioning
implementation by default. It also updates and adds relevant
documentation, and provides an automated migration for the new
configuration structure.

For anyone exclusively versioning TS/JS packages, there should be no
real difference to your experience (although a number of bugs have been
fixed and new features around updating multiple `package.json` files at
once are now available to you with this change).

For the lifecycle of Nx v21, `release.version.useLegacyVersioning` will
remain as a option that can be set to `true` to revert to the old
behavior and configuration structure.

NOTE: This should only be a temporary solution, for example if one of
the plugins you use does provide a `VersionActions` based versioning
implementation yet. The option and legacy implementation will be removed
entirely in Nx v22 (in ~6 months).

BREAKING CHANGE:

**⚠️ For any early adopters of `VersionActions` in Nx 20.8 when it was
opt-in, there are breaking changes to the abstract class here as well.**

`manifestRootsToUpdate` has gone from `string[]` to `manifestsToUpdate:
{ manifestPath: string; preserveLocalDependencyProtocols: boolean; }[]`
to support controlling the local dependency updates per manifest in
order to support advanced source vs dist scenarios, and correspondingly
`isLocalDependencyProtocol` has been removed from the abstract class and
the method will no longer be called from the core logic. It should be
thought of as an implementation detail of `updateProjectDependencies`
instead.
2025-04-24 22:09:38 -04:00

140 lines
3.7 KiB
Markdown

# Interface: ProjectConfiguration
Project configuration
## Table of contents
### Properties
- [generators](../../devkit/documents/ProjectConfiguration#generators): Object
- [implicitDependencies](../../devkit/documents/ProjectConfiguration#implicitdependencies): string[]
- [metadata](../../devkit/documents/ProjectConfiguration#metadata): ProjectMetadata
- [name](../../devkit/documents/ProjectConfiguration#name): string
- [namedInputs](../../devkit/documents/ProjectConfiguration#namedinputs): Object
- [projectType](../../devkit/documents/ProjectConfiguration#projecttype): ProjectType
- [release](../../devkit/documents/ProjectConfiguration#release): Object
- [root](../../devkit/documents/ProjectConfiguration#root): string
- [sourceRoot](../../devkit/documents/ProjectConfiguration#sourceroot): string
- [tags](../../devkit/documents/ProjectConfiguration#tags): string[]
- [targets](../../devkit/documents/ProjectConfiguration#targets): Object
## Properties
### generators
`Optional` **generators**: `Object`
List of default values used by generators.
These defaults are project specific.
Example:
```
{
"@nx/react": {
"library": {
"style": "scss"
}
}
}
```
#### Index signature
▪ [collectionName: `string`]: \{ `[generatorName: string]`: `any`; }
---
### implicitDependencies
`Optional` **implicitDependencies**: `string`[]
List of projects which are added as a dependency
---
### metadata
`Optional` **metadata**: `ProjectMetadata`
Metadata about the project
---
### name
`Optional` **name**: `string`
Project's name. Optional if specified in workspace.json
---
### namedInputs
`Optional` **namedInputs**: `Object`
Named inputs targets can refer to reduce duplication
#### Index signature
▪ [inputName: `string`]: (`string` \| `InputDefinition`)[]
---
### projectType
`Optional` **projectType**: [`ProjectType`](../../devkit/documents/ProjectType)
Project type
---
### release
`Optional` **release**: `Object`
Project specific configuration for `nx release`
#### Type declaration
| Name | Type |
| :--------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `version?` | `Pick`\<`LegacyNxReleaseVersionConfiguration`, `"generator"` \| `"generatorOptions"`\> \| `Pick`\<`NxReleaseVersionConfiguration`, `"versionActions"` \| `"versionActionsOptions"` \| `"manifestRootsToUpdate"` \| `"currentVersionResolver"` \| `"currentVersionResolverMetadata"` \| `"fallbackCurrentVersionResolver"` \| `"versionPrefix"` \| `"preserveLocalDependencyProtocols"`\> |
---
### root
**root**: `string`
Project's location relative to the root of the workspace
---
### sourceRoot
`Optional` **sourceRoot**: `string`
The location of project's sources relative to the root of the workspace
---
### tags
`Optional` **tags**: `string`[]
List of tags used by enforce-module-boundaries / project graph
---
### targets
`Optional` **targets**: `Object`
Project's targets
#### Index signature
▪ [targetName: `string`]: [`TargetConfiguration`](../../devkit/documents/TargetConfiguration)