Skip to content

Commit

Permalink
Merge branch 'next' into make-font-failed-to-load-error-message-useful
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Sep 18, 2023
2 parents 668a65a + 04ced71 commit a941216
Show file tree
Hide file tree
Showing 200 changed files with 5,048 additions and 3,938 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/**/.yarn/** linguist-generated
* -text
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
## 7.4.2

- Addon API: Improve the updateStatus API - [#24007](https://github.com/storybookjs/storybook/pull/24007), thanks [@ndelangen](https://github.com/ndelangen)!
- Nextjs: Migrate from config to previewAnnotations - [#24178](https://github.com/storybookjs/storybook/pull/24178), thanks [@yannbf](https://github.com/yannbf)!
- UI: Fix SVG override fill when path has a fill attribute - [#24156](https://github.com/storybookjs/storybook/pull/24156), thanks [@ndelangen](https://github.com/ndelangen)!
- UI: Improve look and feel of status UI in sidebar - [#24099](https://github.com/storybookjs/storybook/pull/24099), thanks [@ndelangen](https://github.com/ndelangen)!

## 7.4.1

- CLI: Add uncaughtException handler - [#24018](https://github.com/storybookjs/storybook/pull/24018), thanks [@yannbf](https://github.com/yannbf)!
- CLI: Fix packageManager handling in `sb add` - [#24079](https://github.com/storybookjs/storybook/pull/24079), thanks [@Integrayshaun](https://github.com/Integrayshaun)!
- Core: Add CJS entrypoints to errors in core events - [#24038](https://github.com/storybookjs/storybook/pull/24038), thanks [@yannbf](https://github.com/yannbf)!
- Docs: Fix TOC import - [#24047](https://github.com/storybookjs/storybook/pull/24047), thanks [@shilman](https://github.com/shilman)!
- Telemetry: Filter addon options to protect sensitive info - [#24000](https://github.com/storybookjs/storybook/pull/24000), thanks [@shilman](https://github.com/shilman)!
- Types: Remove `@types/react` dep from `@storybook/types` - [#24042](https://github.com/storybookjs/storybook/pull/24042), thanks [@JReinhold](https://github.com/JReinhold)!
- Vue3: Remove console.log in sourceDecorator - [#24062](https://github.com/storybookjs/storybook/pull/24062), thanks [@oruman](https://github.com/oruman)!

## 7.4.0

- Addon-docs: Resolve `mdx-react-shim` & `@storybook/global` correctly - [#23941](https://github.com/storybookjs/storybook/pull/23941), thanks [@ndelangen](https://github.com/ndelangen)!
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.prerelease.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 7.5.0-alpha.2

- Angular: Categorize legacy build options error - [#24014](https://github.com/storybookjs/storybook/pull/24014), thanks [@yannbf](https://github.com/yannbf)!
- Builder-Webpack5: Categorize builder error - [#24031](https://github.com/storybookjs/storybook/pull/24031), thanks [@yannbf](https://github.com/yannbf)!
- CI: Inform the user how to dedupe and strip color from info command - [#24087](https://github.com/storybookjs/storybook/pull/24087), thanks [@kasperpeulen](https://github.com/kasperpeulen)!
- CLI: Fix packageManager handling in `sb add` - [#24079](https://github.com/storybookjs/storybook/pull/24079), thanks [@Integrayshaun](https://github.com/Integrayshaun)!
- CLI: Improve sanitization logic in crash reports - [#24028](https://github.com/storybookjs/storybook/pull/24028), thanks [@yannbf](https://github.com/yannbf)!
- Maintenance: Add more context to explanation in core-events errors - [#24063](https://github.com/storybookjs/storybook/pull/24063), thanks [@yannbf](https://github.com/yannbf)!
- Monorepo: Fix `svelte-vite` detection - [#24085](https://github.com/storybookjs/storybook/pull/24085), thanks [@legnaleurc](https://github.com/legnaleurc)!
- NextJS: Fix Image Context reuse (ensure singleton by externalizing it) - [#23881](https://github.com/storybookjs/storybook/pull/23881), thanks [@martinnabhan](https://github.com/martinnabhan)!
- Source-loader: Fix property key validation - [#24068](https://github.com/storybookjs/storybook/pull/24068), thanks [@MrZillaGold](https://github.com/MrZillaGold)!
- Svelte: Fix generated properties on Svelte event handler - [#24020](https://github.com/storybookjs/storybook/pull/24020), thanks [@j3rem1e](https://github.com/j3rem1e)!
- Telemetry: Add platform info to telemetry event - [#24081](https://github.com/storybookjs/storybook/pull/24081), thanks [@yannbf](https://github.com/yannbf)!
- UI: Fix target id in searchfield label - [#23464](https://github.com/storybookjs/storybook/pull/23464), thanks [@plumpNation](https://github.com/plumpNation)!
- Vue3: Remove console.log in sourceDecorator - [#24062](https://github.com/storybookjs/storybook/pull/24062), thanks [@oruman](https://github.com/oruman)!

## 7.5.0-alpha.1

- Core: Add CJS entrypoints to errors in core events - [#24038](https://github.com/storybookjs/storybook/pull/24038), thanks [@yannbf](https://github.com/yannbf)!
Expand Down
2 changes: 1 addition & 1 deletion 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.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Test component compliance with web accessibility standards",
"keywords": [
"a11y",
Expand Down
4 changes: 2 additions & 2 deletions code/addons/a11y/src/components/Report/HighlightToggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function areAllRequiredElementsHighlighted(
highlighted: string[]
): CheckBoxStates {
const highlightedCount = elementsToHighlight.filter((item) =>
highlighted.includes(item.target[0])
highlighted.includes(item.target[0] as any)
).length;

// eslint-disable-next-line no-nested-ternary
Expand Down Expand Up @@ -52,7 +52,7 @@ const HighlightToggle: React.FC<ToggleProps> = ({ toggleId, elementsToHighlight

const handleToggle = React.useCallback((): void => {
toggleHighlight(
elementsToHighlight.map((e) => e.target[0]),
elementsToHighlight.map((e) => e.target[0] as any),
checkBoxState !== CheckBoxStates.CHECKED
);
}, [elementsToHighlight, checkBoxState, toggleHighlight]);
Expand Down
2 changes: 1 addition & 1 deletion 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.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Get UI feedback when an action is performed on an interactive element",
"keywords": [
"storybook",
Expand Down
2 changes: 1 addition & 1 deletion 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.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Switch backgrounds to view components in different settings",
"keywords": [
"addon",
Expand Down
2 changes: 1 addition & 1 deletion 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.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Interact with component inputs dynamically in the Storybook UI",
"keywords": [
"addon",
Expand Down
2 changes: 1 addition & 1 deletion 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.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Document component usage and properties in Markdown",
"keywords": [
"addon",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/docs/src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ async function webpack(

export const createStoriesMdxIndexer = (legacyMdx1?: boolean): Indexer => ({
test: /(stories|story)\.mdx$/,
index: async (fileName, opts) => {
createIndex: async (fileName, opts) => {
let code = (await fs.readFile(fileName, 'utf-8')).toString();
const { compile } = legacyMdx1
? await import('@storybook/mdx1-csf')
Expand Down
2 changes: 1 addition & 1 deletion 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.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Curated addons to bring out the best of Storybook",
"keywords": [
"addon",
Expand Down
2 changes: 1 addition & 1 deletion 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.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "GitHub Flavored Markdown in Storybook",
"keywords": [
"addon",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/highlight/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-highlight",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Highlight DOM nodes within your stories",
"keywords": [
"storybook-addons",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/interactions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-interactions",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Automate, test and debug user interactions",
"keywords": [
"storybook-addons",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/jest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-jest",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "React storybook addon that show component jest report",
"keywords": [
"addon",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/links/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-links",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Link stories together to build demos and prototypes with your UI components",
"keywords": [
"addon",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/measure/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-measure",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Inspect layouts by visualizing the box model",
"keywords": [
"storybook-addons",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/outline/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-outline",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Outline all elements with CSS to help with layout placement and alignment",
"keywords": [
"storybook-addons",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/storyshots-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-storyshots",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Take a code snapshot of every story automatically with Jest",
"keywords": [
"addon",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/storyshots-puppeteer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-storyshots-puppeteer",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Image snapshots addition to StoryShots based on puppeteer",
"keywords": [
"addon",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/storysource/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-storysource",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "View a story’s source code to see how it works and paste into your app",
"keywords": [
"addon",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/themes/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-themes",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Switch between multiple themes for you components in Storybook",
"keywords": [
"css",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/toolbars/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-toolbars",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Create your own toolbar items that control story rendering",
"keywords": [
"addon",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/viewport/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-viewport",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Build responsive components by adjusting Storybook’s viewport size and orientation",
"keywords": [
"addon",
Expand Down
2 changes: 1 addition & 1 deletion code/builders/builder-manager/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/builder-manager",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Storybook manager builder",
"keywords": [
"storybook"
Expand Down
4 changes: 3 additions & 1 deletion code/builders/builder-manager/src/utils/files.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { OutputFile } from 'esbuild';
import { platform } from 'os';
import { sanitizePath } from './files';

Expand All @@ -9,12 +10,13 @@ test('sanitizePath', () => {
? 'C:\\Users\\username\\Projects\\projectname\\storybook'
: '/Users/username/Projects/projectname/storybook';
const text = 'demo text';
const file = {
const file: OutputFile = {
path: isWindows
? 'C:\\Users\\username\\Projects\\projectname\\storybook\\node_modules\\@storybook\\addon-x+y\\dist\\manager.js'
: '/Users/username/Projects/projectname/storybook/node_modules/@storybook/addon-x+y/dist/manager.js',
contents: Uint8Array.from(Array.from(text).map((letter) => letter.charCodeAt(0))),
text,
hash: '',
};
const { location, url } = sanitizePath(file, addonsDir);

Expand Down
2 changes: 1 addition & 1 deletion code/builders/builder-vite/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/builder-vite",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "A plugin to run and build Storybooks with Vite",
"homepage": "https://github.com/storybookjs/storybook/tree/next/code/builders/builder-vite/#readme",
"bugs": {
Expand Down
4 changes: 2 additions & 2 deletions code/builders/builder-webpack5/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/builder-webpack5",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Storybook framework-agnostic API",
"keywords": [
"storybook"
Expand Down Expand Up @@ -65,7 +65,7 @@
"@storybook/node-logger": "workspace:*",
"@storybook/preview": "workspace:*",
"@storybook/preview-api": "workspace:*",
"@swc/core": "^1.3.49",
"@swc/core": "^1.3.82",
"@types/node": "^16.0.0",
"@types/semver": "^7.3.4",
"babel-loader": "^9.0.0",
Expand Down
2 changes: 1 addition & 1 deletion code/deprecated/addons/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addons",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Storybook addons store",
"keywords": [
"storybook"
Expand Down
2 changes: 1 addition & 1 deletion code/deprecated/channel-postmessage/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/channel-postmessage",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "",
"keywords": [
"storybook"
Expand Down
2 changes: 1 addition & 1 deletion code/deprecated/channel-websocket/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/channel-websocket",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "",
"keywords": [
"storybook"
Expand Down
2 changes: 1 addition & 1 deletion code/deprecated/client-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/client-api",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Storybook Client API",
"keywords": [
"storybook"
Expand Down
2 changes: 1 addition & 1 deletion code/deprecated/core-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/core-client",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Storybook framework-agnostic API",
"keywords": [
"storybook"
Expand Down
2 changes: 1 addition & 1 deletion code/deprecated/manager-api-shim/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/api",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Storybook Manager API (facade)",
"keywords": [
"storybook"
Expand Down
2 changes: 1 addition & 1 deletion code/deprecated/preview-web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/preview-web",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "",
"keywords": [
"storybook"
Expand Down
2 changes: 1 addition & 1 deletion code/deprecated/store/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/store",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "",
"keywords": [
"storybook"
Expand Down
2 changes: 1 addition & 1 deletion code/frameworks/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/angular",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Storybook for Angular: Develop Angular components in isolation with hot reloading.",
"keywords": [
"storybook",
Expand Down
2 changes: 1 addition & 1 deletion code/frameworks/ember/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/ember",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Storybook for Ember: Develop Ember Component in isolation with Hot Reloading.",
"homepage": "https://github.com/storybookjs/storybook/tree/next/code/frameworks/ember",
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion code/frameworks/html-vite/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/html-vite",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Storybook for HTML and Vite: Develop HTML in isolation with Hot Reloading.",
"keywords": [
"storybook"
Expand Down
2 changes: 1 addition & 1 deletion code/frameworks/html-webpack5/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/html-webpack5",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.",
"keywords": [
"storybook"
Expand Down
2 changes: 1 addition & 1 deletion code/frameworks/nextjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/nextjs",
"version": "7.5.0-alpha.1",
"version": "7.5.0-alpha.2",
"description": "Storybook for Next.js",
"keywords": [
"storybook",
Expand Down
2 changes: 1 addition & 1 deletion code/frameworks/nextjs/src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const core: PresetProperty<'core', StorybookConfig> = async (config, opti
};
};

export const config: StorybookConfig['previewAnnotations'] = (entry = []) => [
export const previewAnnotations: StorybookConfig['previewAnnotations'] = (entry = []) => [
...entry,
require.resolve('@storybook/nextjs/preview.js'),
];
Expand Down
1 change: 1 addition & 0 deletions code/frameworks/nextjs/src/routing/app-router-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const AppRouterProvider: React.FC<AppRouterProviderProps> = ({ children, action,
apply: false,
hashFragment: null,
segmentPaths: [tree],
onlyHashChange: false,
},
nextUrl: pathname,
}}
Expand Down
Loading

0 comments on commit a941216

Please sign in to comment.