Skip to content

Commit

Permalink
Merge branch 'next' into fix-button-story-typo
Browse files Browse the repository at this point in the history
  • Loading branch information
jonniebigodes authored Jul 12, 2024
2 parents 20fc543 + cbf921a commit 0704c83
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 17 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 8.2.2

- CPC: Add `ESM` export to `docs-tools` & `node-logger` packages - [#28539](https://github.com/storybookjs/storybook/pull/28539), thanks @ndelangen!
- CPC: Fix missing dependency in `@storybook/addon-interactions` - [#28518](https://github.com/storybookjs/storybook/pull/28518), thanks @ndelangen!
- CPC: Revert renames of panels, addon_ids - [#28524](https://github.com/storybookjs/storybook/pull/28524), thanks @ndelangen!

## 8.2.1

- CPC: Fix type generation - [#28507](https://github.com/storybookjs/storybook/pull/28507), thanks @ndelangen!
Expand Down
9 changes: 9 additions & 0 deletions code/addons/docs/src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ async function webpack(
*/
const cliPath = require.resolve('storybook/package.json');
const themingPath = join(cliPath, '..', 'core', 'theming', 'index.js');
const themingCreatePath = join(cliPath, 'core', 'theming', 'create.js');

const componentsPath = join(cliPath, '..', 'core', 'components', 'index.js');
const blocksPath = dirname(require.resolve('@storybook/blocks/package.json'));
if (Array.isArray(webpackConfig.resolve?.alias)) {
Expand All @@ -87,6 +89,10 @@ async function webpack(
name: '@mdx-js/react',
alias: mdx,
},
{
name: '@storybook/theming/create',
alias: themingCreatePath,
},
{
name: '@storybook/theming',
alias: themingPath,
Expand All @@ -104,6 +110,7 @@ async function webpack(
alias = {
...webpackConfig.resolve?.alias,
react,
'@storybook/theming/create': themingCreatePath,
'@storybook/theming': themingPath,
'@storybook/components': componentsPath,
'@storybook/blocks': blocksPath,
Expand Down Expand Up @@ -168,6 +175,7 @@ export const viteFinal = async (config: any, options: Options) => {

const cliPath = dirname(require.resolve('storybook/package.json'));
const themingPath = join(cliPath, 'core', 'theming', 'index.js');
const themingCreatePath = join(cliPath, 'core', 'theming', 'create.js');
const componentsPath = join(cliPath, 'core', 'components', 'index.js');
const blocksPath = dirname(require.resolve('@storybook/blocks/package.json'));

Expand All @@ -187,6 +195,7 @@ export const viteFinal = async (config: any, options: Options) => {
*
* In the future the `@storybook/theming` and `@storybook/components` can be removed, as they should be singletons in the future due to the peerDependency on `storybook` package.
*/
'@storybook/theming/create': themingCreatePath,
'@storybook/theming': themingPath,
'@storybook/components': componentsPath,
'@storybook/blocks': blocksPath,
Expand Down
2 changes: 1 addition & 1 deletion code/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-scroll-area": "^1.0.5",
"@radix-ui/react-slot": "^1.0.2",
"@storybook/docs-mdx": "3.1.0-next.0",
"@storybook/docs-mdx": "4.0.0-next.0",
"@storybook/global": "^5.0.0",
"@storybook/icons": "^1.2.5",
"@tanstack/react-virtual": "^3.3.0",
Expand Down
4 changes: 2 additions & 2 deletions code/core/src/core-server/utils/StoryIndexGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { commonGlobOptions, normalizeStoryPath } from '@storybook/core/common';
import { logger, once } from '@storybook/core/node-logger';
import { getStorySortParameter, loadConfig } from '@storybook/core/csf-tools';
import { storyNameFromExport, toId, combineTags } from '@storybook/csf';
import { analyze } from '@storybook/docs-mdx';
import { dedent } from 'ts-dedent';
import { autoName } from './autoName';
import { IndexingError, MultipleIndexingError } from './IndexingError';
Expand Down Expand Up @@ -408,7 +407,8 @@ export class StoryIndexGenerator {

const content = await fs.readFile(absolutePath, 'utf8');

const result = analyze(content);
const { analyze } = await import('@storybook/docs-mdx');
const result = await analyze(content);

// Templates are not indexed
if (result.isTemplate) return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,7 @@ type UnwrappedJSXStoryRef = {
__pw_type: 'jsx';
type: UnwrappedImportStoryRef;
};
type UnwrappedImportStoryRef = ComposedStoryFn & {
playPromise?: Promise<void>;
renderingEnded?: PromiseWithResolvers<void>;
};
type UnwrappedImportStoryRef = ComposedStoryFn;

declare global {
function __pwUnwrapObject(
Expand Down
2 changes: 1 addition & 1 deletion code/lib/cli/src/sandbox-templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ const baseTemplates = {
},
'qwik-vite/default-ts': {
name: 'Qwik CLI Latest (Vite | TypeScript)',
script: 'npm create qwik basic {{beforeDir}}',
script: 'npm create qwik playground {{beforeDir}}',
// TODO: The community template does not provide standard stories, which is required for e2e tests. Reenable once it does.
inDevelopment: true,
expected: {
Expand Down
2 changes: 1 addition & 1 deletion code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
},
"husky": {
"hooks": {
"pre-commit": "yarn lint-staged"
"pre-commit": "if [ -z \"$SKIP_STORYBOOK_GIT_HOOKS\" ]; then yarn storybook:lint; fi"
}
},
"lint-staged": {
Expand Down
14 changes: 8 additions & 6 deletions code/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5758,7 +5758,7 @@ __metadata:
"@radix-ui/react-scroll-area": "npm:^1.0.5"
"@radix-ui/react-slot": "npm:^1.0.2"
"@storybook/csf": "npm:0.1.11"
"@storybook/docs-mdx": "npm:3.1.0-next.0"
"@storybook/docs-mdx": "npm:4.0.0-next.0"
"@storybook/global": "npm:^5.0.0"
"@storybook/icons": "npm:^1.2.5"
"@tanstack/react-virtual": "npm:^3.3.0"
Expand Down Expand Up @@ -5911,10 +5911,12 @@ __metadata:
languageName: node
linkType: hard

"@storybook/docs-mdx@npm:3.1.0-next.0":
version: 3.1.0-next.0
resolution: "@storybook/docs-mdx@npm:3.1.0-next.0"
checksum: 10c0/7622d7c6318e842c90a71c1836d68531236c31fff7081c885803eddfafb7e3f8998689f612eaa0292209ada8352a36657dcacb5d3ef4632b8e8b8a283c39602e
"@storybook/docs-mdx@npm:4.0.0-next.0":
version: 4.0.0-next.0
resolution: "@storybook/docs-mdx@npm:4.0.0-next.0"
dependencies:
acorn: "npm:^8.12.1"
checksum: 10c0/6253361e4e3c6c716c4f4c8cc30c082bcdab66b35b30183f6574d94720d875e28927916be8bda0bff4987090c3e50d348ca898160b1812a90c5afa845400414e
languageName: node
linkType: hard

Expand Down Expand Up @@ -9241,7 +9243,7 @@ __metadata:
languageName: node
linkType: hard

"acorn@npm:^8.0.0, acorn@npm:^8.10.0, acorn@npm:^8.11.2, acorn@npm:^8.11.3, acorn@npm:^8.4.1, acorn@npm:^8.6.0, acorn@npm:^8.7.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0":
"acorn@npm:^8.0.0, acorn@npm:^8.10.0, acorn@npm:^8.11.2, acorn@npm:^8.11.3, acorn@npm:^8.12.1, acorn@npm:^8.4.1, acorn@npm:^8.6.0, acorn@npm:^8.7.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0":
version: 8.12.1
resolution: "acorn@npm:8.12.1"
bin:
Expand Down
9 changes: 7 additions & 2 deletions scripts/upload-bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,13 @@ const uploadBench = async () => {
const appTable = dataset.table('bench2');

async function uploadToGithub() {
if (templateKey !== 'bench/react-vite-default-ts') {
console.log('skip uploading results to github because we can only upload 1 result per PR.');
if (
!prNumber ||
!baseBranch ||
prNumber === '0' ||
templateKey !== 'bench/react-vite-default-ts'
) {
console.log('skip uploading results to github');
return;
}
const [[base]]: any[] = await appTable.query({
Expand Down

0 comments on commit 0704c83

Please sign in to comment.