Skip to content

Commit

Permalink
feat(storybook): removing support for Storybook 5
Browse files Browse the repository at this point in the history
  • Loading branch information
mandarini committed Apr 6, 2022
1 parent 704b6c8 commit 39b3870
Show file tree
Hide file tree
Showing 52 changed files with 252 additions and 1,339 deletions.
58 changes: 0 additions & 58 deletions docs/generated/packages/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -1654,64 +1654,6 @@
"hidden": false,
"path": "/packages/angular/src/generators/storybook-configuration/schema.json"
},
{
"name": "storybook-migrate-defaults-5-to-6",
"factory": "./src/generators/storybook-migrate-defaults-5-to-6/storybook-migrate-defaults-5-to-6",
"schema": {
"$schema": "http://json-schema.org/schema",
"$id": "NxStorybookMigrateDefaults5To6Generator",
"title": "Storybook migrate default 5 to 6",
"description": "Generates default Storybook configuration files using Storybook version `>=6.x` specs, for projects that already have Storybook instances and configurations of versions `<6.x.`",
"cli": "nx",
"type": "object",
"properties": {
"all": {
"type": "boolean",
"description": "Generate new Storybook configurations for all Storybook instances across all applications and libraries.",
"default": true
},
"keepOld": {
"type": "boolean",
"description": "Keep the old configuration files by placing them in a folder called `.old_storybook`.",
"default": true
},
"name": {
"type": "string",
"description": "Library or application name for which you want to generate the new Storybook configuration. Leave empty to upgrade all Storybook instances. Only use this if you want to do a gradual migration.",
"$default": { "$source": "argv", "index": 0 }
}
},
"additionalProperties": false,
"required": [],
"presets": []
},
"description": "Generates default Storybook configuration files using Storybook version `>=6.x` specs, for projects that already have Storybook instances and configurations of versions `<6.x`.",
"implementation": "/packages/angular/src/generators/storybook-migrate-defaults-5-to-6/storybook-migrate-defaults-5-to-6.ts",
"aliases": [],
"hidden": false,
"path": "/packages/angular/src/generators/storybook-migrate-defaults-5-to-6/schema.json"
},
{
"name": "storybook-migrate-stories-to-6-2",
"factory": "./src/generators/storybook-migrate-stories-to-6-2/migrate-stories-to-6-2",
"schema": {
"$schema": "http://json-schema.org/schema",
"$id": "NxAngularStorybookMigrateStoriesTo62Generator",
"title": "Storybook migrate stories to 6.2",
"description": "Migrates stories to match the new syntax in `v6.2` where the component declaration should be in the default export.",
"type": "object",
"cli": "nx",
"properties": {},
"additionalProperties": false,
"required": [],
"presets": []
},
"description": "Migrates stories to match the new syntax in `v6.2` where the component declaration should be in the default export.",
"implementation": "/packages/angular/src/generators/storybook-migrate-stories-to-6-2/migrate-stories-to-6-2.ts",
"aliases": [],
"hidden": false,
"path": "/packages/angular/src/generators/storybook-migrate-stories-to-6-2/schema.json"
},
{
"name": "upgrade-module",
"factory": "./src/generators/upgrade-module/upgrade-module",
Expand Down
36 changes: 0 additions & 36 deletions docs/generated/packages/react.json
Original file line number Diff line number Diff line change
Expand Up @@ -638,42 +638,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": {
"all": {
"type": "boolean",
"description": "Generate new Storybook configurations for all Storybook instances across all apps and libs.",
"default": true
},
"keepOld": {
"type": "boolean",
"description": "Keep the old configuration files - put them in a folder called `.old_storybook`.",
"default": true
},
"name": {
"type": "string",
"description": "Leave empty to upgrade all Storybook instances. Only use this if you want to do a gradual migration. Library or application name for which you want to generate the new Storybook configuration.",
"$default": { "$source": "argv", "index": 0 }
}
},
"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
56 changes: 0 additions & 56 deletions docs/generated/packages/storybook.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,62 +143,6 @@
"implementation": "/packages/storybook/src/generators/cypress-project/cypress-project.ts",
"aliases": [],
"path": "/packages/storybook/src/generators/cypress-project/schema.json"
},
{
"name": "migrate-defaults-5-to-6",
"factory": "./src/generators/migrate-defaults-5-to-6/migrate-defaults-5-to-6",
"schema": {
"$schema": "http://json-schema.org/schema",
"cli": "nx",
"$id": "migrate-defaults-5-to-6",
"title": "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": {
"all": {
"type": "boolean",
"description": "Generate new Storybook configurations for all Storybook instances across all apps and libs.",
"default": true
},
"keepOld": {
"type": "boolean",
"description": "Keep the old configuration files - put them in a folder called `.old_storybook`.",
"default": true
},
"name": {
"type": "string",
"description": "Leave empty to upgrade all Storybook instances. Only use this if you want to do a gradual migration. Library or application name for which you want to generate the new Storybook configuration.",
"$default": { "$source": "argv", "index": 0 }
}
},
"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/storybook/src/generators/migrate-defaults-5-to-6/migrate-defaults-5-to-6.ts",
"aliases": [],
"path": "/packages/storybook/src/generators/migrate-defaults-5-to-6/schema.json"
},
{
"name": "migrate-stories-to-6-2",
"factory": "./src/generators/migrate-stories-to-6-2/migrate-stories-to-6-2",
"schema": {
"$schema": "http://json-schema.org/schema",
"cli": "nx",
"$id": "migrate-stories-to-6-2",
"title": "Migrate stories to 6.2",
"description": "Migrate stories syntax to `6.2`.",
"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/storybook/src/generators/migrate-stories-to-6-2/migrate-stories-to-6-2.ts",
"aliases": [],
"path": "/packages/storybook/src/generators/migrate-stories-to-6-2/schema.json"
}
],
"executors": [
Expand Down
25 changes: 0 additions & 25 deletions docs/map.json
Original file line number Diff line number Diff line change
Expand Up @@ -675,16 +675,6 @@
"id": "storybook-configuration",
"path": "/packages/angular/generators/storybook-configuration"
},
{
"name": "storybook-migrate-defaults-5-to-6 generator",
"id": "storybook-migrate-defaults-5-to-6",
"path": "/packages/angular/generators/storybook-migrate-defaults-5-to-6"
},
{
"name": "storybook-migrate-stories-to-6-2 generator",
"id": "storybook-migrate-stories-to-6-2",
"path": "/packages/angular/generators/storybook-migrate-stories-to-6-2"
},
{
"name": "upgrade-module generator",
"id": "upgrade-module",
Expand Down Expand Up @@ -771,11 +761,6 @@
"id": "storybook-configuration",
"path": "/packages/react/generators/storybook-configuration"
},
{
"name": "storybook-migrate-defaults-5-to-6 generator",
"id": "storybook-migrate-defaults-5-to-6",
"path": "/packages/react/generators/storybook-migrate-defaults-5-to-6"
},
{
"name": "hook generator",
"id": "hook",
Expand Down Expand Up @@ -869,16 +854,6 @@
"id": "cypress-project",
"path": "/packages/storybook/generators/cypress-project"
},
{
"name": "migrate-defaults-5-to-6 generator",
"id": "migrate-defaults-5-to-6",
"path": "/packages/storybook/generators/migrate-defaults-5-to-6"
},
{
"name": "migrate-stories-to-6-2 generator",
"id": "migrate-stories-to-6-2",
"path": "/packages/storybook/generators/migrate-stories-to-6-2"
},
{
"name": "Executors: Build",
"id": "executors-build",
Expand Down
11 changes: 1 addition & 10 deletions docs/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
"setup-tailwind",
"stories",
"storybook-configuration",
"storybook-migrate-defaults-5-to-6",
"storybook-migrate-stories-to-6-2",
"upgrade-module",
"web-worker"
]
Expand Down Expand Up @@ -200,7 +198,6 @@
"component",
"redux",
"storybook-configuration",
"storybook-migrate-defaults-5-to-6",
"component-story",
"stories",
"component-cypress-spec",
Expand Down Expand Up @@ -240,13 +237,7 @@
"path": "generated/packages/storybook.json",
"schemas": {
"executors": ["storybook", "build"],
"generators": [
"init",
"configuration",
"cypress-project",
"migrate-defaults-5-to-6",
"migrate-stories-to-6-2"
]
"generators": ["init", "configuration", "cypress-project"]
}
},
{
Expand Down
4 changes: 3 additions & 1 deletion docs/shared/guides/storybook/storybook-v6-angular.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
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
20 changes: 0 additions & 20 deletions packages/angular/generators.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,6 @@
"schema": "./src/generators/storybook-configuration/schema.json",
"description": "Adds Storybook configuration to a project."
},
"storybook-migrate-defaults-5-to-6": {
"factory": "./src/generators/storybook-migrate-defaults-5-to-6/compat",
"schema": "./src/generators/storybook-migrate-defaults-5-to-6/schema.json",
"description": "Generates default Storybook configuration files using Storybook version `>=6.x` specs, for projects that already have Storybook instances and configurations of versions `<6.x`."
},
"storybook-migrate-stories-to-6-2": {
"factory": "./src/generators/storybook-migrate-stories-to-6-2/compat",
"schema": "./src/generators/storybook-migrate-stories-to-6-2/schema.json",
"description": "Migrates stories to match the new syntax in `v6.2` where the component declaration should be in the default export."
},
"upgrade-module": {
"factory": "./src/generators/upgrade-module/compat",
"schema": "./src/generators/upgrade-module/schema.json",
Expand Down Expand Up @@ -299,16 +289,6 @@
"schema": "./src/generators/storybook-configuration/schema.json",
"description": "Adds Storybook configuration to a project."
},
"storybook-migrate-defaults-5-to-6": {
"factory": "./src/generators/storybook-migrate-defaults-5-to-6/storybook-migrate-defaults-5-to-6",
"schema": "./src/generators/storybook-migrate-defaults-5-to-6/schema.json",
"description": "Generates default Storybook configuration files using Storybook version `>=6.x` specs, for projects that already have Storybook instances and configurations of versions `<6.x`."
},
"storybook-migrate-stories-to-6-2": {
"factory": "./src/generators/storybook-migrate-stories-to-6-2/migrate-stories-to-6-2",
"schema": "./src/generators/storybook-migrate-stories-to-6-2/schema.json",
"description": "Migrates stories to match the new syntax in `v6.2` where the component declaration should be in the default export."
},
"upgrade-module": {
"factory": "./src/generators/upgrade-module/upgrade-module",
"schema": "./src/generators/upgrade-module/schema.json",
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.

Loading

0 comments on commit 39b3870

Please sign in to comment.