Skip to content

Commit

Permalink
Merge branch 'future/base' into fix/builder-stats-typings
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Jul 6, 2022
2 parents 0502e0d + 0bcc17b commit b49b835
Show file tree
Hide file tree
Showing 462 changed files with 6,341 additions and 5,196 deletions.
6 changes: 4 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ jobs:
command: yarn install --immutable
- run:
name: Bootstrap
command: yarn bootstrap --build --manager
command: |
yarn bootstrap --build
git diff --exit-code
- save_cache:
name: Save Yarn cache
key: build-yarn-2-cache-v3--{{ checksum "yarn.lock" }}
Expand Down Expand Up @@ -269,7 +271,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
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ docs/public
storybook-static
built-storybooks
lib/cli/test
lib/manager-webpack5/prebuilt
lib/core-server/prebuilt
lib/codemod/src/transforms/__testfixtures__
scripts/storage
scripts/repros-generator
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ cypress/screenshots
examples/ember-cli/ember-output
.verdaccio-cache
tsconfig.tsbuildinfo
lib/manager-webpack5/prebuilt
lib/manager-webpack5/prebuilt
examples/angular-cli/addon-jest.testresults.json
junit.xml
.next
Expand Down
64 changes: 64 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,67 @@
## 7.0.0-alpha.11 (July 6, 2022)

### Features

