Skip to content

Commit ad218cf

Browse files
committed
fix breaking changes
1 parent c78ff54 commit ad218cf

File tree

5 files changed

+81
-1115
lines changed

5 files changed

+81
-1115
lines changed

.storybook/main.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { dirname, join } from 'path';
21
import type { StorybookConfig } from '@storybook/react-vite';
32
import remarkGfm from 'remark-gfm';
43
import type { StoriesEntry } from 'storybook/internal/types';
@@ -52,9 +51,8 @@ const storyList: StoriesEntry[] = isChromatic
5251

5352
const addons = [
5453
'./addons/version-switch',
55-
getAbsolutePath('@storybook/react-vite'),
5654
{
57-
name: getAbsolutePath('@storybook/addon-docs'),
55+
name: '@storybook/addon-docs',
5856
options: {
5957
mdxPluginOptions: {
6058
mdxCompileOptions: {
@@ -70,7 +68,7 @@ if (isDevMode) {
7068

7169
const config: StorybookConfig = {
7270
framework: {
73-
name: getAbsolutePath('@storybook/react-vite'),
71+
name: '@storybook/react-vite',
7472
options: {},
7573
},
7674
stories: storyList,
@@ -88,7 +86,3 @@ const config: StorybookConfig = {
8886
};
8987

9088
export default config;
91-
92-
function getAbsolutePath(value: string): any {
93-
return dirname(require.resolve(join(value, 'package.json')));
94-
}

.storybook/preview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ const preview: Preview = {
133133
controls: {
134134
sort: 'requiredFirst',
135135
},
136-
backgrounds: { disable: true },
136+
backgrounds: { disabled: true },
137137
options: {
138138
storySort: {
139139
method: 'alphabetical',

.storybook/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"extends": "./../tsconfig.base.json",
33
"compilerOptions": {
4-
"allowJs": true
4+
"allowJs": true,
5+
"allowImportingTsExtensions": true
56
},
67
"include": ["./**/*.js", "./**/*.tsx", "./**/*.ts", "../patterns/selection-assistant"]
78
}

.storybook/utils.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
import type * as CEM from '@ui5/webcomponents-tools/lib/cem/types-internal';
1+
import type * as CEM from '@ui5/webcomponents-tools/lib/cem/types-internal.js';
22
import { useEffect, useMemo, useRef, useState, useTransition } from 'react';
3-
// @ts-expect-error: storybook can handle this
4-
import cemAi from './custom-element-manifests/ai.json';
5-
// @ts-expect-error: storybook can handle this
6-
import cemFiori from './custom-element-manifests/fiori.json';
7-
// @ts-expect-error: storybook can handle this
8-
import cemMain from './custom-element-manifests/main.json';
3+
import cemAi from './custom-element-manifests/ai.json' with { type: 'json' };
4+
import cemFiori from './custom-element-manifests/fiori.json' with { type: 'json' };
5+
import cemMain from './custom-element-manifests/main.json' with { type: 'json' };
96

107
export const isChromatic = process.env.STORYBOOK_ENV === 'chromatic';
118

0 commit comments

Comments
 (0)