Merge branch 'future/pbm/stage0' into future/type-checking-script

This commit is contained in:
Norbert de Langen 2022-06-30 08:49:52 +02:00
commit 164263ceb0
No known key found for this signature in database
GPG Key ID: FD0E78AF9A837762
100 changed files with 103 additions and 139 deletions

View File

@ -1,6 +1,6 @@
import type { AnyFramework, DecoratorFunction } from '@storybook/csf'; import type { AnyFramework, DecoratorFunction } from '@storybook/csf';
import deprecate from 'util-deprecate'; import deprecate from 'util-deprecate';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
export { PARAM_KEY } from './constants'; export { PARAM_KEY } from './constants';
export * from './params'; export * from './params';

View File

@ -1,5 +1,5 @@
import deprecate from 'util-deprecate'; import deprecate from 'util-deprecate';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { DecoratorFunction } from '../models'; import { DecoratorFunction } from '../models';

View File

@ -2,7 +2,7 @@
import global from 'global'; import global from 'global';
import { useEffect, makeDecorator } from '@storybook/addons'; import { useEffect, makeDecorator } from '@storybook/addons';
import deprecate from 'util-deprecate'; import deprecate from 'util-deprecate';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { actions } from './actions'; import { actions } from './actions';

View File

@ -1,4 +1,4 @@
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import deprecate from 'util-deprecate'; import deprecate from 'util-deprecate';
import { useMemo, useEffect } from '@storybook/addons'; import { useMemo, useEffect } from '@storybook/addons';
import type { AnyFramework, PartialStoryFn as StoryFunction, StoryContext } from '@storybook/csf'; import type { AnyFramework, PartialStoryFn as StoryFunction, StoryContext } from '@storybook/csf';

View File

@ -1,5 +1,5 @@
import global from 'global'; import global from 'global';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { logger } from '@storybook/client-logger'; import { logger } from '@storybook/client-logger';

View File