- Interactions: Show exceptions by non-instrumented code in panel ([#16592](https://github.com/storybookjs/storybook/pull/16592))

### Maintenance

- Build: Add linter for ejs ([#18637](https://github.com/storybookjs/storybook/pull/18637))
- Core: Improve interopRequireDefault ([#18638](https://github.com/storybookjs/storybook/pull/18638))
- Core: Pre-built manager using esbuild ([#18550](https://github.com/storybookjs/storybook/pull/18550))
- Build: Add check-packages script plus misc improvements ([#18633](https://github.com/storybookjs/storybook/pull/18633))
- Core: Typing useArgs ([#17735](https://github.com/storybookjs/storybook/pull/17735))
- Build: Add a check script to each package ([#18603](https://github.com/storybookjs/storybook/pull/18603))
- Build: Use playwright in benchmark ([#18606](https://github.com/storybookjs/storybook/pull/18606))

## 7.0.0-alpha.10 (July 2, 2022)

### Features

- Addon-docs: Include Vue methods in ArgsTable ([#18609](https://github.com/storybookjs/storybook/pull/18609))
- UI: Fix default theme according to preferred color scheme ([#17311](https://github.com/storybookjs/storybook/pull/17311))
- Storyshots: Add SnapshotsWithOptionsArgType ([#15712](https://github.com/storybookjs/storybook/pull/15712))
- Controls: Add max length config to text control ([#14396](https://github.com/storybookjs/storybook/pull/14396))

### Bug Fixes

- CLI/HTML: Improve HTML typescript stories ([#18618](https://github.com/storybookjs/storybook/pull/18618))
- Controls: Throttle color controls and make `updateArgs` and `resetArgs` stable ([#18335](https://github.com/storybookjs/storybook/pull/18335))
- Controls: Silence unexpected control type enum for color matchers ([#16334](https://github.com/storybookjs/storybook/pull/16334))
- UI: Stop add-on Draggable from overlapping the vertical scrollbar when stories overflow ([#17663](https://github.com/storybookjs/storybook/pull/17663))
- React: Fix source snippet decorator for story functions with suspense ([#17915](https://github.com/storybookjs/storybook/pull/17915))
- Core: Avoid logging an object on compilation errors ([#15885](https://github.com/storybookjs/storybook/pull/15885))
- UI: Fix router handling of URLs containing "settings" ([#16245](https://github.com/storybookjs/storybook/pull/16245))
- UI: Fix viewMode handling on navigation ([#16912](https://github.com/storybookjs/storybook/pull/16912))
- UI: Fix loading title ([#17935](https://github.com/storybookjs/storybook/pull/17935))

### Maintenance

- Examples/Vue: Fix missing a vue-template-compiler dependency ([#17485](https://github.com/storybookjs/storybook/pull/17485))
- Fix homepage core-server ([#18121](https://github.com/storybookjs/storybook/pull/18121))
- UI: Replace references to `themes.normal` with `themes.light` ([#17034](https://github.com/storybookjs/storybook/pull/17034))

### Dependency Upgrades

- Upgrade file-system-cache to 2.0.0 and remove custom types ([#18253](https://github.com/storybookjs/storybook/pull/18253))
- Security: Update x-default-browser and fix issue with package. ([#18277](https://github.com/storybookjs/storybook/pull/18277))
- Update puppeteer dependencies version ([#15163](https://github.com/storybookjs/storybook/pull/15163))
- Upgrade react-syntax-highlighter to v15.5.0 ([#18009](https://github.com/storybookjs/storybook/pull/18009))

## 7.0.0-alpha.9 (July 2, 2022)

Failed publish

## 7.0.0-alpha.8 (June 29, 2022)

### Features

- Webpack: Support .cjs extension ([#18502](https://github.com/storybookjs/storybook/pull/18502))

### Maintenance

- Docs2: Extract doc blocks into a separate package ([#18587](https://github.com/storybookjs/storybook/pull/18587))

## 7.0.0-alpha.7 (June 29, 2022)

### Features
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,18 @@
</a>
</p>

[Storybook](https://storybook.js.org) is a development environment for UI components.
It allows you to browse a component library, view the different states of each component, and interactively develop and test components. Find out more at https://storybook.js.org.
<p align="center">Storybook is a development environment for UI components.<br/>
It allows you to browse a component library, view the different states of each component, and interactively develop and test components.<br/>Find out more at https://storybook.js.org.</p>

<center>
<img src="https://raw.githubusercontent.com/storybookjs/storybook/main/media/storybook-intro.gif" width="100%" />
</center>

<p align="center">
View README for:<br/>
<a href="https://github.com/storybookjs/storybook/blob/main/README.md" title="latest"><img alt="latest" src="https://img.shields.io/npm/v/@storybook/core/latest?style=for-the-badge&logo=storybook&logoColor=ffffff&color=ff4785" /></a>
<a href="https://github.com/storybookjs/storybook/blob/next/README.md" title="next"><img alt="next" src="https://img.shields.io/npm/v/@storybook/core/next?style=for-the-badge&logo=storybook&logoColor=ffffff&color=purple" /></a>
<a href="https://github.com/storybookjs/storybook/blob/main/README.md" title="latest"><img alt="latest" src="https://img.shields.io/npm/v/@storybook/core/latest?style=for-the-badge&logo=storybook&logoColor=ffffff&color=66BF3C" /></a>
<a href="https://github.com/storybookjs/storybook/blob/next/README.md" title="next"><img alt="next" src="https://img.shields.io/npm/v/@storybook/core/next?style=for-the-badge&logo=storybook&logoColor=ffffff&color=1EA7FD" /></a>
<a href="https://github.com/storybookjs/storybook/blob/future/base/README.md" title="future"><img alt="future" src="https://img.shields.io/npm/v/@storybook/core-common/future?style=for-the-badge&logo=storybook&logoColor=ffffff&color=FF4785" /></a>
</p>

## Table of contents
Expand Down
24 changes: 13 additions & 11 deletions addons/a11y/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-a11y",
"version": "7.0.0-alpha.7",
"version": "7.0.0-alpha.11",
"description": "Test component compliance with web accessibility standards",
"keywords": [
"a11y",
Expand Down Expand Up @@ -35,18 +35,19 @@
"*.d.ts"
],
"scripts": {
"check": "tsc --noEmit",
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addon-highlight": "7.0.0-alpha.7",
"@storybook/addons": "7.0.0-alpha.7",
"@storybook/api": "7.0.0-alpha.7",
"@storybook/channels": "7.0.0-alpha.7",
"@storybook/client-logger": "7.0.0-alpha.7",
"@storybook/components": "7.0.0-alpha.7",
"@storybook/core-events": "7.0.0-alpha.7",
"@storybook/addon-highlight": "7.0.0-alpha.11",
"@storybook/addons": "7.0.0-alpha.11",
"@storybook/api": "7.0.0-alpha.11",
"@storybook/channels": "7.0.0-alpha.11",
"@storybook/client-logger": "7.0.0-alpha.11",
"@storybook/components": "7.0.0-alpha.11",
"@storybook/core-events": "7.0.0-alpha.11",
"@storybook/csf": "0.0.2--canary.4566f4d.1",
"@storybook/theming": "7.0.0-alpha.7",
"@storybook/theming": "7.0.0-alpha.11",
"axe-core": "^4.2.0",
"core-js": "^3.8.2",
"global": "^4.4.0",
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 All @@ -73,7 +75,7 @@
"publishConfig": {
"access": "public"
},
"gitHead": "d334cabd251cd0ed8b845a87707dc84f007d4074",
"gitHead": "688d338903e84a7e83cb104472e868e734399f65",
"storybook": {
"displayName": "Accessibility",
"icon": "https://user-images.githubusercontent.com/263385/101991665-47042f80-3c7c-11eb-8f00-64b5a18f498a.png",
Expand Down
6 changes: 3 additions & 3 deletions addons/a11y/src/components/A11yContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ interface A11yContextStore {
}

const colorsByType = [
convert(themes.normal).color.negative, // VIOLATION,
convert(themes.normal).color.positive, // PASS,
convert(themes.normal).color.warning, // INCOMPLETION,
convert(themes.light).color.negative, // VIOLATION,
convert(themes.light).color.positive, // PASS,
convert(themes.light).color.warning, // INCOMPLETION,
];

export const A11yContext = React.createContext<A11yContextStore>({
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
20 changes: 11 additions & 9 deletions addons/actions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-actions",
"version": "7.0.0-alpha.7",
"version": "7.0.0-alpha.11",
"description": "Get UI feedback when an action is performed on an interactive element",
"keywords": [
"storybook",
Expand Down Expand Up @@ -31,16 +31,17 @@
"*.d.ts"
],
"scripts": {
"check": "tsc --noEmit",
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "7.0.0-alpha.7",
"@storybook/api": "7.0.0-alpha.7",
"@storybook/client-logger": "7.0.0-alpha.7",
"@storybook/components": "7.0.0-alpha.7",
"@storybook/core-events": "7.0.0-alpha.7",
"@storybook/addons": "7.0.0-alpha.11",
"@storybook/api": "7.0.0-alpha.11",
"@storybook/client-logger": "7.0.0-alpha.11",
"@storybook/components": "7.0.0-alpha.11",
"@storybook/core-events": "7.0.0-alpha.11",
"@storybook/csf": "0.0.2--canary.4566f4d.1",
"@storybook/theming": "7.0.0-alpha.7",
"@storybook/theming": "7.0.0-alpha.11",
"core-js": "^3.8.2",
"fast-deep-equal": "^3.1.3",
"global": "^4.4.0",
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 All @@ -71,7 +73,7 @@
"publishConfig": {
"access": "public"
},
"gitHead": "d334cabd251cd0ed8b845a87707dc84f007d4074",
"gitHead": "688d338903e84a7e83cb104472e868e734399f65",
"storybook": {
"displayName": "Actions",
"unsupportedFrameworks": [
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
20 changes: 12 additions & 8 deletions addons/backgrounds/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-backgrounds",
"version": "7.0.0-alpha.7",
"version": "7.0.0-alpha.11",
"description": "Switch backgrounds to view components in different settings",
"keywords": [
"addon",
Expand Down Expand Up @@ -35,22 +35,26 @@
"*.d.ts"
],
"scripts": {
"check": "tsc --noEmit",
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "7.0.0-alpha.7",
"@storybook/api": "7.0.0-alpha.7",
"@storybook/client-logger": "7.0.0-alpha.7",
"@storybook/components": "7.0.0-alpha.7",
"@storybook/core-events": "7.0.0-alpha.7",
"@storybook/addons": "7.0.0-alpha.11",
"@storybook/api": "7.0.0-alpha.11",
"@storybook/client-logger": "7.0.0-alpha.11",
"@storybook/components": "7.0.0-alpha.11",
"@storybook/core-events": "7.0.0-alpha.11",
"@storybook/csf": "0.0.2--canary.4566f4d.1",
"@storybook/theming": "7.0.0-alpha.7",
"@storybook/theming": "7.0.0-alpha.11",
"core-js": "^3.8.2",
"global": "^4.4.0",
"memoizerific": "^1.11.3",
"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 All @@ -66,7 +70,7 @@
"publishConfig": {
"access": "public"
},
"gitHead": "d334cabd251cd0ed8b845a87707dc84f007d4074",
"gitHead": "688d338903e84a7e83cb104472e868e734399f65",
"storybook": {
"displayName": "Backgrounds",
"icon": "https://user-images.githubusercontent.com/263385/101991667-479cc600-3c7c-11eb-96d3-410e936252e7.png",
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
22 changes: 12 additions & 10 deletions addons/controls/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-controls",
"version": "7.0.0-alpha.7",
"version": "7.0.0-alpha.11",
"description": "Interact with component inputs dynamically in the Storybook UI",
"keywords": [
"addon",
Expand Down Expand Up @@ -35,18 +35,20 @@
"*.d.ts"
],
"scripts": {
"check": "tsc --noEmit",
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "7.0.0-alpha.7",
"@storybook/api": "7.0.0-alpha.7",
"@storybook/client-logger": "7.0.0-alpha.7",
"@storybook/components": "7.0.0-alpha.7",
"@storybook/core-common": "7.0.0-alpha.7",
"@storybook/addons": "7.0.0-alpha.11",
"@storybook/api": "7.0.0-alpha.11",
"@storybook/blocks": "7.0.0-alpha.11",
"@storybook/client-logger": "7.0.0-alpha.11",
"@storybook/components": "7.0.0-alpha.11",
"@storybook/core-common": "7.0.0-alpha.11",
"@storybook/csf": "0.0.2--canary.4566f4d.1",
"@storybook/node-logger": "7.0.0-alpha.7",
"@storybook/store": "7.0.0-alpha.7",
"@storybook/theming": "7.0.0-alpha.7",
"@storybook/node-logger": "7.0.0-alpha.11",
"@storybook/store": "7.0.0-alpha.11",
"@storybook/theming": "7.0.0-alpha.11",
"core-js": "^3.8.2",
"lodash": "^4.17.21",
"ts-dedent": "^2.0.0"
Expand All @@ -66,7 +68,7 @@
"publishConfig": {
"access": "public"
},
"gitHead": "d334cabd251cd0ed8b845a87707dc84f007d4074",
"gitHead": "688d338903e84a7e83cb104472e868e734399f65",
"storybook": {
"displayName": "Controls",
"icon": "https://user-images.githubusercontent.com/263385/101991669-479cc600-3c7c-11eb-93d9-38b67e8371f2.png",
Expand Down
Loading

0 comments on commit b49b835

Please sign in to comment.