11 Commits

Author SHA1 Message Date
Colum Ferry
e73a1411a0
feat(storybook)!: support storybook 9 (#31172)
## Current Behavior
We currently do not have support for Storybook 9, nor any migrations to
help users switch to it.


## Expected Behavior
Support Storybook 9 and add a migration for users to switch to v9

BREAKING CHANGE: Remove deprecated generators:
`@nx/storybook:cypress-project`,
`@nx/react-native:storybook-configuration`, `@nx/react-native:stories`,
`@nx/react-native:component-story`
2025-06-06 12:51:47 -04:00
Jack Hsu
5c30d1b95a
chore(repo): remove vite paths plugin from our own Storybook files (#30756)
This PR fixes an issue that blocks FreeBSD release for some reason.

When we use the `@nx/vite/plugins/nx-tsconfig-paths.plugin` plugin and
both `CI=1` and `NX_PREFER_TS_NODE=true` are set, then the graph fails
to compute. For example, running this will error out:

```shell
CI=1 NX_DAEMON=false NX_CACHE_PROJECT_GRAPH=false NX_PREFER_TS_NODE=true nx report
```

The error is like this:

```shell
⚠️ Unable to construct project graph.
Failed to process project graph.
     - graph/migrate/.storybook/main.ts: TypeError: Cannot set property level of [object Object] which has only a getter
      at Object.<anonymous> (/Users/jack/projects/nx/packages/nx/src/utils/output.ts:38:23)
      at Module._compile (node:internal/modules/cjs/loader:1554:14)
      at Module.m._compile (/Users/jack/projects/nx/node_modules/.pnpm/ts-node@10.9.1_@swc+core@1.5.7_@swc+helpers@0.5.11__@types+node@20.16.10_typescript@5.7.3/node_modules/ts-node/src/index.ts:1618:23)
      at node:internal/modules/cjs/loader:1706:10
      at Object.require.extensions.<computed> [as .ts] (/Users/jack/projects/nx/node_modules/.pnpm/ts-node@10.9.1_@swc+core@1.5.7_@swc+helpers@0.5.11__@types+node@20.16.10_typescript@5.7.3/node_modules/ts-node/src/index.ts:1621:12)
      at Module.load (node:internal/modules/cjs/loader:1289:32)
      at Function._load (node:internal/modules/cjs/loader:1108:12)
      at TracingChannel.traceSync (node:diagnostics_channel:322:14)
      at wrapModuleLoad (node:internal/modules/cjs/loader:220:24)
      at Module.require (node:internal/modules/cjs/loader:1311:12)
   - graph/ui-code-block/.storybook/main.ts: TypeError: Cannot set property level of [object Object] which has only a getter
      at Object.<anonymous> (/Users/jack/projects/nx/packages/nx/src/utils/output.ts:38:23)
      at Module._compile (node:internal/modules/cjs/loader:1554:14)
      at Module.m._compile (/Users/jack/projects/nx/node_modules/.pnpm/ts-node@10.9.1_@swc+core@1.5.7_@swc+helpers@0.5.11__@types+node@20.16.10_typescript@5.7.3/node_modules/ts-node/src/index.ts:1618:23)
      at node:internal/modules/cjs/loader:1706:10
      at Object.require.extensions.<computed> [as .ts] (/Users/jack/projects/nx/node_modules/.pnpm/ts-node@10.9.1_@swc+core@1.5.7_@swc+helpers@0.5.11__@types+node@20.16.10_typescript@5.7.3/node_modules/ts-node/src/index.ts:1621:12)
      at Module.load (node:internal/modules/cjs/loader:1289:32)
      at Function._load (node:internal/modules/cjs/loader:1108:12)
      at TracingChannel.traceSync (node:diagnostics_channel:322:14)
      at wrapModuleLoad (node:internal/modules/cjs/loader:220:24)
      at Module.require (node:internal/modules/cjs/loader:1311:12)
   - graph/ui-project-details/.storybook/main.ts: TypeError: Cannot set property level of [object Object] which has only a getter
      at Object.<anonymous> (/Users/jack/projects/nx/packages/nx/src/utils/output.ts:38:23)
      at Module._compile (node:internal/modules/cjs/loader:1554:14)
      at Module.m._compile (/Users/jack/projects/nx/node_modules/.pnpm/ts-node@10.9.1_@swc+core@1.5.7_@swc+helpers@0.5.11__@types+node@20.16.10_typescript@5.7.3/node_modules/ts-node/src/index.ts:1618:23)
      at node:internal/modules/cjs/loader:1706:10
      at Object.require.extensions.<computed> [as .ts] (/Users/jack/projects/nx/node_modules/.pnpm/ts-node@10.9.1_@swc+core@1.5.7_@swc+helpers@0.5.11__@types+node@20.16.10_typescript@5.7.3/node_modules/ts-node/src/index.ts:1621:12)
      at Module.load (node:internal/modules/cjs/loader:1289:32)
      at Function._load (node:internal/modules/cjs/loader:1108:12)
      at TracingChannel.traceSync (node:diagnostics_channel:322:14)
      at wrapModuleLoad (node:internal/modules/cjs/loader:220:24)
      at Module.require (node:internal/modules/cjs/loader:1311:12)
```

This is an issue for us only because we are pointing
`@nx/vite/plugins/nx-tsconfig-paths.plugin` to source. Normally, this
would already be in JS, and not need to go through `ts-node` or SWC.

I'm unsure what the exact cause is. There was nothing obvious in how we
register `ts-node`, and nothing in `ts-node` to suggest different
behavior with `CI=1`.

## Current Behavior
FreeBSD release is blocked

See: https://github.com/nrwl/nx/actions/runs/14500499978/job/40678818950

## Expected Behavior
FreeBSD release works

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2025-04-17 09:08:45 -04:00
Chau Tran
1c2d0860b5
feat(graph): update graph lib to latest nx graph (#29768) 2025-02-13 06:58:03 -06:00
Colum Ferry
11f30dbd00
feat(storybook): add storybook 8 support (#27214)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #27175 #26914 #22941 #26531
2024-08-14 16:37:20 +01:00
Emily Xiong
311710e56c
feat(graph): add copy button for entire target configuration (#26284)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
<img width="540" alt="Screenshot 2024-07-03 at 5 29 12 PM"
src="https://github.com/nrwl/nx/assets/16211801/bed98c56-3bd5-4170-893b-cefe5fe292f9">

<img width="1195" alt="Screenshot 2024-07-03 at 5 29 03 PM"
src="https://github.com/nrwl/nx/assets/16211801/544a4c4e-299f-40fc-a767-215d9c758dd8">



## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2024-07-04 10:16:13 -04:00
Emily Xiong
e9b7439ce2
feat(graph): add description and tags to details page (#26252)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
<img width="1155" alt="Screenshot 2024-05-29 at 5 47 20 PM"
src="https://github.com/nrwl/nx/assets/16211801/025f08d5-52cf-4087-94a5-e3319c89f8b1">
<img width="1127" alt="Screenshot 2024-05-29 at 5 47 04 PM"
src="https://github.com/nrwl/nx/assets/16211801/ff19514d-2513-4b13-ac9c-4b124ac0ce4a">
<img width="387" alt="Screenshot 2024-06-04 at 11 56 54 PM"
src="https://github.com/nrwl/nx/assets/16211801/ea2f0c47-a444-4be8-9ccd-60fd2b534e12">



## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2024-06-14 14:27:14 -04:00
Jason Jean
a7dc8f6d7f
chore(repo): fix file formatting (#26463)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
<!-- This is the behavior we have today -->

Files are unformatted.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

Files are formatted.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2024-06-07 16:10:22 -04:00
Jack Hsu
bc43243498
chore(repo): add eslint and jest plugins to use inferred targets (#22946) 2024-04-23 21:52:13 -04:00
MaxKless
12d7caa099
cleanup(graph): misc project details view enhancements (#21311) 2024-01-26 16:00:58 +00:00
Katerina Skroumpelou
66929530b1
feat(graph): hover to see source & more UI updates (#21182)
Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-01-18 17:34:54 -05:00
Jack Hsu
8ccf327b1a
feat(graph): decouple graph client from nx.dev <Fence> component (#21186) 2024-01-17 21:00:36 -05:00