Skip to content

Commit

Permalink
Merge branch 'next' into fix/vite-package-root
Browse files Browse the repository at this point in the history
  • Loading branch information
IanVS committed May 10, 2023
2 parents 3bab122 + b3c9b95 commit 81677e5
Show file tree
Hide file tree
Showing 225 changed files with 2,263 additions and 1,828 deletions.
46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,49 @@
## 7.1.0-alpha.14 (May 9, 2023)

#### Bug Fixes

- CLI: Scope styles in sample components from the CLI templates [#22162](https://github.com/storybooks/storybook/pull/22162)
- CLI: Fix copyTemplate failures on `init` [#22375](https://github.com/storybooks/storybook/pull/22375)
- CLI: Fix server init [#22443](https://github.com/storybooks/storybook/pull/22443)
- Server: Add json indexer [#22460](https://github.com/storybooks/storybook/pull/22460)
- React: Use correct default annotations for composeStories [#22308](https://github.com/storybooks/storybook/pull/22308)
- UI: Fix opacity of list-item color [#22074](https://github.com/storybooks/storybook/pull/22074)

#### Maintenance

- CLI: Refactor package manager methods to be async [#22401](https://github.com/storybooks/storybook/pull/22401)
- Angular: Improve Error message for angular.json not found [#22377](https://github.com/storybooks/storybook/pull/22377)
- TypeScript: Migrate @storybook/instrumenter to strict TS [#22370](https://github.com/storybooks/storybook/pull/22370)
- TypeScript: Migrate @storybook/core-events to strict TS [#22448](https://github.com/storybooks/storybook/pull/22448)
- TypeScript: Migrate @storybook/core-client to strict TS [#22447](https://github.com/storybooks/storybook/pull/22447)
- TypeScript: Migrate @storybook/react-vite and @storybook/preact-vite to strict TS [#22428](https://github.com/storybooks/storybook/pull/22428)
- TypeScript: Migrate @storybook/svelte-vite to strict TS [#22411](https://github.com/storybooks/storybook/pull/22411)
- TypeScript: Migrate @storybook/types to strict TS [#22397](https://github.com/storybooks/storybook/pull/22397)
- TypeScript: Migrate @storybook/addon-storysource to strict TS [#22367](https://github.com/storybooks/storybook/pull/22367)
- TypeScript: Migrate @storybook/client-api to strict TS [#22421](https://github.com/storybooks/storybook/pull/22421)
- TypeScript: Migrate @storybook/sveltekit to strict TS [#22412](https://github.com/storybooks/storybook/pull/22412)
- TypeScript: Migrate @storybook/source-loader to strict TS [#22420](https://github.com/storybooks/storybook/pull/22420)

## 7.1.0-alpha.13 (May 5, 2023)

#### Bug Fixes

- Core: Fix virtual modules excluded for babel-loader [#22331](https://github.com/storybooks/storybook/pull/22331)

#### Maintenance

- Angular: Allow TypeScript 4.0.0 and 5.0.0 [#22391](https://github.com/storybooks/storybook/pull/22391)
- Angular: Enable Angular Unit tests [#22355](https://github.com/storybooks/storybook/pull/22355)
- TypeScript: Migrate @storybook/theming to strict TS [#22376](https://github.com/storybooks/storybook/pull/22376)
- TypeScript: Migrate @storybook/channel-websocket to strict TS [#22364](https://github.com/storybooks/storybook/pull/22364)
- TypeScript: Migrate @storybook/addon-outline to strict TS [#22369](https://github.com/storybooks/storybook/pull/22369)
- TypeScript: Migrate @storybook/addon-viewbook to strict ts [#22339](https://github.com/storybooks/storybook/pull/22339)
- TypeScript: Migrate @storybook/channels to strict TS [#22365](https://github.com/storybooks/storybook/pull/22365)

#### Build

- Add Angular Prerelease sandbox [#22379](https://github.com/storybooks/storybook/pull/22379)

## 7.1.0-alpha.12 (May 3, 2023)

#### Bug Fixes
Expand Down
35 changes: 31 additions & 4 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
- [Importing plain markdown files with `transcludeMarkdown` has changed](#importing-plain-markdown-files-with-transcludemarkdown-has-changed)
- [Stories field in .storybook/main.js is mandatory](#stories-field-in-storybookmainjs-is-mandatory)
- [Stricter global types](#stricter-global-types)
- [Dropped support for file URLs](#dropped-support-for-file-urls)
- [Deploying build artifacts](#deploying-build-artifacts)
- [Dropped support for file URLs](#dropped-support-for-file-urls)
- [Serving with nginx](#serving-with-nginx)
- [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 Down Expand Up @@ -800,11 +802,36 @@ Please follow up the [Configure your Storybook project](https://storybook.js.org

In 6.x, you could declare and use [`globals`](https://storybook.js.org/docs/react/essentials/toolbars-and-globals) without declaring their corresponding `globalTypes`. We've made this more strict in 7.0, so that the `globalTypes` declaration is required, and undeclared globals will be ignored.

#### Dropped support for file URLs
#### Deploying build artifacts

In 6.x it was possible to open a storybook from the file system. In 7.x, you must serve your static storybook with an HTTP server, e.g. `npx http-server storybook-static`.
Starting with 7.x, we are using modern [ECMAScript Modules (ESM)](https://nodejs.org/api/esm.html).

The reason for this change is that we're now using `.mjs` (modern ESM) and these are incompatible with the browser's CORS settings for file URLs.
Those end up as `.mjs` files in your static Storybook artifact and need to be served as `application/javascript`, indicated by the `Content-Type` HTTP header.

For a simple HTTP server to view a Storybook build, you can run `npx http-server storybook-static`.

Note that [using the serve package](https://storybook.js.org/docs/react/faq#i-see-a-no-preview-error-with-a-storybook-production-build) will not work.

##### Dropped support for file URLs

In 6.x it was possible to open a Storybook build from the file system.

ESM requires loading over HTTP(S), which is incompatible with the browser's CORS settings for `file://` URLs.

So you now need to use a web server as described above.

##### Serving with nginx

With [nginx](https://www.nginx.com/), you need to extend [the MIME type handling](https://github.com/nginx/nginx/blob/master/conf/mime.types) in your configuration:

```
include mime.types;
types {
application/javascript mjs;
}
```

It would otherwise default to serving the `.mjs` files as `application/octet-stream`.

### 7.0 Core changes

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.1.0-alpha.12",
"version": "7.1.0-alpha.14",
"description": "Test component compliance with web accessibility standards",
"keywords": [
"a11y",
Expand Down Expand Up @@ -63,16 +63,16 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/addon-highlight": "7.1.0-alpha.12",
"@storybook/channels": "7.1.0-alpha.12",
"@storybook/client-logger": "7.1.0-alpha.12",
"@storybook/components": "7.1.0-alpha.12",
"@storybook/core-events": "7.1.0-alpha.12",
"@storybook/addon-highlight": "7.1.0-alpha.14",
"@storybook/channels": "7.1.0-alpha.14",
"@storybook/client-logger": "7.1.0-alpha.14",
"@storybook/components": "7.1.0-alpha.14",
"@storybook/core-events": "7.1.0-alpha.14",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "7.1.0-alpha.12",
"@storybook/preview-api": "7.1.0-alpha.12",
"@storybook/theming": "7.1.0-alpha.12",
"@storybook/types": "7.1.0-alpha.12",
"@storybook/manager-api": "7.1.0-alpha.14",
"@storybook/preview-api": "7.1.0-alpha.14",
"@storybook/theming": "7.1.0-alpha.14",
"@storybook/types": "7.1.0-alpha.14",
"axe-core": "^4.2.0",
"lodash": "^4.17.21",
"react-resize-detector": "^7.1.2"
Expand Down Expand Up @@ -104,7 +104,7 @@
"./src/preview.tsx"
]
},
"gitHead": "8de6963fca74d5952f5cb5737e34fb4e1ddfd0f6",
"gitHead": "72ae6b0d965d1ae596159cdb15109c5e13376d78",
"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.1.0-alpha.12",
"version": "7.1.0-alpha.14",
"description": "Get UI feedback when an action is performed on an interactive element",
"keywords": [
"storybook",
Expand Down Expand Up @@ -80,14 +80,14 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/client-logger": "7.1.0-alpha.12",
"@storybook/components": "7.1.0-alpha.12",
"@storybook/core-events": "7.1.0-alpha.12",
"@storybook/client-logger": "7.1.0-alpha.14",
"@storybook/components": "7.1.0-alpha.14",
"@storybook/core-events": "7.1.0-alpha.14",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "7.1.0-alpha.12",
"@storybook/preview-api": "7.1.0-alpha.12",
"@storybook/theming": "7.1.0-alpha.12",
"@storybook/types": "7.1.0-alpha.12",
"@storybook/manager-api": "7.1.0-alpha.14",
"@storybook/preview-api": "7.1.0-alpha.14",
"@storybook/theming": "7.1.0-alpha.14",
"@storybook/types": "7.1.0-alpha.14",
"dequal": "^2.0.2",
"lodash": "^4.17.21",
"polished": "^4.2.2",
Expand Down Expand Up @@ -125,7 +125,7 @@
"./src/preview.ts"
]
},
"gitHead": "8de6963fca74d5952f5cb5737e34fb4e1ddfd0f6",
"gitHead": "72ae6b0d965d1ae596159cdb15109c5e13376d78",
"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.1.0-alpha.12",
"version": "7.1.0-alpha.14",
"description": "Switch backgrounds to view components in different settings",
"keywords": [
"addon",
Expand Down Expand Up @@ -76,14 +76,14 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/client-logger": "7.1.0-alpha.12",
"@storybook/components": "7.1.0-alpha.12",
"@storybook/core-events": "7.1.0-alpha.12",
"@storybook/client-logger": "7.1.0-alpha.14",
"@storybook/components": "7.1.0-alpha.14",
"@storybook/core-events": "7.1.0-alpha.14",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "7.1.0-alpha.12",
"@storybook/preview-api": "7.1.0-alpha.12",
"@storybook/theming": "7.1.0-alpha.12",
"@storybook/types": "7.1.0-alpha.12",
"@storybook/manager-api": "7.1.0-alpha.14",
"@storybook/preview-api": "7.1.0-alpha.14",
"@storybook/theming": "7.1.0-alpha.14",
"@storybook/types": "7.1.0-alpha.14",
"memoizerific": "^1.11.3",
"ts-dedent": "^2.0.0"
},
Expand Down Expand Up @@ -112,7 +112,7 @@
"./src/preview.tsx"
]
},
"gitHead": "8de6963fca74d5952f5cb5737e34fb4e1ddfd0f6",
"gitHead": "72ae6b0d965d1ae596159cdb15109c5e13376d78",
"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.1.0-alpha.12",
"version": "7.1.0-alpha.14",
"description": "Interact with component inputs dynamically in the Storybook UI",
"keywords": [
"addon",
Expand Down Expand Up @@ -68,15 +68,15 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/blocks": "7.1.0-alpha.12",
"@storybook/client-logger": "7.1.0-alpha.12",
"@storybook/components": "7.1.0-alpha.12",
"@storybook/core-common": "7.1.0-alpha.12",
"@storybook/manager-api": "7.1.0-alpha.12",
"@storybook/node-logger": "7.1.0-alpha.12",
"@storybook/preview-api": "7.1.0-alpha.12",
"@storybook/theming": "7.1.0-alpha.12",
"@storybook/types": "7.1.0-alpha.12",
"@storybook/blocks": "7.1.0-alpha.14",
"@storybook/client-logger": "7.1.0-alpha.14",
"@storybook/components": "7.1.0-alpha.14",
"@storybook/core-common": "7.1.0-alpha.14",
"@storybook/manager-api": "7.1.0-alpha.14",
"@storybook/node-logger": "7.1.0-alpha.14",
"@storybook/preview-api": "7.1.0-alpha.14",
"@storybook/theming": "7.1.0-alpha.14",
"@storybook/types": "7.1.0-alpha.14",
"lodash": "^4.17.21",
"ts-dedent": "^2.0.0"
},
Expand All @@ -102,7 +102,7 @@
],
"platform": "browser"
},
"gitHead": "8de6963fca74d5952f5cb5737e34fb4e1ddfd0f6",
"gitHead": "72ae6b0d965d1ae596159cdb15109c5e13376d78",
"storybook": {
"displayName": "Controls",
"icon": "https://user-images.githubusercontent.com/263385/101991669-479cc600-3c7c-11eb-93d9-38b67e8371f2.png",
Expand Down
26 changes: 13 additions & 13 deletions code/addons/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-docs",
"version": "7.1.0-alpha.12",
"version": "7.1.0-alpha.14",
"description": "Document component usage and properties in Markdown",
"keywords": [
"addon",
Expand Down Expand Up @@ -99,19 +99,19 @@
"dependencies": {
"@jest/transform": "^29.3.1",
"@mdx-js/react": "^2.1.5",
"@storybook/blocks": "7.1.0-alpha.12",
"@storybook/client-logger": "7.1.0-alpha.12",
"@storybook/components": "7.1.0-alpha.12",
"@storybook/csf-plugin": "7.1.0-alpha.12",
"@storybook/csf-tools": "7.1.0-alpha.12",
"@storybook/blocks": "7.1.0-alpha.14",
"@storybook/client-logger": "7.1.0-alpha.14",
"@storybook/components": "7.1.0-alpha.14",
"@storybook/csf-plugin": "7.1.0-alpha.14",
"@storybook/csf-tools": "7.1.0-alpha.14",
"@storybook/global": "^5.0.0",
"@storybook/mdx2-csf": "^1.0.0",
"@storybook/node-logger": "7.1.0-alpha.12",
"@storybook/postinstall": "7.1.0-alpha.12",
"@storybook/preview-api": "7.1.0-alpha.12",
"@storybook/react-dom-shim": "7.1.0-alpha.12",
"@storybook/theming": "7.1.0-alpha.12",
"@storybook/types": "7.1.0-alpha.12",
"@storybook/node-logger": "7.1.0-alpha.14",
"@storybook/postinstall": "7.1.0-alpha.14",
"@storybook/preview-api": "7.1.0-alpha.14",
"@storybook/react-dom-shim": "7.1.0-alpha.14",
"@storybook/theming": "7.1.0-alpha.14",
"@storybook/types": "7.1.0-alpha.14",
"fs-extra": "^11.1.0",
"remark-external-links": "^8.0.0",
"remark-slug": "^6.0.0",
Expand Down Expand Up @@ -141,7 +141,7 @@
"@storybook/mdx1-csf"
]
},
"gitHead": "8de6963fca74d5952f5cb5737e34fb4e1ddfd0f6",
"gitHead": "72ae6b0d965d1ae596159cdb15109c5e13376d78",
"storybook": {
"displayName": "Docs",
"icon": "https://user-images.githubusercontent.com/263385/101991672-48355c80-3c7c-11eb-82d9-95fa12438f64.png",
Expand Down
32 changes: 16 additions & 16 deletions code/addons/essentials/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-essentials",
"version": "7.1.0-alpha.12",
"version": "7.1.0-alpha.14",
"description": "Curated addons to bring out the best of Storybook",
"keywords": [
"addon",
Expand Down Expand Up @@ -119,23 +119,23 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/addon-actions": "7.1.0-alpha.12",
"@storybook/addon-backgrounds": "7.1.0-alpha.12",
"@storybook/addon-controls": "7.1.0-alpha.12",
"@storybook/addon-docs": "7.1.0-alpha.12",
"@storybook/addon-highlight": "7.1.0-alpha.12",
"@storybook/addon-measure": "7.1.0-alpha.12",
"@storybook/addon-outline": "7.1.0-alpha.12",
"@storybook/addon-toolbars": "7.1.0-alpha.12",
"@storybook/addon-viewport": "7.1.0-alpha.12",
"@storybook/core-common": "7.1.0-alpha.12",
"@storybook/manager-api": "7.1.0-alpha.12",
"@storybook/node-logger": "7.1.0-alpha.12",
"@storybook/preview-api": "7.1.0-alpha.12",
"@storybook/addon-actions": "7.1.0-alpha.14",
"@storybook/addon-backgrounds": "7.1.0-alpha.14",
"@storybook/addon-controls": "7.1.0-alpha.14",
"@storybook/addon-docs": "7.1.0-alpha.14",
"@storybook/addon-highlight": "7.1.0-alpha.14",
"@storybook/addon-measure": "7.1.0-alpha.14",
"@storybook/addon-outline": "7.1.0-alpha.14",
"@storybook/addon-toolbars": "7.1.0-alpha.14",
"@storybook/addon-viewport": "7.1.0-alpha.14",
"@storybook/core-common": "7.1.0-alpha.14",
"@storybook/manager-api": "7.1.0-alpha.14",
"@storybook/node-logger": "7.1.0-alpha.14",
"@storybook/preview-api": "7.1.0-alpha.14",
"ts-dedent": "^2.0.0"
},
"devDependencies": {
"@storybook/vue": "7.1.0-alpha.12",
"@storybook/vue": "7.1.0-alpha.14",
"typescript": "^4.9.3"
},
"peerDependencies": {
Expand Down Expand Up @@ -166,5 +166,5 @@
],
"platform": "node"
},
"gitHead": "8de6963fca74d5952f5cb5737e34fb4e1ddfd0f6"
"gitHead": "72ae6b0d965d1ae596159cdb15109c5e13376d78"
}
6 changes: 3 additions & 3 deletions code/addons/gfm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-mdx-gfm",
"version": "7.1.0-alpha.12",
"version": "7.1.0-alpha.14",
"description": "GitHub Flavored Markdown in Storybook",
"keywords": [
"addon",
Expand Down Expand Up @@ -51,7 +51,7 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/node-logger": "7.1.0-alpha.12",
"@storybook/node-logger": "7.1.0-alpha.14",
"remark-gfm": "^3.0.1",
"ts-dedent": "^2.0.0"
},
Expand All @@ -69,5 +69,5 @@
"cjs"
]
},
"gitHead": "8de6963fca74d5952f5cb5737e34fb4e1ddfd0f6"
"gitHead": "72ae6b0d965d1ae596159cdb15109c5e13376d78"
}

0 comments on commit 81677e5

Please sign in to comment.