Skip to content

Commit

Permalink
feat(storybook): fixing tests and keeping all that is needed
Browse files Browse the repository at this point in the history
  • Loading branch information
mandarini committed Mar 28, 2022
1 parent 9debce1 commit 01ebb9d
Show file tree
Hide file tree
Showing 29 changed files with 58 additions and 414 deletions.
20 changes: 0 additions & 20 deletions docs/generated/packages/react.json
Original file line number Diff line number Diff line change
Expand Up @@ -634,26 +634,6 @@
"aliases": [],
"path": "/packages/react/src/generators/storybook-configuration/schema.json"
},
{
"name": "storybook-migrate-defaults-5-to-6",
"factory": "./src/generators/storybook-migrate-defaults-5-to-6/migrate-defaults-5-to-6#storybookMigration5to6Generator",
"schema": {
"$schema": "http://json-schema.org/schema",
"cli": "nx",
"$id": "storybook-migrate-defaults-5-to-6",
"title": "Storybook migrate defaults 5 to 6",
"description": "Generate default Storybook configuration files using Storybook version `>=6.x` specs, for projects that already have Storybook instances and configurations of versions `<6.x`.",
"type": "object",
"properties": {},
"required": [],
"presets": []
},
"description": "Generate default Storybook configuration files using Storybook version `>=6.x` specs, for projects that already have Storybook instances and configurations of versions `<6.x`.",
"hidden": false,
"implementation": "/packages/react/src/generators/storybook-migrate-defaults-5-to-6/migrate-defaults-5-to-6#storybookMigration5to6Generator.ts",
"aliases": [],
"path": "/packages/react/src/generators/storybook-migrate-defaults-5-to-6/schema.json"
},
{
"name": "component-story",
"factory": "./src/generators/component-story/component-story#componentStoryGenerator",
Expand Down
1 change: 0 additions & 1 deletion docs/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@
"component",
"redux",
"storybook-configuration",
"storybook-migrate-defaults-5-to-6",
"component-story",
"stories",
"component-cypress-spec",
Expand Down
2 changes: 2 additions & 0 deletions docs/shared/guides/storybook/storybook-v6-angular.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Upgrading to Storybook 6 (and Nx versions >10.1.x)

_Disclaimer: From Nx 14.0.0 and on, Nx does not support Storybook v.5. If your workspace is on a version of Nx older than Nx 14, then you will be able to use the generators described in this guide. If you're using Nx >14, then you will already have been automatically migrated to Storybook 6._

Nx now comes with [Storybook version 6](https://storybook.js.org/releases/6.0). Chances are, if you used Nx version `10.1.x` or older with Storybook, you are using [Storybook version 5.3](https://storybook.js.org/releases/5.3) with configuration files of [Storybook version 5.2](https://storybook.js.org/releases/5.2).

Nx version `10.2.x` will continue to support Storybook version `5.2.x`, however newer versions of Nx will only support Storybook version `6` (and on).
Expand Down
4 changes: 3 additions & 1 deletion docs/shared/guides/storybook/storybook-v6-react.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Upgrading to Storybook 6 (and Nx versions >10.1.x)
# Upgrading to Storybook 6 (and Nx versions >10.1.x and <14.0.0>)

_Disclaimer: From Nx 14.0.0 and on, Nx does not support Storybook v.5. If your workspace is on a version of Nx older than Nx 14, then you will be able to use the generators described in this guide. If you're using Nx >14, then you will already have been automatically migrated to Storybook 6._

Nx now comes with [Storybook version 6](https://storybook.js.org/releases/6.0). Chances are, if you used Nx version `10.1.x` or older with Storybook, you are using [Storybook version 5.3](https://storybook.js.org/releases/5.3) with configuration files of [Storybook version 5.2](https://storybook.js.org/releases/5.2).

Expand Down
6 changes: 0 additions & 6 deletions nx-dev/nx-dev/redirect-rules.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ const schemaUrls = {
'/angular/stories': '/packages/angular/generators/stories',
'/angular/storybook-configuration':
'/packages/angular/generators/storybook-configuration',
'/angular/storybook-migrate-defaults-5-to-6':
'/packages/angular/generators/storybook-migrate-defaults-5-to-6',
'/angular/storybook-migrate-stories-to-6-2':
'/packages/angular/generators/storybook-migrate-stories-to-6-2',
'/angular/upgrade-module': '/packages/angular/generators/upgrade-module',
'/angular/web-worker': '/packages/angular/generators/web-worker',
'/angular/delegate-build': '/packages/angular/executors/delegate-build',
Expand All @@ -66,8 +62,6 @@ const schemaUrls = {
'/react/stories': '/packages/react/generators/stories',
'/react/storybook-configuration':
'/packages/react/generators/storybook-configuration',
'/react/storybook-migrate-defaults-5-to-6':
'/packages/react/generators/storybook-migrate-defaults-5-to-6',
'/react/hook': '/packages/react/generators/hook',
'/jest/jest': '/packages/jest/executors/jest',
'/cypress/cypress': '/packages/cypress/executors/cypress',
Expand Down
2 changes: 0 additions & 2 deletions packages/angular/generators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ export * from './src/generators/ngrx/ngrx';
export * from './src/generators/setup-tailwind/setup-tailwind';
export * from './src/generators/stories/stories';
export * from './src/generators/storybook-configuration/storybook-configuration';
export * from './src/generators/storybook-migrate-defaults-5-to-6/storybook-migrate-defaults-5-to-6';
export * from './src/generators/storybook-migrate-stories-to-6-2/migrate-stories-to-6-2';
export * from './src/generators/upgrade-module/upgrade-module';
export * from './src/generators/setup-mfe/setup-mfe';
export * from './src/generators/mfe-host/mfe-host';
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions packages/react/generators.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,6 @@
"hidden": false
},

"storybook-migrate-defaults-5-to-6": {
"factory": "./src/generators/storybook-migrate-defaults-5-to-6/migrate-defaults-5-to-6#storybookMigration5to6Generator",
"schema": "./src/generators/storybook-migrate-defaults-5-to-6/schema.json",
"description": "Generate default Storybook configuration files using Storybook version `>=6.x` specs, for projects that already have Storybook instances and configurations of versions `<6.x`.",
"hidden": false
},

"component-story": {
"factory": "./src/generators/component-story/component-story#componentStoryGenerator",
"schema": "./src/generators/component-story/schema.json",
Expand Down
1 change: 0 additions & 1 deletion packages/react/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ export { reactInitGenerator } from './src/generators/init/init';
export { reduxGenerator } from './src/generators/redux/redux';
export { storiesGenerator } from './src/generators/stories/stories';
export { storybookConfigurationGenerator } from './src/generators/storybook-configuration/configuration';
export { storybookMigration5to6Generator } from './src/generators/storybook-migrate-defaults-5-to-6/migrate-defaults-5-to-6';
export type { SupportedStyles } from './typings/style';

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 1 addition & 5 deletions packages/storybook/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@
},
{
"files": ["**/*.ts"],
"excludedFiles": [
"./src/migrations/**",
"./src/generators/migrate-defaults-5-to-6/*.spec.ts",
"./src/utils/testing.ts"
],
"excludedFiles": ["./src/migrations/**", "./src/utils/testing.ts"],
"rules": {
"no-restricted-imports": [
"error",
Expand Down
2 changes: 0 additions & 2 deletions packages/storybook/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export { configurationGenerator } from './src/generators/configuration/configuration';
export { cypressProjectGenerator } from './src/generators/cypress-project/cypress-project';
export { migrateDefaultsGenerator } from './src/generators/migrate-defaults-5-to-6/migrate-defaults-5-to-6';
export { migrateStoriesTo62Generator } from './src/generators/migrate-stories-to-6-2/migrate-stories-to-6-2';
export { storybookVersion } from './src/utils/versions';
Loading

0 comments on commit 01ebb9d

Please sign in to comment.