Skip to content

Commit

Permalink
Merge branch 'next' into shaun/jit-learning
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaun Evening committed Jan 16, 2024
2 parents 80246a9 + 6c1c4d7 commit b87c343
Show file tree
Hide file tree
Showing 257 changed files with 2,394 additions and 2,435 deletions.
68 changes: 34 additions & 34 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ parameters:
workflow:
description: Which workflow to run
type: enum
enum: ['normal', 'merged', 'daily', 'skipped', 'docs']
default: 'skipped'
enum: ["normal", "merged", "daily", "skipped", "docs"]
default: "skipped"

executors:
sb_node_16_classic:
parameters:
class:
description: The Resource class
type: enum
enum: ['small', 'medium', 'medium+', 'large', 'xlarge']
default: 'small'
enum: ["small", "medium", "medium+", "large", "xlarge"]
default: "small"
working_directory: /tmp/storybook
docker:
- image: cimg/node:18.18.0
Expand All @@ -26,8 +26,8 @@ executors:
class:
description: The Resource class
type: enum
enum: ['small', 'medium', 'medium+', 'large', 'xlarge']
default: 'small'
enum: ["small", "medium", "medium+", "large", "xlarge"]
default: "small"
working_directory: /tmp/storybook
docker:
- image: cimg/node:18.18.0-browsers
Expand All @@ -39,8 +39,8 @@ executors:
class:
description: The Resource class
type: enum
enum: ['small', 'medium', 'medium+', 'large', 'xlarge']
default: 'small'
enum: ["small", "medium", "medium+", "large", "xlarge"]
default: "small"
working_directory: /tmp/storybook
docker:
- image: mcr.microsoft.com/playwright:v1.36.0-focal
Expand All @@ -56,7 +56,7 @@ orbs:

commands:
cancel-workflow-on-failure:
description: 'Cancels the entire workflow in case the previous step has failed'
description: "Cancels the entire workflow in case the previous step has failed"
steps:
- run:
name: Cancel current workflow
Expand All @@ -66,13 +66,13 @@ commands:
echo "To execute all checks locally, please run yarn ci-tests"
curl -X POST --header "Content-Type: application/json" "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${WORKFLOW_CANCELER}"
report-workflow-on-failure:
description: 'Reports failures to discord'
description: "Reports failures to discord"
parameters:
template:
description: |
Which template to report in discord. Applicable for parallel sandbox jobs
type: string
default: 'none'
default: "none"
steps:
- run:
when: on_fail
Expand All @@ -88,7 +88,7 @@ jobs:
name: sb_node_16_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
clone_options: "--depth 1 --verbose"
- restore_cache:
name: Restore Yarn cache
keys:
Expand All @@ -114,7 +114,7 @@ jobs:
name: sb_node_16_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
clone_options: "--depth 1 --verbose"
- restore_cache:
name: Restore Yarn cache
keys:
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
name: sb_node_16_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
- run:
Expand All @@ -173,7 +173,7 @@ jobs:
name: sb_node_16_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
- run:
Expand All @@ -187,7 +187,7 @@ jobs:
executor: sb_node_16_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
- run:
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:
name: sb_node_16_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
- run:
Expand All @@ -237,7 +237,7 @@ jobs:
name: sb_node_16_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
- codecov/upload
Expand Down Expand Up @@ -273,7 +273,7 @@ jobs:
parallelism: << parameters.parallelism >>
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
- run:
Expand All @@ -297,7 +297,7 @@ jobs:
parallelism: << parameters.parallelism >>
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
- run:
Expand All @@ -317,7 +317,7 @@ jobs:
parallelism: << parameters.parallelism >>
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
- run:
Expand Down Expand Up @@ -356,7 +356,7 @@ jobs:
parallelism: << parameters.parallelism >>
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
- run:
Expand All @@ -376,7 +376,7 @@ jobs:
parallelism: << parameters.parallelism >>
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
- run:
Expand Down Expand Up @@ -415,7 +415,7 @@ jobs:
parallelism: << parameters.parallelism >>
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
- run:
Expand All @@ -438,7 +438,7 @@ jobs:
parallelism: << parameters.parallelism >>
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
- run:
Expand All @@ -461,7 +461,7 @@ jobs:
parallelism: << parameters.parallelism >>
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
- run:
Expand All @@ -483,7 +483,7 @@ jobs:
type: string
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
- when:
Expand Down Expand Up @@ -706,30 +706,30 @@ workflows:
requires:
- build
- create-sandboxes:
parallelism: 32
parallelism: 34
requires:
- build
# - smoke-test-sandboxes: # disabled for now
# requires:
# - create-sandboxes
- build-sandboxes:
parallelism: 32
parallelism: 34
requires:
- create-sandboxes
- chromatic-sandboxes:
parallelism: 29
parallelism: 31
requires:
- build-sandboxes
- e2e-production:
parallelism: 27
parallelism: 29
requires:
- build-sandboxes
- e2e-dev:
parallelism: 2
requires:
- create-sandboxes
- test-runner-production:
parallelism: 27
parallelism: 29
requires:
- build-sandboxes

