Skip to content

Commit fe38896

Browse files
authored
Merge pull request #25270 from storybookjs/version-patch-from-7.6.6
Release: Patch 7.6.7
2 parents a3a9ca8 + 561b82c commit fe38896

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1315
-388
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 7.6.7
2+
3+
- Core: Skip no-framework error when ignorePreview=true - [#25286](https://github.com/storybookjs/storybook/pull/25286), thanks [@ndelangen](https://github.com/ndelangen)!
4+
- Dependencies: Semver dependency fixes - [#25283](https://github.com/storybookjs/storybook/pull/25283), thanks [@ndelangen](https://github.com/ndelangen)!
5+
- Vite: Fix pre-transform error in Vite 5 - [#25329](https://github.com/storybookjs/storybook/pull/25329), thanks [@yannbf](https://github.com/yannbf)!
6+
- Vue3: Fix pnp by making compiler-core a dependency - [#25311](https://github.com/storybookjs/storybook/pull/25311), thanks [@shilman](https://github.com/shilman)!
7+
18
## 7.6.6
29

310
- SvelteKit: Support 2.0 modules with mocks - [#25244](https://github.com/storybookjs/storybook/pull/25244), thanks [@paoloricciuti](https://github.com/paoloricciuti)!

code/builders/builder-vite/src/vite-server.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ export async function createViteServer(options: Options, devServer: Server) {
1111

1212
const config = {
1313
...commonCfg,
14+
// Needed in Vite 5: https://github.com/storybookjs/storybook/issues/25256
15+
assetsInclude: ['/sb-preview/**'],
1416
// Set up dev server
1517
server: {
1618
middlewareMode: true,

code/frameworks/nextjs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107
"@storybook/preview-api": "workspace:*",
108108
"@storybook/react": "workspace:*",
109109
"@types/node": "^18.0.0",
110+
"@types/semver": "^7.3.4",
110111
"css-loader": "^6.7.3",
111112
"find-up": "^5.0.0",
112113
"fs-extra": "^11.1.0",

code/frameworks/nextjs/template/stories_nextjs-default-ts/Navigation.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function Component() {
2424
name: 'Prefetch',
2525
},
2626
{
27-
// @ts-expect-error (old-api)
27+
// @ts-expect-error (a legacy nextjs api?)
2828
cb: () => router.push('/push-html', { forceOptimisticNavigation: true }),
2929
name: 'Push HTML',
3030
},
@@ -33,7 +33,7 @@ function Component() {
3333
name: 'Refresh',
3434
},
3535
{
36-
// @ts-expect-error (old-api)
36+
// @ts-expect-error (a legacy nextjs api?)
3737
cb: () => router.replace('/replaced-html', { forceOptimisticNavigation: true }),
3838
name: 'Replace',
3939
},

code/lib/cli/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@
102102
"@types/cross-spawn": "^6.0.2",
103103
"@types/prompts": "^2.0.9",
104104
"@types/puppeteer-core": "^2.1.0",
105-
"@types/semver": "^7.3.4",
106105
"@types/util-deprecate": "^1.0.0",
107106
"boxen": "^5.1.2",
108107
"slash": "^5.0.0",

code/lib/core-server/src/build-dev.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,15 @@ export async function buildDevStandalone(
7474
const { framework } = config;
7575
const corePresets = [];
7676

77-
const frameworkName = typeof framework === 'string' ? framework : framework?.name;
78-
validateFrameworkName(frameworkName);
77+
let frameworkName = typeof framework === 'string' ? framework : framework?.name;
78+
if (!options.ignorePreview) {
79+
validateFrameworkName(frameworkName);
80+
}
81+
if (frameworkName) {
82+
corePresets.push(join(frameworkName, 'preset'));
83+
}
7984

80-
corePresets.push(join(frameworkName, 'preset'));
85+
frameworkName = frameworkName || 'custom';
8186

8287
try {
8388
await warnOnIncompatibleAddons(config);

code/lib/core-server/src/build-static.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export async function buildStaticStandalone(options: BuildStaticStandaloneOption
7373
const frameworkName = typeof framework === 'string' ? framework : framework?.name;
7474
if (frameworkName) {
7575
corePresets.push(join(frameworkName, 'preset'));
76-
} else {
76+
} else if (!options.ignorePreview) {
7777
logger.warn(`you have not specified a framework in your ${options.configDir}/main.js`);
7878
}
7979

code/lib/manager-api/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
"dequal": "^2.0.2",
5555
"lodash": "^4.17.21",
5656
"memoizerific": "^1.11.3",
57-
"semver": "^7.3.7",
5857
"store2": "^2.14.2",
5958
"telejson": "^7.2.0",
6059
"ts-dedent": "^2.0.0"
@@ -63,10 +62,12 @@
6362
"@jest/globals": "^29.3.1",
6463
"@types/lodash": "^4.14.167",
6564
"@types/qs": "^6",
65+
"@types/semver": "^7.3.4",
6666
"flush-promises": "^1.0.2",
6767
"qs": "^6.10.0",
6868
"react": "^16.8.0",
6969
"react-dom": "^16.8.0",
70+
"semver": "^7.3.7",
7071
"typescript": "~4.9.3"
7172
},
7273
"publishConfig": {

code/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,5 +328,6 @@
328328
"Dependency Upgrades"
329329
]
330330
]
331-
}
331+
},
332+
"deferredNextVersion": "7.6.7"
332333
}

code/presets/create-react-app/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"@storybook/react-docgen-typescript-plugin": "1.0.6--canary.9.0c3f3b7.0",
5454
"@storybook/types": "workspace:*",
5555
"@types/babel__core": "^7.1.7",
56+
"@types/semver": "^7.3.4",
5657
"pnp-webpack-plugin": "^1.7.0",
5758
"semver": "^7.3.5"
5859
},

code/renderers/vue3/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"@storybook/global": "^5.0.0",
5353
"@storybook/preview-api": "workspace:*",
5454
"@storybook/types": "workspace:*",
55+
"@vue/compiler-core": "^3.0.0",
5556
"lodash": "^4.17.21",
5657
"ts-dedent": "^2.0.0",
5758
"type-fest": "~2.19",
@@ -60,15 +61,13 @@
6061
"devDependencies": {
6162
"@digitak/esrun": "^3.2.2",
6263
"@types/prettier": "2.7.2",
63-
"@vue/compiler-core": "^3.3.4",
6464
"@vue/vue3-jest": "29",
6565
"babel-jest": "^29.7.0",
6666
"typescript": "~4.9.3",
6767
"vue": "^3.2.47",
6868
"vue-tsc": "latest"
6969
},
7070
"peerDependencies": {
71-
"@vue/compiler-core": "^3.0.0",
7271
"vue": "^3.0.0"
7372
},
7473
"engines": {

code/ui/blocks/src/components/ArgsTable/ArgJsDoc.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { FC } from 'react';
22
import React from 'react';
3+
import type { CSSObject } from '@storybook/theming';
34
import { styled } from '@storybook/theming';
45
import { codeCommon } from '@storybook/components';
56
import type { JsDocTags } from './types';
@@ -53,7 +54,7 @@ export const Table = styled.table(({ theme }) => ({
5354
border: 'none',
5455
},
5556

56-
code: codeCommon({ theme }),
57+
code: codeCommon({ theme }) as CSSObject,
5758

5859
div: {
5960
span: {

code/ui/blocks/src/components/ArgsTable/ArgRow.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { FC } from 'react';
22
import React, { useState } from 'react';
33
import Markdown from 'markdown-to-jsx';
44
import { transparentize } from 'polished';
5+
import type { CSSObject } from '@storybook/theming';
56
import { styled } from '@storybook/theming';
67
import { codeCommon } from '@storybook/components';
78
import type { ArgType, Args, TableAnnotation } from './types';
@@ -39,10 +40,10 @@ const Description = styled.div(({ theme }) => ({
3940
},
4041

4142
code: {
42-
...codeCommon({ theme }),
43+
...(codeCommon({ theme }) as CSSObject),
4344
fontSize: 12,
4445
fontFamily: theme.typography.fonts.mono,
45-
},
46+
} as CSSObject,
4647

4748
'& code': {
4849
margin: 0,

code/ui/blocks/src/controls/options/Select.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ const styleResets: CSSObject = {
2323
position: 'relative',
2424
};
2525

26-
const OptionsSelect = styled.select(({ theme }) => ({
27-
...styleResets,
28-
26+
const OptionsSelect = styled.select(styleResets, ({ theme }) => ({
2927
boxSizing: 'border-box',
3028
position: 'relative',
3129
padding: '6px 10px',

code/ui/components/src/components/form/input/input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const styleResets: CSSObject = {
2222
};
2323

2424
const styles = ({ theme }: { theme: Theme }): CSSObject => ({
25-
...styleResets,
25+
...(styleResets as any),
2626

2727
transition: 'box-shadow 200ms ease-out, opacity 200ms ease-out',
2828
color: theme.input.color || 'inherit',

code/ui/components/src/components/typography/elements/DL.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { styled } from '@storybook/theming';
22
import { withReset, withMargin } from '../lib/common';
33

4-
export const DL = styled.dl(withReset, {
5-
...withMargin,
4+
export const DL = styled.dl(withReset, withMargin, {
65
padding: 0,
76
'& dt': {
87
fontSize: '14px',

code/ui/components/src/components/typography/elements/LI.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { CSSObject } from '@storybook/theming';
12
import { styled } from '@storybook/theming';
23
import { withReset, codeCommon } from '../lib/common';
34

@@ -12,5 +13,5 @@ export const LI = styled.li(withReset, ({ theme }) => ({
1213
marginTop: '.25em',
1314
marginBottom: 0,
1415
},
15-
'& code': codeCommon({ theme }),
16+
'& code': codeCommon({ theme }) as CSSObject,
1617
}));

code/ui/components/src/components/typography/elements/OL.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ const listCommon: CSSObject = {
1212
},
1313
};
1414

15-
export const OL = styled.ol(withReset, withMargin, { ...listCommon, listStyle: 'decimal' });
15+
export const OL = styled.ol(withReset, withMargin, listCommon, { listStyle: 'decimal' });
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
import type { CSSObject } from '@storybook/theming';
12
import { styled } from '@storybook/theming';
23
import { withReset, withMargin, codeCommon } from '../lib/common';
34

45
export const P = styled.p(withReset, withMargin, ({ theme }) => ({
56
fontSize: theme.typography.size.s2,
67
lineHeight: '24px',
78
color: theme.color.defaultText,
8-
'& code': codeCommon({ theme }),
9+
'& code': codeCommon({ theme }) as CSSObject,
910
}));

code/ui/components/src/components/typography/elements/UL.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ const listCommon: CSSObject = {
1212
},
1313
};
1414

15-
export const UL = styled.ul(withReset, withMargin, { ...listCommon, listStyle: 'disc' });
15+
export const UL = styled.ul(withReset, withMargin, listCommon, { listStyle: 'disc' });

0 commit comments

Comments
 (0)