-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release: Prerelease 8.6.0-alpha.4 #30439
Merged
Merged
Changes from 4 commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
d88c49b
Docs: Add Preact-vite framework docs
shilman d2257ae
upgrade typescript
ndelangen 5c2ac4a
reset the public use of typescript to broader version range
ndelangen 1c4015a
fixes
ndelangen eb293ac
attempt fixes
ndelangen 1fdd771
related upgrades
ndelangen c60a752
fix mismatching peerDep on vite in svelte
ndelangen 0afec40
bump versions in lockfile
ndelangen 5137a26
docs: Update Next.js Tailwind example link
yatishgoel 6ffe9b1
Merge branch 'next' into fix/nextjs-tailwind-link
yatishgoel c5674a8
Merge branch 'next' into norbert/typescript-upgrade
ndelangen c4c3c91
fix lockfiles
ndelangen a5ef270
make types checks less strict
ndelangen 2543eb1
use verbatimModuleSyntax in svelte renderer
JReinhold e12c1d4
Merge branch 'norbert/typescript-upgrade' of github.com:storybookjs/s…
JReinhold 84fe244
fix
ndelangen 08832a8
fix svelte type test
JReinhold 86f6f30
Merge branch 'norbert/typescript-upgrade' of github.com:storybookjs/s…
JReinhold 581e837
improve
ndelangen c605c85
fix svelte type imports
JReinhold 3f0a7c5
Merge pull request #30354 from storybookjs/norbert/typescript-upgrade
ndelangen 08c24d2
Merge branch 'next' into fix/nextjs-tailwind-link
jonniebigodes 4c298be
Merge pull request #30412 from yatishgoel/fix/nextjs-tailwind-link
jonniebigodes 4aec7ef
Build: Add flag to skip nx cache
yannbf 0217bf9
Minor adjustments
jonniebigodes 1131282
Merge branch 'next' into shilman/preact-framework-page
shilman 4751127
Merge pull request #30271 from storybookjs/shilman/preact-framework-page
shilman d79d0cb
RNW-Vite: Fix typos
shilman dca5ced
Merge pull request #30437 from storybookjs/shilman/fix-rnw-vite-docs
shilman cc7d0f5
Vite: Fix add component UI invalidation
shilman 1c7bb67
Merge pull request #30438 from storybookjs/shilman/30431-fix-vite-add…
shilman ba47d3e
Update CHANGELOG.md for v8.5.3 [skip ci]
storybook-bot 6e0c6f1
Addon A11y: Make Vitest Axe optional
valentinpalkovic 8569d2c
Remove peer-dependency requirement
valentinpalkovic b2d8a3c
Merge pull request #30442 from storybookjs/valentin/make-vitest-axe-o…
valentinpalkovic 131285c
Build: Update NX
valentinpalkovic 0474454
Build: Set TypeScript resolution for sandbox generation
valentinpalkovic c95dc3c
Merge pull request #30433 from storybookjs/yann/add-nx-cache-skip
yannbf af66c82
Merge pull request #30460 from storybookjs/valentin/update-nx
valentinpalkovic 9c05f2b
Merge pull request #30461 from storybookjs/valentin/fix-local-sandbox…
valentinpalkovic 2e7da03
Builder-Vite: Add logic to set allowedHosts
JSMike 594ae92
UI: Fix default selected addon panel
shilman e80ab8d
Merge pull request #30464 from storybookjs/shilman/restore-default-se…
shilman cfedafb
Merge pull request #30432 from JSMike/issue-30338-vite-allowedHosts
shilman 2c62084
Write changelog for 8.6.0-alpha.4 [skip ci]
storybook-bot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,4 @@ | ||
# Storybook for Preact <!-- omit in toc --> | ||
# Storybook for Preact & Vite | ||
|
||
## Requirements | ||
|
||
- [Preact](https://preactjs.com/) >= 10.x | ||
- [Storybook](https://storybook.js.org/) >= 7.x | ||
|
||
## Getting Started | ||
|
||
### In a project without Storybook | ||
|
||
Follow the prompts after running this command in your Preact project's root directory: | ||
|
||
```bash | ||
npx storybook@latest init | ||
``` | ||
|
||
[More on getting started with Storybook](https://storybook.js.org/docs/get-started/install?renderer=preact) | ||
|
||
### In a project with Storybook | ||
|
||
This framework is designed to work with Storybook 7. If you’re not already using v7, upgrade with this command: | ||
|
||
```bash | ||
npx storybook@latest upgrade | ||
``` | ||
|
||
#### Manual migration | ||
|
||
Install the framework: | ||
|
||
```bash | ||
yarn add --dev @storybook/preact-vite | ||
``` | ||
|
||
Update your `main.js` to change the framework property: | ||
|
||
```js | ||
// .storybook/main.js | ||
export default { | ||
// ... | ||
framework: { | ||
name: '@storybook/preact-vite', // <- Change this | ||
options: {}, | ||
}, | ||
}; | ||
``` | ||
See [documentation](https://storybook.js.org/docs/get-started/frameworks/preact-vite?renderer=preact) for installation instructions, usage examples, APIs, and more. | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
```js filename=".storybook/main.js" renderer="preact" language="js" | ||
export default { | ||
// ... | ||
// framework: '@storybook/preact-webpack5', 👈 Remove this | ||
framework: '@storybook/preact-vite', // 👈 Add this | ||
}; | ||
``` | ||
|
||
```ts filename=".storybook/main.ts" renderer="preact" language="ts" | ||
import { StorybookConfig } from '@storybook/preact-vite'; | ||
|
||
const config: StorybookConfig = { | ||
// ... | ||
// framework: '@storybook/preact-webpack5', 👈 Remove this | ||
framework: '@storybook/preact-vite', // 👈 Add this | ||
}; | ||
|
||
export default config; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
```js filename=".storybook/main.js" renderer="preact" language="js" | ||
export default { | ||
framework: { | ||
name: '@storybook/preact-vite', | ||
options: { | ||
// ... | ||
}, | ||
}, | ||
}; | ||
``` | ||
|
||
```ts filename=".storybook/main.ts" renderer="preact" language="ts" | ||
import type { StorybookConfig } from '@storybook/preact-vite'; | ||
|
||
const config: StorybookConfig = { | ||
framework: { | ||
name: '@storybook/preact-vite', | ||
options: { | ||
// ... | ||
}, | ||
}, | ||
}; | ||
|
||
export default config; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
```shell renderer="preact" language="js" packageManager="npm" | ||
npm install --save-dev @storybook/preact-vite | ||
``` | ||
|
||
```shell renderer="preact" language="js" packageManager="pnpm" | ||
pnpm add --save-dev @storybook/preact-vite | ||
``` | ||
|
||
```shell renderer="preact" language="js" packageManager="yarn" | ||
yarn add --dev @storybook/preact-vite | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
--- | ||
title: Storybook for Preact & Vite | ||
sidebar: | ||
order: 3 | ||
title: Preact & Vite | ||
--- | ||
|
||
Storybook for Preact & Vite is a [framework](../../contribute/framework.mdx) that makes it easy to develop and test UI components in isolation for [Preact](https://preactjs.com/) applications built with [Vite](https://vitejs.dev/). It includes: | ||
|
||
* 🏎️ Pre-bundled for performance | ||
* 🪄 Zero config | ||
* 💫 and more! | ||
|
||
<If notRenderer="preact"> | ||
<Callout variant="info"> | ||
Storybook for Preact & Vite is only supported in [Preact](?renderer=preact) projects. | ||
</Callout> | ||
|
||
{/* End non-supported renderers */} | ||
</If> | ||
|
||
<If renderer="preact"> | ||
## Requirements | ||
|
||
* Preact 8.x || 10.x | ||
* Vite ≥ 4.0 | ||
* Storybook ≥ 8.0 | ||
|
||
## Getting started | ||
|
||
### In a project without Storybook | ||
|
||
Follow the prompts after running this command in your Preact project's root directory: | ||
|
||
{/* prettier-ignore-start */} | ||
|
||
<CodeSnippets path="init-command.md" /> | ||
|
||
{/* prettier-ignore-end */} | ||
|
||
[More on getting started with Storybook.](../install.mdx) | ||
|
||
### In a project with Storybook | ||
|
||
This framework is designed to work with Storybook 7+. If you’re not already using v7, upgrade with this command: | ||
|
||
{/* prettier-ignore-start */} | ||
|
||
<CodeSnippets path="storybook-upgrade.md" /> | ||
|
||
{/* prettier-ignore-end */} | ||
|
||
#### Automatic migration | ||
|
||
When running the `upgrade` command above, you should get a prompt asking you to migrate to `@storybook/preact-vite`, which should handle everything for you. In case that auto-migration does not work for your project, refer to the manual migration below. | ||
|
||
#### Manual migration | ||
|
||
First, install the framework: | ||
|
||
{/* prettier-ignore-start */} | ||
|
||
<CodeSnippets path="preact-vite-install.md" /> | ||
|
||
{/* prettier-ignore-end */} | ||
|
||
Then, update your `.storybook/main.js|ts` to change the framework property: | ||
|
||
{/* prettier-ignore-start */} | ||
|
||
<CodeSnippets path="preact-vite-add-framework.md" /> | ||
|
||
{/* prettier-ignore-end */} | ||
|
||
## API | ||
|
||
### Options | ||
|
||
You can pass an options object for additional configuration if needed: | ||
|
||
{/* prettier-ignore-start */} | ||
|
||
<CodeSnippets path="preact-vite-framework-options.md" /> | ||
|
||
{/* prettier-ignore-end */} | ||
|
||
#### `builder` | ||
|
||
Type: `Record<string, any>` | ||
|
||
Configure options for the [framework's builder](../../api/main-config/main-config-framework.mdx#optionsbuilder). For this framework, available options can be found in the [Vite builder docs](../../builders/vite.mdx). | ||
|
||
{/* End supported renderers */} | ||
</If> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
title: Storybook for React Native Web | ||
sidebar: | ||
order: 5 | ||
order: 6 | ||
title: React Native Web | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
title: Storybook for React & Vite | ||
sidebar: | ||
order: 3 | ||
order: 4 | ||
title: React & Vite | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
title: Storybook for React & Webpack | ||
sidebar: | ||
order: 4 | ||
order: 5 | ||
title: React & Webpack | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
title: Storybook for Svelte & Vite | ||
sidebar: | ||
order: 7 | ||
order: 8 | ||
title: Svelte & Vite | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
title: Storybook for Svelte & Webpack | ||
sidebar: | ||
order: 8 | ||
order: 9 | ||
title: Svelte & Webpack | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
title: Storybook for SvelteKit | ||
sidebar: | ||
order: 6 | ||
order: 7 | ||
title: SvelteKit | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
title: Storybook for Vue & Vite | ||
sidebar: | ||
order: 9 | ||
order: 10 | ||
title: Vue & Vite | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
title: Storybook for Vue & Webpack | ||
sidebar: | ||
order: 10 | ||
order: 11 | ||
title: Vue & Webpack | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
title: Storybook for Web components & Vite | ||
sidebar: | ||
order: 11 | ||
order: 12 | ||
title: Web components & Vite | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Consider adding more specific type information beyond Record<string, any>