@ -1,5 +1,5 @@
import deprecate from 'util-deprecate'; import deprecate from 'util-deprecate';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
const warnBlocksImport = deprecate( const warnBlocksImport = deprecate(
() => {}, () => {},

View File

@ -1,4 +1,4 @@
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
let hasWarned = false; let hasWarned = false;

View File

@ -1,4 +1,4 @@
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
/* /*
From pesticide v1.3.0 . @mrmrs . MIT From pesticide v1.3.0 . @mrmrs . MIT

View File

@ -1,5 +1,5 @@
import path from 'path'; import path from 'path';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
const defaultOptions: Stories2SnapsConverterOptions = { const defaultOptions: Stories2SnapsConverterOptions = {
snapshotsDirName: '__snapshots__', snapshotsDirName: '__snapshots__',

View File

@ -2,7 +2,7 @@
import fs from 'fs'; import fs from 'fs';
import glob from 'glob'; import glob from 'glob';
import global from 'global'; import global from 'global';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
const { describe, it } = global; const { describe, it } = global;

View File

@ -3,7 +3,7 @@
import { Source } from '@storybook/addon-docs'; import { Source } from '@storybook/addon-docs';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
## With code snippet ## With code snippet

View File

@ -3,7 +3,7 @@
import { Description } from '@storybook/addon-docs'; import { Description } from '@storybook/addon-docs';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { Button } from './Button'; import { Button } from './Button';

View File

@ -1,5 +1,5 @@
import { logger, instance as npmLog } from '@storybook/node-logger'; import { logger, instance as npmLog } from '@storybook/node-logger';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
export const buildStandaloneErrorHandler = (error: any): any => { export const buildStandaloneErrorHandler = (error: any): any => {
// Duplicate code for Standalone error handling // Duplicate code for Standalone error handling

View File

@ -1,6 +1,6 @@
import { NgModule, Type } from '@angular/core'; import { NgModule, Type } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser'; import { BrowserModule } from '@angular/platform-browser';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import deprecate from 'util-deprecate'; import deprecate from 'util-deprecate';

View File

@ -4,7 +4,7 @@ import { logger } from '@storybook/node-logger';
import { targetFromTargetString, BuilderContext, Target } from '@angular-devkit/architect'; import { targetFromTargetString, BuilderContext, Target } from '@angular-devkit/architect';
import { sync as findUpSync } from 'find-up'; import { sync as findUpSync } from 'find-up';
import semver from '@storybook/semver'; import semver from '@storybook/semver';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { logging, JsonObject } from '@angular-devkit/core'; import { logging, JsonObject } from '@angular-devkit/core';
import { moduleIsAvailable } from './utils/module-is-available'; import { moduleIsAvailable } from './utils/module-is-available';

View File

@ -1,5 +1,5 @@
import global from 'global'; import global from 'global';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { RenderContext } from '@storybook/store'; import { RenderContext } from '@storybook/store';
import { OptionsArgs, EmberFramework } from './types'; import { OptionsArgs, EmberFramework } from './types';

View File

@ -1,6 +1,6 @@
<script> <script>
import SlotDecorator from './SlotDecorator.svelte'; import SlotDecorator from './SlotDecorator.svelte';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
export let name; export let name;
export let kind; export let kind;

View File

@ -1,7 +1,7 @@
import memoize from 'memoizerific'; import memoize from 'memoizerific';
import React from 'react'; import React from 'react';
import deprecate from 'util-deprecate'; import deprecate from 'util-deprecate';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import mapValues from 'lodash/mapValues'; import mapValues from 'lodash/mapValues';
import countBy from 'lodash/countBy'; import countBy from 'lodash/countBy';
import global from 'global'; import global from 'global';

View File

@ -1,7 +1,7 @@
import type { ReactElement } from 'react'; import type { ReactElement } from 'react';
import type { RenderData } from '@storybook/router'; import type { RenderData } from '@storybook/router';
import deprecate from 'util-deprecate'; import deprecate from 'util-deprecate';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { ModuleFn } from '../index'; import { ModuleFn } from '../index';
import { Options } from '../store'; import { Options } from '../store';

View File

@ -4,7 +4,7 @@ import deepEqual from 'fast-deep-equal';
import { themes } from '@storybook/theming'; import { themes } from '@storybook/theming';
import type { ThemeVars } from '@storybook/theming'; import type { ThemeVars } from '@storybook/theming';
import { once } from '@storybook/client-logger'; import { once } from '@storybook/client-logger';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import merge from '../lib/merge'; import merge from '../lib/merge';
import type { State, ModuleFn } from '../index'; import type { State, ModuleFn } from '../index';

View File

@ -1,5 +1,5 @@
import global from 'global'; import global from 'global';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { import {
transformSetStoriesStoryDataToStoriesHash, transformSetStoriesStoryDataToStoriesHash,
SetStoriesStory, SetStoriesStory,

View File

@ -11,7 +11,7 @@ import { queryFromLocation, buildArgsParam } from '@storybook/router';
import { toId, sanitize } from '@storybook/csf'; import { toId, sanitize } from '@storybook/csf';
import deepEqual from 'fast-deep-equal'; import deepEqual from 'fast-deep-equal';
import global from 'global'; import global from 'global';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { ModuleArgs, ModuleFn } from '../index'; import { ModuleArgs, ModuleFn } from '../index';
import { Layout, UI } from './layout'; import { Layout, UI } from './layout';

View File

@ -1,7 +1,7 @@
import React, { FunctionComponent, useEffect } from 'react'; import React, { FunctionComponent, useEffect } from 'react';
import global from 'global'; import global from 'global';
import deprecate from 'util-deprecate'; import deprecate from 'util-deprecate';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { MDXProvider } from '@mdx-js/react'; import { MDXProvider } from '@mdx-js/react';
import { ThemeProvider, ensure as ensureTheme } from '@storybook/theming'; import { ThemeProvider, ensure as ensureTheme } from '@storybook/theming';
import { components as htmlComponents } from '@storybook/components'; import { components as htmlComponents } from '@storybook/components';

View File

@ -1,6 +1,6 @@
import React, { FunctionComponent } from 'react'; import React, { FunctionComponent } from 'react';
import deprecate from 'util-deprecate'; import deprecate from 'util-deprecate';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { Subheading } from './Subheading'; import { Subheading } from './Subheading';
import { DocsStoryProps } from './types'; import { DocsStoryProps } from './types';
import { Anchor } from './Anchor'; import { Anchor } from './Anchor';

View File

@ -1,6 +1,6 @@
import React, { ComponentProps } from 'react'; import React, { ComponentProps } from 'react';
import deprecate from 'util-deprecate'; import deprecate from 'util-deprecate';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { Canvas } from './Canvas'; import { Canvas } from './Canvas';
export const Preview = deprecate( export const Preview = deprecate(

View File

@ -1,6 +1,6 @@
import React, { ComponentProps } from 'react'; import React, { ComponentProps } from 'react';
import deprecate from 'util-deprecate'; import deprecate from 'util-deprecate';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { ArgsTable } from './ArgsTable'; import { ArgsTable } from './ArgsTable';
import { CURRENT_SELECTION } from './types'; import { CURRENT_SELECTION } from './types';

View File

@ -1,5 +1,5 @@
import React, { FC } from 'react'; import React, { FC } from 'react';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { once } from '@storybook/client-logger'; import { once } from '@storybook/client-logger';
import { CheckboxControl } from './Checkbox'; import { CheckboxControl } from './Checkbox';

View File

@ -47,6 +47,7 @@
"@storybook/ui": "7.0.0-alpha.8", "@storybook/ui": "7.0.0-alpha.8",
"@types/ejs": "^3.1.1", "@types/ejs": "^3.1.1",
"@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.10", "@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.10",
"browser-assert": "^1.2.1",
"chalk": "^4.1.0", "chalk": "^4.1.0",
"ejs": "^3.1.8", "ejs": "^3.1.8",
"esbuild": "^0.14.47", "esbuild": "^0.14.47",

View File

@ -37,12 +37,13 @@ export const getConfig: ManagerBuilder['getConfig'] = async (options) => {
bundle: true, bundle: true,
minify: false, minify: false,
sourcemap: true, sourcemap: true,
legalComments: 'external', legalComments: 'external',
plugins: [ plugins: [
aliasPlugin({ aliasPlugin({
process: require.resolve('rollup-plugin-node-polyfills/polyfills/process-es6.js'), process: require.resolve('rollup-plugin-node-polyfills/polyfills/process-es6.js'),
util: require.resolve('rollup-plugin-node-polyfills/polyfills/util.js'), util: require.resolve('rollup-plugin-node-polyfills/polyfills/util.js'),
assert: require.resolve('rollup-plugin-node-polyfills/polyfills/assert.js'), assert: require.resolve('browser-assert'),
}), }),
globalExternals(definitions), globalExternals(definitions),
pnpPlugin(), pnpPlugin(),

View File

@ -3,7 +3,7 @@ import { logger } from '@storybook/node-logger';
import type { Options, CoreConfig } from '@storybook/core-common'; import type { Options, CoreConfig } from '@storybook/core-common';
import type { Configuration } from 'webpack'; import type { Configuration } from 'webpack';
import deprecate from 'util-deprecate'; import deprecate from 'util-deprecate';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { loadCustomWebpackConfig } from '@storybook/core-webpack'; import { loadCustomWebpackConfig } from '@storybook/core-webpack';
import { createDefaultWebpackConfig } from '../preview/base-webpack.config'; import { createDefaultWebpackConfig } from '../preview/base-webpack.config';

View File

@ -1,5 +1,5 @@
import path from 'path'; import path from 'path';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { DefinePlugin, HotModuleReplacementPlugin, ProgressPlugin, ProvidePlugin } from 'webpack'; import { DefinePlugin, HotModuleReplacementPlugin, ProgressPlugin, ProvidePlugin } from 'webpack';
import type { Configuration } from 'webpack'; import type { Configuration } from 'webpack';
import HtmlWebpackPlugin from 'html-webpack-plugin'; import HtmlWebpackPlugin from 'html-webpack-plugin';

View File

@ -1,7 +1,7 @@
/// <reference types="node" /> /// <reference types="node" />
import deprecate from 'util-deprecate'; import deprecate from 'util-deprecate';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
export type ChannelHandler = (event: ChannelEvent) => void; export type ChannelHandler = (event: ChannelEvent) => void;

View File

@ -1,5 +1,5 @@
import chalk from 'chalk'; import chalk from 'chalk';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import semver from '@storybook/semver'; import semver from '@storybook/semver';
import { ConfigFile } from '@storybook/csf-tools'; import { ConfigFile } from '@storybook/csf-tools';
import { Fix } from '../types'; import { Fix } from '../types';

View File

@ -1,5 +1,5 @@
import chalk from 'chalk'; import chalk from 'chalk';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { ConfigFile, readConfig, writeConfig } from '@storybook/csf-tools'; import { ConfigFile, readConfig, writeConfig } from '@storybook/csf-tools';
import { getStorybookInfo } from '@storybook/core-common'; import { getStorybookInfo } from '@storybook/core-common';

View File

@ -1,5 +1,5 @@
import chalk from 'chalk'; import chalk from 'chalk';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import semver from '@storybook/semver'; import semver from '@storybook/semver';
import { ConfigFile } from '@storybook/csf-tools'; import { ConfigFile } from '@storybook/csf-tools';
import { Fix } from '../types'; import { Fix } from '../types';

View File

@ -1,6 +1,6 @@
/* eslint-disable no-underscore-dangle */ /* eslint-disable no-underscore-dangle */
import path from 'path'; import path from 'path';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { JsPackageManager } from '../../js-package-manager'; import { JsPackageManager } from '../../js-package-manager';
import { eslintPlugin } from './eslint-plugin'; import { eslintPlugin } from './eslint-plugin';

View File

@ -1,5 +1,5 @@
import chalk from 'chalk'; import chalk from 'chalk';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { ConfigFile, readConfig, writeConfig } from '@storybook/csf-tools'; import { ConfigFile, readConfig, writeConfig } from '@storybook/csf-tools';
import { getStorybookInfo } from '@storybook/core-common'; import { getStorybookInfo } from '@storybook/core-common';

View File

@ -1,5 +1,5 @@
import chalk from 'chalk'; import chalk from 'chalk';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import semver from '@storybook/semver'; import semver from '@storybook/semver';
import { ConfigFile, readConfig, writeConfig } from '@storybook/csf-tools'; import { ConfigFile, readConfig, writeConfig } from '@storybook/csf-tools';

View File

@ -1,5 +1,5 @@
import chalk from 'chalk'; import chalk from 'chalk';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { Fix } from '../types'; import { Fix } from '../types';
import { NPMProxy } from '../../js-package-manager/NPMProxy'; import { NPMProxy } from '../../js-package-manager/NPMProxy';

View File

@ -1,5 +1,5 @@
import chalk from 'chalk'; import chalk from 'chalk';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import semver from '@storybook/semver'; import semver from '@storybook/semver';
import { ConfigFile } from '@storybook/csf-tools'; import { ConfigFile } from '@storybook/csf-tools';
import { Fix } from '../types'; import { Fix } from '../types';

View File

@ -1,5 +1,5 @@
import chalk from 'chalk'; import chalk from 'chalk';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import semver from '@storybook/semver'; import semver from '@storybook/semver';
import { ConfigFile, readConfig, writeConfig } from '@storybook/csf-tools'; import { ConfigFile, readConfig, writeConfig } from '@storybook/csf-tools';
import { getStorybookInfo } from '@storybook/core-common'; import { getStorybookInfo } from '@storybook/core-common';

View File

@ -1,4 +1,4 @@
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { sync as readUpSync } from 'read-pkg-up'; import { sync as readUpSync } from 'read-pkg-up';
import { logger, instance as npmLog } from '@storybook/node-logger'; import { logger, instance as npmLog } from '@storybook/node-logger';
import { buildDevStandalone } from '@storybook/core-server'; import { buildDevStandalone } from '@storybook/core-server';

View File

@ -1,5 +1,5 @@
import fse from 'fs-extra'; import fse from 'fs-extra';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { NpmOptions } from '../NpmOptions'; import { NpmOptions } from '../NpmOptions';
import { SupportedRenderers, Builder, CoreBuilder } from '../project_types'; import { SupportedRenderers, Builder, CoreBuilder } from '../project_types';
import { getBabelDependencies, copyComponents } from '../helpers'; import { getBabelDependencies, copyComponents } from '../helpers';

View File

@ -1,5 +1,5 @@
import fse from 'fs-extra'; import fse from 'fs-extra';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { SupportedRenderers } from '../project_types'; import { SupportedRenderers } from '../project_types';
interface ConfigureMainOptions { interface ConfigureMainOptions {

View File

@ -3,7 +3,7 @@ import fs from 'fs';
import path from 'path'; import path from 'path';
import chalk from 'chalk'; import chalk from 'chalk';
import boxen from 'boxen'; import boxen from 'boxen';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { createAndInit, exec } from './repro-generators/scripts'; import { createAndInit, exec } from './repro-generators/scripts';
import * as configs from './repro-generators/configs'; import * as configs from './repro-generators/configs';
import type { Parameters } from './repro-generators/configs'; import type { Parameters } from './repro-generators/configs';

View File

@ -1,7 +1,7 @@
/// <reference types="webpack-env" /> /// <reference types="webpack-env" />
import deprecate from 'util-deprecate'; import deprecate from 'util-deprecate';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import global from 'global'; import global from 'global';
import { logger } from '@storybook/client-logger'; import { logger } from '@storybook/client-logger';
import { toId, sanitize } from '@storybook/csf'; import { toId, sanitize } from '@storybook/csf';

View File

@ -1,6 +1,6 @@
/* eslint-disable no-underscore-dangle */ /* eslint-disable no-underscore-dangle */
import global from 'global'; import global from 'global';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { SynchronousPromise } from 'synchronous-promise'; import { SynchronousPromise } from 'synchronous-promise';
import { toId, isExportStory, storyNameFromExport } from '@storybook/csf'; import { toId, isExportStory, storyNameFromExport } from '@storybook/csf';
import type { StoryId, AnyFramework, Parameters, StoryFn } from '@storybook/csf'; import type { StoryId, AnyFramework, Parameters, StoryFn } from '@storybook/csf';

View File

@ -1,5 +1,5 @@
import { describe } from '@jest/globals'; import { describe } from '@jest/globals';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import _transform from '../csf-2-to-3'; import _transform from '../csf-2-to-3';
// @ts-ignore // @ts-ignore

View File

@ -1,4 +1,4 @@
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import deprecate from 'util-deprecate'; import deprecate from 'util-deprecate';
const deprecatedHtmlEndpoint = deprecate( const deprecatedHtmlEndpoint = deprecate(

View File

@ -1,4 +1,4 @@
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { formatter } from './formatter'; import { formatter } from './formatter';

View File

@ -2,7 +2,7 @@ import memoize from 'memoizerific';
import prettierHtml from 'prettier/parser-html'; import prettierHtml from 'prettier/parser-html';
import prettier from 'prettier/standalone'; import prettier from 'prettier/standalone';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { SyntaxHighlighterFormatTypes } from './syntaxhighlighter-types'; import { SyntaxHighlighterFormatTypes } from './syntaxhighlighter-types';
export const formatter = memoize(2)((type: SyntaxHighlighterFormatTypes, source: string) => { export const formatter = memoize(2)((type: SyntaxHighlighterFormatTypes, source: string) => {

View File

@ -1,4 +1,4 @@
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { logger } from '@storybook/node-logger'; import { logger } from '@storybook/node-logger';
import { import {
CLIOptions, CLIOptions,

View File

@ -1,7 +1,7 @@
// eslint-disable-next-line @typescript-eslint/triple-slash-reference // eslint-disable-next-line @typescript-eslint/triple-slash-reference
/// <reference path="../../test-typings.d.ts" /> /// <reference path="../../test-typings.d.ts" />
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { normalizeStoriesEntry } from '../normalize-stories'; import { normalizeStoriesEntry } from '../normalize-stories';

View File

@ -1,6 +1,6 @@
import path from 'path'; import path from 'path';
import { logger } from '@storybook/node-logger'; import { logger } from '@storybook/node-logger';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { getInterpretedFile } from './interpret-files'; import { getInterpretedFile } from './interpret-files';

View File

@ -1,5 +1,5 @@
import path from 'path'; import path from 'path';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { getInterpretedFile } from './interpret-files'; import { getInterpretedFile } from './interpret-files';

View File

@ -1,7 +1,7 @@
import fs from 'fs'; import fs from 'fs';
import path from 'path'; import path from 'path';
import deprecate from 'util-deprecate'; import deprecate from 'util-deprecate';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { scan } from 'picomatch'; import { scan } from 'picomatch';
import slash from 'slash'; import slash from 'slash';

View File

@ -1,4 +1,4 @@
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import deprecate from 'util-deprecate'; import deprecate from 'util-deprecate';
import glob from 'glob'; import glob from 'glob';
import path from 'path'; import path from 'path';

View File

@ -1,7 +1,7 @@
import chalk from 'chalk'; import chalk from 'chalk';
import { copy, emptyDir, ensureDir } from 'fs-extra'; import { copy, emptyDir, ensureDir } from 'fs-extra';
import path, { dirname, join } from 'path'; import path, { dirname, join } from 'path';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import global from 'global'; import global from 'global';
import { logger } from '@storybook/node-logger'; import { logger } from '@storybook/node-logger';

View File

@ -4,7 +4,7 @@ import betterOpn from 'better-opn'; // betterOpn alias used because also loading
import open from 'open'; import open from 'open';
// @ts-ignore // @ts-ignore
import getDefaultBrowser from 'x-default-browser'; import getDefaultBrowser from 'x-default-browser';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
export function openInBrowser(address: string) { export function openInBrowser(address: string) {
getDefaultBrowser(async (err: any, res: any) => { getDefaultBrowser(async (err: any, res: any) => {

View File

@ -1,7 +1,7 @@
import chalk from 'chalk'; import chalk from 'chalk';
import { colors } from '@storybook/node-logger'; import { colors } from '@storybook/node-logger';
import boxen from 'boxen'; import boxen from 'boxen';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import Table from 'cli-table3'; import Table from 'cli-table3';
import prettyTime from 'pretty-hrtime'; import prettyTime from 'pretty-hrtime';
import type { VersionCheck } from '@storybook/core-common'; import type { VersionCheck } from '@storybook/core-common';

View File

@ -7,7 +7,7 @@ import { pathExists } from 'fs-extra';
import path from 'path'; import path from 'path';
import favicon from 'serve-favicon'; import favicon from 'serve-favicon';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
const defaultFavIcon = require.resolve('@storybook/core-server/public/favicon.ico'); const defaultFavIcon = require.resolve('@storybook/core-server/public/favicon.ico');

View File

@ -2,7 +2,7 @@ import fetch from 'node-fetch';
import chalk from 'chalk'; import chalk from 'chalk';
import { colors } from '@storybook/node-logger'; import { colors } from '@storybook/node-logger';
import semver from '@storybook/semver'; import semver from '@storybook/semver';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { cache } from '@storybook/core-common'; import { cache } from '@storybook/core-common';
import type { VersionCheck } from '@storybook/core-common'; import type { VersionCheck } from '@storybook/core-common';

View File

@ -1,5 +1,5 @@
import { logger } from '@storybook/node-logger'; import { logger } from '@storybook/node-logger';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
export const checkWebpackVersion = ( export const checkWebpackVersion = (
webpack: { version?: string }, webpack: { version?: string },

View File

@ -1,4 +1,4 @@
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import type { NormalizedStoriesSpecifier } from '@storybook/core-common'; import type { NormalizedStoriesSpecifier } from '@storybook/core-common';
import { globToRegexp } from '@storybook/core-common'; import { globToRegexp } from '@storybook/core-common';

View File

@ -1,4 +1,4 @@
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { formatConfig, loadConfig } from './ConfigFile'; import { formatConfig, loadConfig } from './ConfigFile';
expect.addSnapshotSerializer({ expect.addSnapshotSerializer({

View File

@ -1,5 +1,5 @@
/* eslint-disable no-underscore-dangle */ /* eslint-disable no-underscore-dangle */
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import yaml from 'js-yaml'; import yaml from 'js-yaml';
import { loadCsf } from './CsfFile'; import { loadCsf } from './CsfFile';

View File

@ -1,6 +1,6 @@
/* eslint-disable no-underscore-dangle */ /* eslint-disable no-underscore-dangle */
import fs from 'fs-extra'; import fs from 'fs-extra';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import * as t from '@babel/types'; import * as t from '@babel/types';
import generate from '@babel/generator'; import generate from '@babel/generator';
import traverse from '@babel/traverse'; import traverse from '@babel/traverse';

View File

@ -1,4 +1,4 @@
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { getStorySortParameter } from './getStorySortParameter'; import { getStorySortParameter } from './getStorySortParameter';
describe('getStorySortParameter', () => { describe('getStorySortParameter', () => {

View File

@ -1,7 +1,7 @@
import * as t from '@babel/types'; import * as t from '@babel/types';
import traverse from '@babel/traverse'; import traverse from '@babel/traverse';
import generate from '@babel/generator'; import generate from '@babel/generator';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { babelParse } from './babelParse'; import { babelParse } from './babelParse';
const logger = console; const logger = console;

View File

@ -1,4 +1,4 @@
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import global from 'global'; import global from 'global';
import { SynchronousPromise } from 'synchronous-promise'; import { SynchronousPromise } from 'synchronous-promise';
import { import {

View File

@ -1,5 +1,5 @@
import deprecate from 'util-deprecate'; import deprecate from 'util-deprecate';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import global from 'global'; import global from 'global';
import { import {
CURRENT_STORY_WAS_SET, CURRENT_STORY_WAS_SET,

View File

@ -1,7 +1,7 @@
import global from 'global'; import global from 'global';
import { logger } from '@storybook/client-logger'; import { logger } from '@storybook/client-logger';
import AnsiToHtml from 'ansi-to-html'; import AnsiToHtml from 'ansi-to-html';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import qs from 'qs'; import qs from 'qs';
import type { Story } from '@storybook/store'; import type { Story } from '@storybook/store';

View File

@ -1,5 +1,5 @@
import qs from 'qs'; import qs from 'qs';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import type { Args } from '@storybook/addons'; import type { Args } from '@storybook/addons';
import { once } from '@storybook/client-logger'; import { once } from '@storybook/client-logger';
import isPlainObject from 'lodash/isPlainObject'; import isPlainObject from 'lodash/isPlainObject';

View File

@ -3,7 +3,7 @@ import deepEqual from 'fast-deep-equal';
import isPlainObject from 'lodash/isPlainObject'; import isPlainObject from 'lodash/isPlainObject';
import memoize from 'memoizerific'; import memoize from 'memoizerific';
import qs, { IStringifyOptions } from 'qs'; import qs, { IStringifyOptions } from 'qs';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
export interface StoryData { export interface StoryData {
viewMode?: string; viewMode?: string;

View File

@ -1,5 +1,5 @@
import deprecate from 'util-deprecate'; import deprecate from 'util-deprecate';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import type { Globals, GlobalTypes } from '@storybook/csf'; import type { Globals, GlobalTypes } from '@storybook/csf';
import { deepDiff, DEEPLY_EQUAL } from './args'; import { deepDiff, DEEPLY_EQUAL } from './args';

View File

@ -1,4 +1,4 @@
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import type { StoryId } from '@storybook/csf'; import type { StoryId } from '@storybook/csf';
import memoize from 'memoizerific'; import memoize from 'memoizerific';

View File

@ -2,7 +2,7 @@ import deepEqual from 'fast-deep-equal';
import type { SBType, Args, InputType, ArgTypes, StoryContext, AnyFramework } from '@storybook/csf'; import type { SBType, Args, InputType, ArgTypes, StoryContext, AnyFramework } from '@storybook/csf';
import { once } from '@storybook/client-logger'; import { once } from '@storybook/client-logger';
import isPlainObject from 'lodash/isPlainObject'; import isPlainObject from 'lodash/isPlainObject';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
const INCOMPATIBLE = Symbol('incompatible'); const INCOMPATIBLE = Symbol('incompatible');
const map = (arg: unknown, argType: InputType): any => { const map = (arg: unknown, argType: InputType): any => {

View File

@ -1,5 +1,5 @@
import slash from 'slash'; import slash from 'slash';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { once } from '@storybook/client-logger'; import { once } from '@storybook/client-logger';
// FIXME: types duplicated type from `core-common', to be // FIXME: types duplicated type from `core-common', to be

View File

@ -7,7 +7,7 @@ import type {
ArgTypes, ArgTypes,
} from '@storybook/csf'; } from '@storybook/csf';
import { storyNameFromExport, toId } from '@storybook/csf'; import { storyNameFromExport, toId } from '@storybook/csf';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { logger } from '@storybook/client-logger'; import { logger } from '@storybook/client-logger';
import deprecate from 'util-deprecate'; import deprecate from 'util-deprecate';
import type { NormalizedComponentAnnotations, NormalizedStoryAnnotations } from '../types'; import type { NormalizedComponentAnnotations, NormalizedStoryAnnotations } from '../types';

View File

@ -1,4 +1,4 @@
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import deprecate from 'util-deprecate'; import deprecate from 'util-deprecate';
import global from 'global'; import global from 'global';

View File

@ -1,5 +1,5 @@
import mapValues from 'lodash/mapValues'; import mapValues from 'lodash/mapValues';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { logger } from '@storybook/client-logger'; import { logger } from '@storybook/client-logger';
import type { AnyFramework, SBType, ArgTypesEnhancer } from '@storybook/csf'; import type { AnyFramework, SBType, ArgTypesEnhancer } from '@storybook/csf';
import { combineParameters } from './parameters'; import { combineParameters } from './parameters';

View File

@ -1,5 +1,5 @@
import stable from 'stable'; import stable from 'stable';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import type { Comparator, StorySortParameter, StorySortParameterV7 } from '@storybook/addons'; import type { Comparator, StorySortParameter, StorySortParameterV7 } from '@storybook/addons';
import { storySort } from './storySort'; import { storySort } from './storySort';
import type { Story, StoryIndexEntry, IndexEntry, Path, Parameters } from './types'; import type { Story, StoryIndexEntry, IndexEntry, Path, Parameters } from './types';

View File

@ -1 +0,0 @@
export * from './dist/esm';

View File

@ -1,2 +0,0 @@
// We used to alias paths, but now that we are bundling dependencies, we do not need to
module.exports = {};

View File

@ -1,7 +1,7 @@
import { logger } from '@storybook/client-logger'; import { logger } from '@storybook/client-logger';
import { deletedDiff } from 'deep-object-diff'; import { deletedDiff } from 'deep-object-diff';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import light from './themes/light'; import light from './themes/light';
import { Theme, ThemeVars } from './types'; import { Theme, ThemeVars } from './types';

View File

@ -48,26 +48,14 @@ export default {
'A', 'A',
'ActionBar', 'ActionBar',
'AddonPanel', 'AddonPanel',
'ArgsTable',
'ArgsTableError',
'Badge', 'Badge',
'Bar', 'Bar',
'Blockquote', 'Blockquote',
'BooleanControl',
'Button', 'Button',
'Code', 'Code',
'ColorControl',
'ColorItem',
'ColorPalette',
'DL', 'DL',
'DateControl',
'Description',
'Div', 'Div',
'DocsContent',
'DocsPageWrapper',
'DocsWrapper',
'DocumentWrapper', 'DocumentWrapper',
'FilesControl',
'FlexBar', 'FlexBar',
'Form', 'Form',
'H1', 'H1',
@ -77,72 +65,48 @@ export default {
'H5', 'H5',
'H6', 'H6',
'HR', 'HR',
'IFrame',
'IconButton', 'IconButton',
'IconGallery', 'IconButtonSkeleton',
'IconItem',
'Icons', 'Icons',
'Img', 'Img',
'LI', 'LI',
'Link', 'Link',
'Loader', 'Loader',
'NoControlsWarning',
'NumberControl',
'OL', 'OL',
'ObjectControl',
'OptionsControl',
'P', 'P',
'Placeholder', 'Placeholder',
'Pre', 'Pre',
'Preview', 'ResetWrapper',
'PreviewSkeleton',
'RangeControl',
'ScrollArea', 'ScrollArea',
'Separator', 'Separator',
'Source',
'SourceError',
'Spaced', 'Spaced',
'Span', 'Span',
'Story',
'StoryError',
'StorySkeleton',
'StorybookIcon', 'StorybookIcon',
'StorybookLogo', 'StorybookLogo',
'StyledSyntaxHighlighter',
'Subtitle',
'Symbols', 'Symbols',
'SyntaxHighlighter', 'SyntaxHighlighter',
'TT', 'TT',
'TabBar', 'TabBar',
'TabButton', 'TabButton',
'TabWrapper', 'TabWrapper',
'TabbedArgsTable',
'Table', 'Table',
'TableWrapper',
'Tabs', 'Tabs',
'TabsState', 'TabsState',
'TextControl',
'Title',
'TooltipLinkList', 'TooltipLinkList',
'TooltipMessage', 'TooltipMessage',
'TooltipNote', 'TooltipNote',
'Typeset',
'UL', 'UL',
'WithTooltip', 'WithTooltip',
'WithTooltipPure', 'WithTooltipPure',
'Zoom', 'Zoom',
'argsTableLoadingData', 'codeCommon',
'components', 'components',
'format', 'createCopyToClipboardFunction',
'formatDate',
'formatTime',
'getStoryHref', 'getStoryHref',
'interleaveSeparators', 'interleaveSeparators',
'nameSpaceClassNames', 'nameSpaceClassNames',
'parse',
'parseDate',
'parseTime',
'resetComponents', 'resetComponents',
'withReset',
], ],
'@storybook/channels': ['Channel'], '@storybook/channels': ['Channel'],
'@storybook/core-events': [ '@storybook/core-events': [

View File

@ -1,4 +1,4 @@
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { StorybookStory, StorybookSection } from './types'; import { StorybookStory, StorybookSection } from './types';
const { identifier } = require('safe-identifier'); const { identifier } = require('safe-identifier');

View File

@ -1,6 +1,6 @@
/* eslint-disable camelcase */ /* eslint-disable camelcase */
import svelteDoc from 'sveltedoc-parser'; import svelteDoc from 'sveltedoc-parser';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import * as path from 'path'; import * as path from 'path';
import * as fs from 'fs'; import * as fs from 'fs';
import { preprocess } from 'svelte/compiler'; import { preprocess } from 'svelte/compiler';

View File

@ -3,7 +3,7 @@
import { SNIPPET_RENDERED, SourceType } from '@storybook/docs-tools'; import { SNIPPET_RENDERED, SourceType } from '@storybook/docs-tools';
import { addons, useEffect } from '@storybook/addons'; import { addons, useEffect } from '@storybook/addons';
import type { PartialStoryFn } from '@storybook/csf'; import type { PartialStoryFn } from '@storybook/csf';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { HtmlFramework, StoryContext } from '../types'; import { HtmlFramework, StoryContext } from '../types';
import { StoryFn } from '../public-types'; import { StoryFn } from '../public-types';

View File

@ -2,7 +2,7 @@
// @ts-ignore // @ts-ignore
import global from 'global'; import global from 'global';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { simulatePageLoad, simulateDOMContentLoaded } from '@storybook/preview-web'; import { simulatePageLoad, simulateDOMContentLoaded } from '@storybook/preview-web';
import type { RenderContext } from '@storybook/store'; import type { RenderContext } from '@storybook/store';
import type { HtmlFramework } from './types'; import type { HtmlFramework } from './types';

View File

@ -1,5 +1,5 @@
import * as preact from 'preact'; import * as preact from 'preact';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import type { RenderContext } from '@storybook/store'; import type { RenderContext } from '@storybook/store';
import type { StoryFnPreactReturnType, PreactFramework } from './types'; import type { StoryFnPreactReturnType, PreactFramework } from './types';

View File

@ -1,7 +1,7 @@
/* eslint-disable no-underscore-dangle */ /* eslint-disable no-underscore-dangle */
import React, { createElement, ReactElement } from 'react'; import React, { createElement, ReactElement } from 'react';
import reactElementToJSXString, { Options } from 'react-element-to-jsx-string'; import reactElementToJSXString, { Options } from 'react-element-to-jsx-string';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import deprecate from 'util-deprecate'; import deprecate from 'util-deprecate';
import { addons, useEffect } from '@storybook/addons'; import { addons, useEffect } from '@storybook/addons';

View File

@ -1,5 +1,5 @@
import { generate } from 'escodegen'; import { generate } from 'escodegen';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
const BASIC_OPTIONS = { const BASIC_OPTIONS = {
format: { format: {

View File

@ -2,7 +2,7 @@
// @ts-ignore // @ts-ignore
import global from 'global'; import global from 'global';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import type { RenderContext } from '@storybook/store'; import type { RenderContext } from '@storybook/store';
import { simulatePageLoad, simulateDOMContentLoaded } from '@storybook/preview-web'; import { simulatePageLoad, simulateDOMContentLoaded } from '@storybook/preview-web';
import type { StoryFn, Args, ArgTypes } from './public-types'; import type { StoryFn, Args, ArgTypes } from './public-types';

View File

@ -1,6 +1,6 @@
<script> <script>
import SlotDecorator from './SlotDecorator.svelte'; import SlotDecorator from './SlotDecorator.svelte';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
export let name; export let name;
export let kind; export let kind;

View File

@ -1,5 +1,5 @@
/* eslint-disable no-underscore-dangle */ /* eslint-disable no-underscore-dangle */
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import Vue from 'vue'; import Vue from 'vue';
import type { RenderContext } from '@storybook/store'; import type { RenderContext } from '@storybook/store';
import type { ArgsStoryFn } from '@storybook/csf'; import type { ArgsStoryFn } from '@storybook/csf';

View File

@ -1,4 +1,4 @@
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { createApp, h } from 'vue'; import { createApp, h } from 'vue';
import type { RenderContext } from '@storybook/store'; import type { RenderContext } from '@storybook/store';
import type { ArgsStoryFn } from '@storybook/csf'; import type { ArgsStoryFn } from '@storybook/csf';

View File

@ -2,7 +2,7 @@
// @ts-ignore // @ts-ignore
import global from 'global'; import global from 'global';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import { render } from 'lit-html'; import { render } from 'lit-html';
// Keep `.js` extension to avoid issue with Webpack (related to export map?) // Keep `.js` extension to avoid issue with Webpack (related to export map?)
// eslint-disable-next-line import/extensions // eslint-disable-next-line import/extensions

View File

@ -4,7 +4,7 @@ import chalk from 'chalk';
import path from 'path'; import path from 'path';
import program from 'commander'; import program from 'commander';
import detectFreePort from 'detect-port'; import detectFreePort from 'detect-port';
import dedent from 'ts-dedent'; import { dedent } from 'ts-dedent';
import fs from 'fs'; import fs from 'fs';
import yaml from 'js-yaml'; import yaml from 'js-yaml';
import nodeCleanup from 'node-cleanup'; import nodeCleanup from 'node-cleanup';

View File

@ -7837,6 +7837,7 @@ __metadata:
"@storybook/ui": 7.0.0-alpha.8 "@storybook/ui": 7.0.0-alpha.8
"@types/ejs": ^3.1.1 "@types/ejs": ^3.1.1
"@yarnpkg/esbuild-plugin-pnp": ^3.0.0-rc.10 "@yarnpkg/esbuild-plugin-pnp": ^3.0.0-rc.10
browser-assert: ^1.2.1
chalk: ^4.1.0 chalk: ^4.1.0
ejs: ^3.1.8 ejs: ^3.1.8
esbuild: ^0.14.47 esbuild: ^0.14.47