nx/docs/generated/devkit/ProjectGraphProjectNode.md
Leosvel Pérez Espinosa b3c6d2d417
fix(core): resolve subpath patterns in package exports correctly when constructing graph (#30511)
## Current Behavior

When a package has a subpath pattern like the following:

```json
{
  "exports": {
    "./*": {
      "types": "./dist/lib/*/index.d.ts",
      "import": "./dist/lib/*/index.js",
      "default": "./dist/lib/*/index.js"
    }
  }
}
```

When constructing the graph the project is not picked as a dependency of
others projects that import from the package using a path that matches
that subpath pattern. This is currently happening because the current
resolution is wrongly using `minimatch` to match those patterns instead
of the [Node.js spec for resolving subpath
patterns](https://nodejs.org/docs/latest-v22.x/api/esm.html#resolution-algorithm-specification).

## Expected Behavior

Subpath patterns should be processed after the [Node.js
spec](https://nodejs.org/docs/latest-v22.x/api/esm.html#resolution-algorithm-specification)
and the graph should pick up dependencies when used.

## Related Issue(s)

Fixes #30342
2025-04-02 10:29:47 +02:00

32 lines
646 B
Markdown

# Interface: ProjectGraphProjectNode
A node describing a project in a workspace
## Table of contents
### Properties
- [data](../../devkit/documents/ProjectGraphProjectNode#data): ProjectConfiguration & Object
- [name](../../devkit/documents/ProjectGraphProjectNode#name): string
- [type](../../devkit/documents/ProjectGraphProjectNode#type): "lib" | "app" | "e2e"
## Properties
### data
**data**: [`ProjectConfiguration`](../../devkit/documents/ProjectConfiguration) & \{ `description?`: `string` }
Additional metadata about a project
---
### name
**name**: `string`
---
### type
**type**: `"lib"` \| `"app"` \| `"e2e"`