Skip to content

Commit

Permalink
Merge branch 'next' into fix/more-peerdeps
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Dec 7, 2022
2 parents ab763c8 + cc0c35f commit 3e7c1dd
Show file tree
Hide file tree
Showing 136 changed files with 2,486 additions and 1,511 deletions.
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"unifiedjs.vscode-mdx",
"yzhang.markdown-all-in-one"
]
}
42 changes: 38 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"eslint.workingDirectories": ["./code", "./scripts"],
"typescript.tsdk": "./code/node_modules/typescript/lib",
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnSave": true
Expand All @@ -17,5 +15,41 @@
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnSave": true
},
"prettier.ignorePath": "./code/.prettierignore"
}
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.tabSize": 2,
"editor.formatOnSave": true,
"eslint.format.enable": true,
"eslint.options": {
"cache": true,
"cacheLocation": ".cache/eslint",
"extensions": [
".js",
".jsx",
".mjs",
".json",
".ts",
".tsx"
]
},
"eslint.packageManager": "yarn",
"eslint.useESLintClass": true,
"eslint.validate": [
"json",
"javascript",
"javascriptreact",
"html",
"typescript",
"typescriptreact"
],
"eslint.workingDirectories": [
"./code",
"./scripts"
],
"files.associations": {
"*.js": "javascriptreact"
},
"prettier.ignorePath": "./code/.prettierignore",
"typescript.tsdk": "./code/node_modules/typescript/lib"
}
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 7.0.0-alpha.60 (December 7, 2022)

#### Bug Fixes

