Skip to content

Commit

Permalink
Merge branch 'next' into norbert/downgrade-playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen authored Feb 1, 2024
2 parents b8411a7 + d035de1 commit 1157b70
Show file tree
Hide file tree
Showing 18 changed files with 142 additions and 462 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/cron-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@ jobs:
use-quiet-mode: 'yes'
# output full HTTP info for broken links
use-verbose-mode: 'yes'
config-file: '.github/workflows/markdown-link-check-config.json'
config-file: '.github/workflows/markdown-link-check-config.json'
# Notify to Discord channel on failure
- name: Send Discord Notification
if: failure() # Only run this step if previous steps failed
run: |
curl -H "Content-Type: application/json" -X POST -d '{"content":"The Markdown Links Check workflow has failed in the repository: [storybook]"}' ${{ secrets.DISCORD_MONITORING_URL }}
4 changes: 2 additions & 2 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ Example:
import { addons, types } from "@storybook/manager-api";

addons.register("my-addon", () => {
addons.add("my-addon/panel", {
addons.add("my-addon/tab", {
type: types.TAB,
title: "My Addon",
render: () => <div>Hello World</div>,
Expand All @@ -1092,7 +1092,7 @@ addons.register("my-addon", () => {
addons.add("my-addon/tool", {
type: types.TOOL,
title: "My Addon",
match: ({ tabId }) => tabId === "my-addon/panel",
match: ({ tabId }) => tabId === "my-addon/tab",
render: () => <div>👀</div>,
});
});
Expand Down
3 changes: 2 additions & 1 deletion code/e2e-tests/addon-docs.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ test.describe('addon-docs', () => {
await expect(anotherStory).toContainText('Another button, just to show multiple stories');
});

test('should show source=code view for stories', async ({ page }) => {
// FIXME - get rid of the flake
test.skip('should show source=code view for stories', async ({ page }) => {
const skipped = [
// SSv6 does not render stories in the correct order in our sandboxes
'internal\\/ssv6',
Expand Down
3 changes: 2 additions & 1 deletion code/e2e-tests/tags.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { SbPage } from './util';

const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001';

test.describe('tags', () => {
// FIXME - get rid of the flake
test.describe.skip('tags', () => {
test.beforeEach(async ({ page }) => {
await page.goto(storybookUrl);
await new SbPage(page).waitUntilLoaded();
Expand Down
2 changes: 1 addition & 1 deletion code/lib/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"@types/cross-spawn": "^6.0.2",
"@types/prompts": "^2.0.9",
"@types/util-deprecate": "^1.0.0",
"boxen": "^5.1.2",
"boxen": "^7.1.1",
"slash": "^5.0.0",
"strip-json-comments": "^3.1.1",
"typescript": "^5.3.2"
Expand Down
11 changes: 6 additions & 5 deletions code/lib/cli/src/automigrate/fixes/react-docgen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ export const reactDocgen: Fix<Options> = {
but "typescript.reactDocgen" is unset.
In Storybook 8.0, we changed the default React docgen analysis from
"react-docgen-typescript" to "react-docgen", which dramatically faster
but doesn't handle all TypeScript constructs.
We can update your config to continue to use "react-docgen-typescript",
though we recommend giving "react-docgen" for a much faster dev experience.
"react-docgen-typescript" to "react-docgen". We recommend "react-docgen"
for most projects, since it is dramatically faster. However, it doesn't
handle all TypeScript constructs, and may generate different results
than "react-docgen-typescript".
Should we update your config to continue to use "react-docgen-typescript"?
https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#react-docgen-component-analysis-by-default
`;
Expand Down
16 changes: 9 additions & 7 deletions code/lib/cli/src/generators/baseGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export async function baseGenerator(
);

const {
extraAddons: extraAddonPackages,
extraAddons: extraAddonPackages = [],
extraPackages,
staticDir,
addScripts,
Expand All @@ -222,21 +222,23 @@ export async function baseGenerator(
})
: extraAddonPackages;

// added to main.js
const addons = [
extraAddonsToInstall.push(
'@storybook/addon-links',
'@storybook/addon-essentials',
'@chromatic-com/storybook@^1'
);

// added to main.js
const addons = [
...(compiler ? [`@storybook/addon-webpack5-compiler-${compiler}`] : []),
...stripVersions(extraAddonsToInstall || []),
...stripVersions(extraAddonsToInstall),
].filter(Boolean);

// added to package.json
const addonPackages = [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/blocks',
...(compiler ? [`@storybook/addon-webpack5-compiler-${compiler}`] : []),
...(extraAddonsToInstall || []),
...extraAddonsToInstall,
].filter(Boolean);

// TODO: migrate template stories in solid and qwik to use @storybook/test
Expand Down
2 changes: 1 addition & 1 deletion code/lib/core-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"@types/ip": "^1.1.0",
"@types/node-fetch": "^2.5.7",
"@types/ws": "^8",
"boxen": "^5.1.2",
"boxen": "^7.1.1",
"node-fetch": "^3.3.1",
"slash": "^5.0.0",
"typescript": "^5.3.2"
Expand Down
Loading

0 comments on commit 1157b70

Please sign in to comment.