Expand All @@ -744,14 +744,14 @@ workflows:
# - "yarn1"
# - "yarn2"
# - "pnpm"
template:
template:
- "react-vite-ts"
- "nextjs-ts"
- "vue-vite-ts"
# --smoke-test is not supported for the angular builder right now
# - "angular-cli"
- "lit-vite-ts"

# TODO: reenable once we find out the source of flakyness
# - test-runner-dev:
# parallelism: 4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate-sandboxes-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
run: yarn local-registry --open &
working-directory: ./code
- name: Wait for registry
run: yarn wait-on http://localhost:6001
run: yarn wait-on tcp:127.0.0.1:6001
working-directory: ./code
- name: Generate
run: yarn generate-sandboxes --local-registry
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate-sandboxes-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
run: yarn local-registry --open &
working-directory: ./code
- name: Wait for registry
run: yarn wait-on http://localhost:6001
run: yarn wait-on tcp:127.0.0.1:6001
working-directory: ./code
- name: Generate
run: yarn generate-sandboxes --local-registry --debug
Expand Down
59 changes: 47 additions & 12 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
- [Web Components](#web-components)
- [Dropping default babel plugins in Webpack5-based projects](#dropping-default-babel-plugins-in-webpack5-based-projects)
- [Deprecations which are now removed](#deprecations-which-are-now-removed)
- [Removed `config` preset](#removed-config-preset)
- [Removed `passArgsFirst` option](#removed-passargsfirst-option)
- [Methods and properties from AddonStore](#methods-and-properties-from-addonstore)
- [Methods and properties from PreviewAPI](#methods-and-properties-from-previewapi)
Expand All @@ -65,18 +66,20 @@
- [`Primary` Doc block properties](#primary-doc-block-properties)
- [`createChannel` from `@storybook/postmessage` and `@storybook/channel-websocket`](#createchannel-from-storybookpostmessage-and-storybookchannel-websocket)
- [StoryStore and methods deprecated](#storystore-and-methods-deprecated)
- [Addon author changes](#addon-author-changes)
- [Removed `config` preset](#removed-config-preset-1)
- [From version 7.5.0 to 7.6.0](#from-version-750-to-760)
- [CommonJS with Vite is deprecated](#commonjs-with-vite-is-deprecated)
- [Using implicit actions during rendering is deprecated](#using-implicit-actions-during-rendering-is-deprecated)
- [typescript.skipBabel deprecated](#typescriptskipbabel-deprecated)
- [Primary doc block accepts of prop](#primary-doc-block-accepts-of-prop)
- [Addons no longer need a peer dependency on React](#addons-no-longer-need-a-peer-dependency-on-react)
- [CommonJS with Vite is deprecated](#commonjs-with-vite-is-deprecated)
- [Using implicit actions during rendering is deprecated](#using-implicit-actions-during-rendering-is-deprecated)
- [typescript.skipBabel deprecated](#typescriptskipbabel-deprecated)
- [Primary doc block accepts of prop](#primary-doc-block-accepts-of-prop)
- [Addons no longer need a peer dependency on React](#addons-no-longer-need-a-peer-dependency-on-react)
- [From version 7.4.0 to 7.5.0](#from-version-740-to-750)
- [`storyStoreV6` and `storiesOf` is deprecated](#storystorev6-and-storiesof-is-deprecated)
- [`storyIndexers` is replaced with `experimental_indexers`](#storyindexers-is-replaced-with-experimental_indexers)
- [`storyStoreV6` and `storiesOf` is deprecated](#storystorev6-and-storiesof-is-deprecated)
- [`storyIndexers` is replaced with `experimental_indexers`](#storyindexers-is-replaced-with-experimental_indexers)
- [From version 7.0.0 to 7.2.0](#from-version-700-to-720)
- [Addon API is more type-strict](#addon-api-is-more-type-strict)
- [Addon-controls hideNoControlsWarning parameter is deprecated](#addon-controls-hidenocontrolswarning-parameter-is-deprecated)
- [Addon API is more type-strict](#addon-api-is-more-type-strict)
- [Addon-controls hideNoControlsWarning parameter is deprecated](#addon-controls-hidenocontrolswarning-parameter-is-deprecated)
- [From version 6.5.x to 7.0.0](#from-version-65x-to-700)
- [7.0 breaking changes](#70-breaking-changes)
- [Dropped support for Node 15 and below](#dropped-support-for-node-15-and-below)
Expand All @@ -102,7 +105,7 @@
- [Deploying build artifacts](#deploying-build-artifacts)
- [Dropped support for file URLs](#dropped-support-for-file-urls)
- [Serving with nginx](#serving-with-nginx)
- [Ignore story files from node_modules](#ignore-story-files-from-node_modules)
- [Ignore story files from node\_modules](#ignore-story-files-from-node_modules)
- [7.0 Core changes](#70-core-changes)
- [7.0 feature flags removed](#70-feature-flags-removed)
- [Story context is prepared before for supporting fine grained updates](#story-context-is-prepared-before-for-supporting-fine-grained-updates)
Expand All @@ -115,7 +118,7 @@
- [Addon-interactions: Interactions debugger is now default](#addon-interactions-interactions-debugger-is-now-default)
- [7.0 Vite changes](#70-vite-changes)
- [Vite builder uses Vite config automatically](#vite-builder-uses-vite-config-automatically)
- [Vite cache moved to node_modules/.cache/.vite-storybook](#vite-cache-moved-to-node_modulescachevite-storybook)
- [Vite cache moved to node\_modules/.cache/.vite-storybook](#vite-cache-moved-to-node_modulescachevite-storybook)
- [7.0 Webpack changes](#70-webpack-changes)
- [Webpack4 support discontinued](#webpack4-support-discontinued)
- [Babel mode v7 exclusively](#babel-mode-v7-exclusively)
Expand Down Expand Up @@ -165,7 +168,7 @@
- [Dropped addon-docs manual babel configuration](#dropped-addon-docs-manual-babel-configuration)
- [Dropped addon-docs manual configuration](#dropped-addon-docs-manual-configuration)
- [Autoplay in docs](#autoplay-in-docs)
- [Removed STORYBOOK_REACT_CLASSES global](#removed-storybook_react_classes-global)
- [Removed STORYBOOK\_REACT\_CLASSES global](#removed-storybook_react_classes-global)
- [7.0 Deprecations and default changes](#70-deprecations-and-default-changes)
- [storyStoreV7 enabled by default](#storystorev7-enabled-by-default)
- [`Story` type deprecated](#story-type-deprecated)
Expand Down Expand Up @@ -800,6 +803,23 @@ Until the 8.0 release, Storybook provided the `@babel/preset-env` preset for Web

### Deprecations which are now removed

#### Removed `config` preset

In Storybook 7.0 we have deprecated the preset field `config` and it has been replaced with 'previewAnnotations'. The `config` preset is now completely removed in Storybook 8.0.

```diff
// .storybook/main.js

// before
const config = {
framework: "@storybook/your-framework",
- config: (entries) => [...entries, yourEntry],
+ previewAnnotations: (entries) => [...entries, yourEntry],
};

export default config;
```

#### Removed `passArgsFirst` option

Since Storybook 6, we have had an option called `parameters.passArgsFirst` (default=`true`), which sallows you to pass the context to the story function first when set to `false.` We have removed this option. In Storybook 8.0, the args are always passed first, and as a second argument, the context is passed.
Expand Down Expand Up @@ -1012,6 +1032,21 @@ In particular, the following methods on the `StoryStore` are deprecated and will

Note that both these methods require initialization, so you should await `preview.ready()`.

### Addon author changes

#### Removed `config` preset

In Storybook 7.0 we have deprecated the preset field `config` and it has been replaced with `previewAnnotations`. The `config` preset is now completely removed in Storybook 8.0.

```diff
// your-addon/preset.js

module.exports = {
- config: (entries = []) => [...entries, ...yourEntry],
+ previewAnnotations: (entries = []) => [...entries, ...yourEntry],
};
```

## From version 7.5.0 to 7.6.0

#### CommonJS with Vite is deprecated
Expand Down
Loading

0 comments on commit b87c343

Please sign in to comment.