- Deal with a lot of different edge cases for git URLs [#20115](https://github.com/storybooks/storybook/pull/20115)

#### Maintenance

- Clean up babelModeV7 migration and code [#20117](https://github.com/storybooks/storybook/pull/20117)
- Fix peer dependencies for npm8/pnpm/yarn pnp [#20110](https://github.com/storybooks/storybook/pull/20110)
- Remove peer deps from core-common [#20109](https://github.com/storybooks/storybook/pull/20109)

#### Build

- Add more linting config to vs-code settings.json [#20101](https://github.com/storybooks/storybook/pull/20101)

## 7.0.0-alpha.59 (December 6, 2022)

#### Features
Expand Down
35 changes: 21 additions & 14 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- [From version 6.5.x to 7.0.0](#from-version-65x-to-700)
- [Alpha release notes](#alpha-release-notes)
- [7.0 breaking changes](#70-breaking-changes)
- [React peer dependencies required](#react-peer-dependencies-required)
- [Postcss removed](#postcss-removed)
- [Vue3 replaced app export with setup](#vue3-replaced-app-export-with-setup)
- [removed auto injection of @storybook/addon-actions decorator](#removed-auto-injection-of-storybookaddon-actions-decorator)
Expand All @@ -14,12 +15,11 @@
- [start-storybook / build-storybook binaries removed](#start-storybook--build-storybook-binaries-removed)
- [storyStoreV7 enabled by default](#storystorev7-enabled-by-default)
- [Webpack4 support discontinued](#webpack4-support-discontinued)
- [Modern ESM / IE11 support discontinued](#modern-esm--ie11-support-discontinued)
- [Framework field mandatory](#framework-field-mandatory)
- [frameworkOptions renamed](#frameworkoptions-renamed)
- [Framework standalone build moved](#framework-standalone-build-moved)
- [Docs modern inline rendering by default](#docs-modern-inline-rendering-by-default)
- [Babel mode v7 by default](#babel-mode-v7-by-default)
- [Babel mode v7 exclusively](#babel-mode-v7-exclusively)
- [7.0 feature flags removed](#70-feature-flags-removed)
- [CLI option `--use-npm` deprecated](#cli-option---use-npm-deprecated)
- [Vite builder uses vite config automatically](#vite-builder-uses-vite-config-automatically)
Expand Down Expand Up @@ -264,6 +264,17 @@ In the meantime, these migration notes are the best available documentation on t

### 7.0 breaking changes

#### React peer dependencies required

Starting in 7.0, `react` and `react-dom` are now required peer dependencies of Storybook.

Storybook uses `react` in a variety of packages. In the past, we've done various trickery hide this from non-React users. However, with stricter peer dependency handling by `npm8`, `npm`, and `yarn pnp` those tricks have started to cause problems for those users. Rather than resorting to even more complicated tricks, we are making `react` and `react-dom` required peer dependencies.

To upgrade manually, add any version of `react` and `react-dom` as devDependencies using your package manager of choice, e.g.

```
npm add react react-dom --dev
```
#### Postcss removed

Storybook 6.x installed postcss by default. In 7.0 built-in support has been removed. IF you need it, you can add it back using [`@storybook/addon-postcss`](https://github.com/storybookjs/addon-postcss).
Expand Down Expand Up @@ -462,10 +473,6 @@ To upgrade:

During the 7.0 dev cycle we will be updating this section with useful resources as we run across them.

#### Modern ESM / IE11 support discontinued

SB7.0 compiles to modern ESM, meaning that IE11 is no longer supported. Over the course of the 7.0 dev cycle we will create recommendations for users who still require IE support.

#### Framework field mandatory

In 6.4 we introduced a new `main.js` field called [`framework`](#mainjs-framework-field). Starting in 7.0, this field is mandatory.
Expand Down Expand Up @@ -538,18 +545,18 @@ module.exports = {
};
```

#### Babel mode v7 by default
#### Babel mode v7 exclusively

Storybook now uses your project babel configuration differently as [described below in Babel Mode v7](#babel-mode-v7). This is now the default. To opt-out:
Storybook now uses [Babel mode v7](#babel-mode-v7) exclusively. In 6.x, Storybook provided its own babel settings out of the box. Now, Storybook's uses your project's babel settings (`.babelrc`, `babel.config.js`, etc.) instead.

```js
module.exports = {
features: {
babelModeV7: false,
},
};
In the new mode, Storybook expects you to provide a configuration file. If you want a configuration file that's equivalent to the 6.x default, you can run the following command in your project directory:

```sh
npx sb@next babelrc
```

This will create a `.babelrc.json` file. This file includes a bunch of babel plugins, so you may need to add new package devDependencies accordingly.

#### 7.0 feature flags removed

Storybook uses temporary feature flags to opt-in to future breaking changes or opt-in to legacy behaviors. For example:
Expand Down
22 changes: 11 additions & 11 deletions code/addons/a11y/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-a11y",
"version": "7.0.0-alpha.59",
"version": "7.0.0-alpha.60",
"description": "Test component compliance with web accessibility standards",
"keywords": [
"a11y",
Expand Down Expand Up @@ -62,15 +62,15 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/addon-highlight": "7.0.0-alpha.59",
"@storybook/channels": "7.0.0-alpha.59",
"@storybook/client-logger": "7.0.0-alpha.59",
"@storybook/components": "7.0.0-alpha.59",
"@storybook/core-events": "7.0.0-alpha.59",
"@storybook/manager-api": "7.0.0-alpha.59",
"@storybook/preview-api": "7.0.0-alpha.59",
"@storybook/theming": "7.0.0-alpha.59",
"@storybook/types": "7.0.0-alpha.59",
"@storybook/addon-highlight": "7.0.0-alpha.60",
"@storybook/channels": "7.0.0-alpha.60",
"@storybook/client-logger": "7.0.0-alpha.60",
"@storybook/components": "7.0.0-alpha.60",
"@storybook/core-events": "7.0.0-alpha.60",
"@storybook/manager-api": "7.0.0-alpha.60",
"@storybook/preview-api": "7.0.0-alpha.60",
"@storybook/theming": "7.0.0-alpha.60",
"@storybook/types": "7.0.0-alpha.60",
"axe-core": "^4.2.0",
"global": "^4.4.0",
"lodash": "^4.17.21",
Expand Down Expand Up @@ -102,7 +102,7 @@
"./src/preview.tsx"
]
},
"gitHead": "8d3068344b96cb740635b6fbb7a9052108a984bc",
"gitHead": "2b38f15a169d191e68f01abae0b109920d89fb39",
"storybook": {
"displayName": "Accessibility",
"icon": "https://user-images.githubusercontent.com/263385/101991665-47042f80-3c7c-11eb-8f00-64b5a18f498a.png",
Expand Down
18 changes: 9 additions & 9 deletions code/addons/actions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-actions",
"version": "7.0.0-alpha.59",
"version": "7.0.0-alpha.60",
"description": "Get UI feedback when an action is performed on an interactive element",
"keywords": [
"storybook",
Expand Down Expand Up @@ -76,13 +76,13 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/client-logger": "7.0.0-alpha.59",
"@storybook/components": "7.0.0-alpha.59",
"@storybook/core-events": "7.0.0-alpha.59",
"@storybook/manager-api": "7.0.0-alpha.59",
"@storybook/preview-api": "7.0.0-alpha.59",
"@storybook/theming": "7.0.0-alpha.59",
"@storybook/types": "7.0.0-alpha.59",
"@storybook/client-logger": "7.0.0-alpha.60",
"@storybook/components": "7.0.0-alpha.60",
"@storybook/core-events": "7.0.0-alpha.60",
"@storybook/manager-api": "7.0.0-alpha.60",
"@storybook/preview-api": "7.0.0-alpha.60",
"@storybook/theming": "7.0.0-alpha.60",
"@storybook/types": "7.0.0-alpha.60",
"dequal": "^2.0.2",
"global": "^4.4.0",
"lodash": "^4.17.21",
Expand Down Expand Up @@ -120,7 +120,7 @@
"./src/preview.ts"
]
},
"gitHead": "8d3068344b96cb740635b6fbb7a9052108a984bc",
"gitHead": "2b38f15a169d191e68f01abae0b109920d89fb39",
"storybook": {
"displayName": "Actions",
"unsupportedFrameworks": [
Expand Down
18 changes: 9 additions & 9 deletions code/addons/backgrounds/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-backgrounds",
"version": "7.0.0-alpha.59",
"version": "7.0.0-alpha.60",
"description": "Switch backgrounds to view components in different settings",
"keywords": [
"addon",
Expand Down Expand Up @@ -75,13 +75,13 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/client-logger": "7.0.0-alpha.59",
"@storybook/components": "7.0.0-alpha.59",
"@storybook/core-events": "7.0.0-alpha.59",
"@storybook/manager-api": "7.0.0-alpha.59",
"@storybook/preview-api": "7.0.0-alpha.59",
"@storybook/theming": "7.0.0-alpha.59",
"@storybook/types": "7.0.0-alpha.59",
"@storybook/client-logger": "7.0.0-alpha.60",
"@storybook/components": "7.0.0-alpha.60",
"@storybook/core-events": "7.0.0-alpha.60",
"@storybook/manager-api": "7.0.0-alpha.60",
"@storybook/preview-api": "7.0.0-alpha.60",
"@storybook/theming": "7.0.0-alpha.60",
"@storybook/types": "7.0.0-alpha.60",
"global": "^4.4.0",
"memoizerific": "^1.11.3",
"ts-dedent": "^2.0.0"
Expand Down Expand Up @@ -111,7 +111,7 @@
"./src/preview.tsx"
]
},
"gitHead": "8d3068344b96cb740635b6fbb7a9052108a984bc",
"gitHead": "2b38f15a169d191e68f01abae0b109920d89fb39",
"storybook": {
"displayName": "Backgrounds",
"icon": "https://user-images.githubusercontent.com/263385/101991667-479cc600-3c7c-11eb-96d3-410e936252e7.png",
Expand Down
22 changes: 11 additions & 11 deletions code/addons/controls/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-controls",
"version": "7.0.0-alpha.59",
"version": "7.0.0-alpha.60",
"description": "Interact with component inputs dynamically in the Storybook UI",
"keywords": [
"addon",
Expand Down Expand Up @@ -67,15 +67,15 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/blocks": "7.0.0-alpha.59",
"@storybook/client-logger": "7.0.0-alpha.59",
"@storybook/components": "7.0.0-alpha.59",
"@storybook/core-common": "7.0.0-alpha.59",
"@storybook/manager-api": "7.0.0-alpha.59",
"@storybook/node-logger": "7.0.0-alpha.59",
"@storybook/preview-api": "7.0.0-alpha.59",
"@storybook/theming": "7.0.0-alpha.59",
"@storybook/types": "7.0.0-alpha.59",
"@storybook/blocks": "7.0.0-alpha.60",
"@storybook/client-logger": "7.0.0-alpha.60",
"@storybook/components": "7.0.0-alpha.60",
"@storybook/core-common": "7.0.0-alpha.60",
"@storybook/manager-api": "7.0.0-alpha.60",
"@storybook/node-logger": "7.0.0-alpha.60",
"@storybook/preview-api": "7.0.0-alpha.60",
"@storybook/theming": "7.0.0-alpha.60",
"@storybook/types": "7.0.0-alpha.60",
"lodash": "^4.17.21",
"ts-dedent": "^2.0.0"
},
Expand All @@ -101,7 +101,7 @@
],
"platform": "browser"
},
"gitHead": "8d3068344b96cb740635b6fbb7a9052108a984bc",
"gitHead": "2b38f15a169d191e68f01abae0b109920d89fb39",
"storybook": {
"displayName": "Controls",
"icon": "https://user-images.githubusercontent.com/263385/101991669-479cc600-3c7c-11eb-93d9-38b67e8371f2.png",
Expand Down
Loading

0 comments on commit 3e7c1dd

Please sign in to comment.