Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Future - base improved #18633

Merged
merged 2 commits into from
Jul 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ jobs:
name: Run @storybook/bench on repro
command: |
cd ../cra-bench
npx @storybook/[email protected].12.22336b6.0 'echo noop' --label cra
npx @storybook/[email protected].11.52d1ee7.1 'echo noop' --label cra
e2e-tests-pnp:
executor:
class: medium
Expand Down
4 changes: 3 additions & 1 deletion addons/a11y/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"*.d.ts"
],
"scripts": {
"check": "tsc --noEmit",
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
Expand All @@ -56,7 +57,8 @@
"util-deprecate": "^1.0.2"
},
"devDependencies": {
"@testing-library/react": "^11.2.2"
"@testing-library/react": "^11.2.2",
"typescript": "~4.6.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
Expand Down
2 changes: 1 addition & 1 deletion addons/a11y/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { AnyFramework, DecoratorFunction } from '@storybook/csf';
import deprecate from 'util-deprecate';
import dedent from 'ts-dedent';
import { dedent } from 'ts-dedent';

export { PARAM_KEY } from './constants';
export * from './params';
Expand Down
4 changes: 3 additions & 1 deletion addons/actions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"*.d.ts"
],
"scripts": {
"check": "tsc --noEmit",
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
Expand All @@ -54,7 +55,8 @@
"uuid-browser": "^3.1.0"
},
"devDependencies": {
"@types/lodash": "^4.14.167"
"@types/lodash": "^4.14.167",
"typescript": "~4.6.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
Expand Down
2 changes: 1 addition & 1 deletion addons/actions/src/preview/decorateAction.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import deprecate from 'util-deprecate';
import dedent from 'ts-dedent';
import { dedent } from 'ts-dedent';

import { DecoratorFunction } from '../models';

Expand Down
5 changes: 2 additions & 3 deletions addons/actions/src/preview/withActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import global from 'global';
import { useEffect, makeDecorator } from '@storybook/addons';
import deprecate from 'util-deprecate';
import dedent from 'ts-dedent';
import { dedent } from 'ts-dedent';

import { actions } from './actions';

Expand All @@ -15,8 +15,6 @@ const delegateEventSplitter = /^(\S+)\s*(.*)$/;
const isIE = Element != null && !Element.prototype.matches;
const matchesMethod = isIE ? 'msMatchesSelector' : 'matches';

const root = document && document.getElementById('root');

const hasMatchInAncestry = (element: any, selector: any): boolean => {
if (element[matchesMethod](selector)) {
return true;
Expand Down Expand Up @@ -45,6 +43,7 @@ const createHandlers = (actionsFn: (...arg: any[]) => object, ...handles: any[])

const applyEventHandlers = deprecate(
(actionsFn: any, ...handles: any[]) => {
const root = document && document.getElementById('root');
useEffect(() => {
if (root != null) {
const handlers = createHandlers(actionsFn, ...handles);
Expand Down
4 changes: 4 additions & 0 deletions addons/backgrounds/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"*.d.ts"
],
"scripts": {
"check": "tsc --noEmit",
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
Expand All @@ -51,6 +52,9 @@
"ts-dedent": "^2.0.0",
"util-deprecate": "^1.0.2"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
Expand Down
2 changes: 1 addition & 1 deletion addons/backgrounds/src/decorators/withGrid.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import dedent from 'ts-dedent';
import { dedent } from 'ts-dedent';
import deprecate from 'util-deprecate';
import { useMemo, useEffect } from '@storybook/addons';
import type { AnyFramework, PartialStoryFn as StoryFunction, StoryContext } from '@storybook/csf';
Expand Down
2 changes: 1 addition & 1 deletion addons/backgrounds/src/helpers/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import global from 'global';
import dedent from 'ts-dedent';
import { dedent } from 'ts-dedent';

import { logger } from '@storybook/client-logger';

Expand Down
1 change: 1 addition & 0 deletions addons/controls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"*.d.ts"
],
"scripts": {
"check": "tsc --noEmit",
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion addons/docs/blocks.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import deprecate from 'util-deprecate';
import dedent from 'ts-dedent';
import { dedent } from 'ts-dedent';

const warnBlocksImport = deprecate(
() => {},
Expand Down
4 changes: 3 additions & 1 deletion addons/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"!__testfixtures__"
],
"scripts": {
"check": "tsc --noEmit",
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
Expand Down Expand Up @@ -81,7 +82,8 @@
"devDependencies": {
"@babel/core": "^7.12.10",
"@storybook/mdx2-csf": "^0.0.3",
"@types/util-deprecate": "^1.0.0"
"@types/util-deprecate": "^1.0.0",
"typescript": "~4.6.3"
},
"peerDependencies": {
"@storybook/mdx2-csf": "^0.0.3",
Expand Down
4 changes: 3 additions & 1 deletion addons/essentials/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"README.md"
],
"scripts": {
"check": "tsc --noEmit",
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
Expand All @@ -51,7 +52,8 @@
"devDependencies": {
"@babel/core": "^7.12.10",
"@storybook/vue": "7.0.0-alpha.10",
"@types/jest": "^26.0.16"
"@types/jest": "^26.0.16",
"typescript": "~4.6.3"
},
"peerDependencies": {
"@babel/core": "^7.9.6"
Expand Down
4 changes: 3 additions & 1 deletion addons/highlight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"*.d.ts"
],
"scripts": {
"check": "tsc --noEmit",
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
Expand All @@ -42,7 +43,8 @@
"global": "^4.4.0"
},
"devDependencies": {
"@types/webpack-env": "^1.16.0"
"@types/webpack-env": "^1.16.0",
"typescript": "~4.6.3"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 3 additions & 1 deletion addons/interactions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"*.d.ts"
],
"scripts": {
"check": "tsc --noEmit",
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
Expand All @@ -53,7 +54,8 @@
"devDependencies": {
"@storybook/jest": "^0.0.5",
"@storybook/testing-library": "0.0.14-next.0",
"formik": "^2.2.9"
"formik": "^2.2.9",
"typescript": "~4.6.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
Expand Down
4 changes: 4 additions & 0 deletions addons/jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"*.d.ts"
],
"scripts": {
"check": "tsc --noEmit",
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
Expand All @@ -51,6 +52,9 @@
"react-sizeme": "^3.0.1",
"upath": "^1.2.0"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
Expand Down
4 changes: 4 additions & 0 deletions addons/links/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"*.d.ts"
],
"scripts": {
"check": "tsc --noEmit",
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
Expand All @@ -44,6 +45,9 @@
"prop-types": "^15.7.2",
"ts-dedent": "^2.0.0"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
Expand Down
2 changes: 1 addition & 1 deletion addons/links/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import dedent from 'ts-dedent';
import { dedent } from 'ts-dedent';

let hasWarned = false;

Expand Down
4 changes: 4 additions & 0 deletions addons/measure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"*.d.ts"
],
"scripts": {
"check": "tsc --noEmit",
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
Expand All @@ -46,6 +47,9 @@
"core-js": "^3.8.2",
"global": "^4.4.0"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
Expand Down
4 changes: 4 additions & 0 deletions addons/outline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"*.d.ts"
],
"scripts": {
"check": "tsc --noEmit",
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
Expand All @@ -50,6 +51,9 @@
"global": "^4.4.0",
"ts-dedent": "^2.0.0"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
Expand Down
2 changes: 1 addition & 1 deletion addons/outline/src/outlineCSS.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import dedent from 'ts-dedent';
import { dedent } from 'ts-dedent';

/*
From pesticide v1.3.0 . @mrmrs . MIT
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import path from 'path';
import dedent from 'ts-dedent';
import { dedent } from 'ts-dedent';

const defaultOptions: Stories2SnapsConverterOptions = {
snapshotsDirName: '__snapshots__',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import fs from 'fs';
import glob from 'glob';
import global from 'global';
import dedent from 'ts-dedent';
import { dedent } from 'ts-dedent';

const { describe, it } = global;

Expand Down
4 changes: 3 additions & 1 deletion addons/storysource/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"*.d.ts"
],
"scripts": {
"check": "tsc --noEmit",
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
Expand All @@ -48,7 +49,8 @@
},
"devDependencies": {
"@types/react": "^16.14.23",
"@types/react-syntax-highlighter": "11.0.5"
"@types/react-syntax-highlighter": "11.0.5",
"typescript": "~4.6.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
Expand Down
4 changes: 4 additions & 0 deletions addons/toolbars/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"*.d.ts"
],
"scripts": {
"check": "tsc --noEmit",
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
Expand All @@ -45,6 +46,9 @@
"@storybook/theming": "7.0.0-alpha.10",
"core-js": "^3.8.2"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
Expand Down
4 changes: 4 additions & 0 deletions addons/viewport/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"*.d.ts"
],
"scripts": {
"check": "tsc --noEmit",
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
Expand All @@ -46,6 +47,9 @@
"memoizerific": "^1.11.3",
"prop-types": "^15.7.2"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/common/component-story-mdx-dedent.mdx.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import { Source } from '@storybook/addon-docs';

import dedent from 'ts-dedent';
import { dedent } from 'ts-dedent';

## With code snippet

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import { Description } from '@storybook/addon-docs';

import dedent from 'ts-dedent';
import { dedent } from 'ts-dedent';

import { Button } from './Button';

Expand Down
2 changes: 1 addition & 1 deletion examples/external-docs/pages/api/hello.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction

export default function handler(req, res) {
res.status(200).json({ name: 'John Doe' })
res.status(200).json({ name: 'John Doe' });
}
1 change: 1 addition & 0 deletions frameworks/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"*.d.ts"
],
"scripts": {
"check": "tsc --noEmit",
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
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 => {
// Duplicate code for Standalone error handling
Expand Down
Loading