This PR removes the `/nx-api` pages from `nx-dev`. They are already redirected from `/nx-api` to either `/technologies` or `/reference/core-api` URLs. e.g. `/nx-api/nx` goes to `/reference/core-api/nx` and `/nx-api/react` goes to `/technologies/react/api` **Changes**: - Remove old `nx-api.json` from being generated in `scripts/documentation/generators/generate-manifests.ts` -- this was used to generate the sitemap - Remove `pages/nx-api` from Next.js app since we don't need them - Remove workaround from link checker `scripts/documentation/internal-link-checker.ts` -- the angular rspack/rsbuild and other workarounds are gone now that they are proper docs in `map.json` - Update Powerpack/Remote Cache reference docs to exclude API documents (since they are duplicated in the Intro page) -- `nx-dev/models-document/src/lib/mappings.ts` - All content in `docs` have been updated with new URL structure **Note:** Redirects are already handled, and Claude Code was used to verify the updated `docs/` URLs (see report below). The twelve 404s links were updated by hand. ## Verification Report https://gist.github.com/jaysoo/c7863fe7e091cb77929d1976165c357a
3.7 KiB
| title | description |
|---|---|
| Define Code Ownership at the Project Level | Learn how to use Nx Powerpack owners plugin to manage code ownership at the project level and automatically generate CODEOWNERS files for GitHub, Bitbucket, or GitLab. |
Define Code Ownership at the Project Level
{% youtube src="https://youtu.be/mor6urvw-L0" title="Nx Powerpack Codeowners" /%}
This plugin provides Nx Powerpack users the ability to configure and maintain code owners for projects in an Nx workspace. Powerpack is available for Nx version 19.8 and higher.
The atomic unit of code in an Nx workspace is a project. Tasks, module boundaries and the Nx graph all train us to conceptualize the workspace as a collection of projects. The CODEOWNERS file, however, requires you to switch from a project mental model to a more low-level definition based on the folder structure of your workspace. The @nx/owners plugin enables you to stay in the mental model that your workspace is a collection of projects as you define the ownership rules for your workspace. Nx will take care of compiling the project ownership rules into file-based ownership rules that GitHub, Bitbucket or GitLab can understand in the CODEOWNERS file.
Setup
The @nx/owners plugin requires an Nx Powerpack license to function. Activating Powerpack is a simple process.
{% call-to-action title="Get a License and Activate Powerpack" icon="nx" description="Unlock all the features of the Nx CLI" url="/nx-enterprise/activate-powerpack" /%}
Then, add the Owners plugin to your workspace.
{% link-card title="Owners" type="Nx Plugin" url="/reference/core-api/owners/overview" icon="UserGroupIcon" /%}
Project or File-based Configuration
The ownership configuration is defined in the nx.json file or in individual project configuration files. Nx then uses a sync generator to automatically compile those settings into a valid CODEOWNERS file for GitHub, Bitbucket or GitLab. See the plugin documentation for more details.
{% cards smCols="2" mdCols="2" lgCols="2" %}
Define Project Owners
Nx Generates the CODEOWNERS file
{
"owners": {
"format": "github",
"patterns": [
{
"description": "Joe's Rust projects",
"projects": ["tag:rust"],
"owners": ["@joelovesrust"]
},
{
"description": "Finance projects",
"projects": ["finance-*"],
"owners": ["@finance-team"]
},
{
"description": "Alphabet soup",
"projects": ["admin", "books", "cart"],
"owners": ["@alice", "@bob", "@cecil"]
},
{
"description": "CI Workflows",
"files": [".github/workflows/**/*"],
"owners": ["@devops"]
}
]
}
}
# Joe's Rust projects
/packages/rust-api @joelovesrust
/packages/experimental-rust @joelovesrust
# Finance projects
/packages/finance-ui @finance-team
/packages/finance-data @finance-team
# Alphabet soup
/packages/admin @alice @bob @cecil
/packages/books @alice @bob @cecil
/packages/cart @alice @bob @cecil
# CI Workflows
.github/workflows/**/* @devops
/packages/my-project/ @ahmed @petra
/packages/my-project/package.json @ahmed
{
"owners": {
"**/*": ["@ahmed", "@petra"],
"package.json": ["@ahmed"]
},
};
{% /cards %}