10 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
MaxKless
1029ecb9fd
fix(graph): make migrate ui future migration circles cleaner (#30898)
we put a lot of focus on making the migrate ui clean and easy to parse. 
The repeated icons were more distracting than valuable so let's remove
them.
2025-05-01 16:19:43 -04:00
Jack Hsu
dcef5c7cf2
feat(graph): show next steps for successful migrations (#30934)
This PR updates Migration UI to display "next steps" when they are
provided by a migration. This works by writing `nextSteps` into the Nx
Console meta in `migrations.json`.

If the `nextSteps` is missing or it's empty, then nothing will be shown.

<img width="1555" alt="Screenshot 2025-04-29 at 5 16 49 PM"
src="https://github.com/user-attachments/assets/88491632-9b33-421a-887a-b6fbb5676098"
/>

See: https://www.loom.com/share/c0a4a7dce9df46b5b023fce5e0a3bd2f
2025-04-30 08:16:30 -04:00
Jack Hsu
6451f66492
Revert "feat(graph): show next steps for successful migrations" (#30933)
This reverts commit 307c45542a10b6e273d090a768175739690f2663.

<!-- 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 #
2025-04-29 17:09:19 -04:00
Jack Hsu
307c45542a feat(graph): show next steps for successful migrations 2025-04-29 16:29:52 -04:00
Jack Hsu
0dc4dbf499
feat(graph): add undo migration option when one is pending approval (#30878)
This PR adds a button for user to undo a migration that's already been
applied and pending approval.

See: https://www.loom.com/share/97286bdc80ea4538af76a914ef8f0f8b

Also, fixes an existing issue where `migrations.json` did not record the
correct git sha for each commit.


## Current Behavior
When a migration is pending approval, the only option is to accept it.

## Expected Behavior
Allow user to undo a migration if they don't want the changes.

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

Fixes #
2025-04-25 16:20:17 -04:00
Jack Hsu
8397a95a7e
fix(graph): disable primary CTA for Migrate UI when approval is required first (#30836)
This PR updates the Migrate UI such that the primary CTA always performs
an action. Previously, when there is a migration to approve, the primary
CTA says `Run Migrations`, but clicking it does nothing since we're
already in the middle of running migrations.

<img width="1093" alt="Screenshot 2025-04-23 at 9 36 05 AM"
src="https://github.com/user-attachments/assets/4d55e3d0-d16b-4c4b-9b16-551690be60ab"
/>

Now, with this PR, the primary CTA will be disabled and tell the user to
approve the current migration before continuing.

## Current Behavior
Primary CTA in Migrate UI does nothing when there is a migration to
approve

## Expected Behavior
Primary CTA should reflect the current action that the user must take,
in this case to approve the migration

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

Fixes #

---------

Co-authored-by: Nicholas Cunningham <ndcunningham@gmail.com>
2025-04-24 17:31:13 -04:00
Jack Hsu
26489d1f50
fix(graph): ensure deps from graph-client->migrate-ui exists so taliwind styles are compiled correctly (#30762)
This PR removes the `// nx-ignore-next-line` from graph client to the
migrate lib import. Without the dep being there, the tailwind styles
will not include classes used by migrate UI.


<!-- 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
Styles are broken for migrate UI

## Expected Behavior
Styles should work

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

Fixes #
2025-04-17 10:27:40 -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
Nicholas Cunningham
a911318017
feat(graph): Create Migrate UI (#30734)
This PR introduces a new UI in Nx Console designed to assist users with
managing migrations more effectively.

Each migration is now presented with its status and actions, allowing
users to interact directly.
If any issues arise, users can address them in isolation without
disrupting the overall flow. The migrate ui provides a clear overview of
the migration state, helping users track progress and understand what
actions are required at each step.
2025-04-16 12:40:37 -04:00