Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/next' into kasper/fix-nx-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperpeulen committed Mar 18, 2024
2 parents 30a7e25 + b016a4f commit a1657fa
Show file tree
Hide file tree
Showing 270 changed files with 2,292 additions and 1,530 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ jobs:
command: |
yarn task --task compile --start-from=auto --no-link --debug
git diff --exit-code
yarn dedupe --check
- run:
name: Publish to Verdaccio
command: |
Expand Down
11 changes: 6 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,19 @@ body:
attributes:
label: To Reproduce
description: >-
We prioritize bug reports that have a reproduction. You can create a reproduction using [storybook.new](https://storybook.new), or by running `npx sb@next sandbox` and
following the instructions. Read our
[documentation](https://storybook.js.org/docs/react/contribute/how-to-reproduce)
to learn more about creating reproductions.
Due to the high volume of reports we receive, we can only prioritize bug reports that include a clear reproduction of the problem. Please use [storybook.new](https://storybook.new) to create one, and consult our [documentation](https://storybook.js.org/docs/react/contribute/how-to-reproduce) for guidance. Thank you for your understanding!
placeholder: >-
Paste a link to your reproduction here. We prioritize issues with reproductions over those without.
Please provide a link to your reproduction here. If creating a reproduction really isn't feasible, let us know and be sure to include as much detail as you can to help us understand the issue.
validations:
required: true
- type: textarea
id: system
attributes:
label: System
description: Please paste the results of `npx storybook@latest info` here.
render: bash
validations:
required: true
- type: textarea
id: context
attributes:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/canary-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@ jobs:
echo "timestamp=$(date +%s)" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ steps.info.outputs.isFork == 'true' && steps.info.outputs.repository || null }}
ref: ${{ steps.info.outputs.sha }}
token: ${{ secrets.GH_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.yarn/berry/cache
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/cron-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ name: Markdown Links Check
# runs every monday at 9 am
on:
schedule:
- cron: '0 9 * * 1'
- cron: "0 9 * * 1"

jobs:
check-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: gaurav-nelson/github-action-markdown-link-check@v1
# checks all markdown files from important folders including all subfolders
with:
# only show errors that occur instead of successful links + errors
use-quiet-mode: 'yes'
use-quiet-mode: "yes"
# output full HTTP info for broken links
use-verbose-mode: 'yes'
config-file: '.github/workflows/markdown-link-check-config.json'
use-verbose-mode: "yes"
config-file: ".github/workflows/markdown-link-check-config.json"
# Notify to Discord channel on failure
- name: Send Discord Notification
if: failure() # Only run this step if previous steps failed
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/danger-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
name: Danger JS
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
- name: Danger JS
uses: danger/danger-js@11.2.6
env:
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/handle-release-branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
if: ${{ needs.branch-checks.outputs.is-latest-branch == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- run: curl -X POST "https://api.netlify.com/build_hooks/${{ secrets.FRONTPAGE_HOOK }}"

Expand All @@ -32,7 +32,7 @@ jobs:
if: ${{ needs.branch-checks.outputs.is-next-branch == 'true' || needs.branch-checks.outputs.is-release-branch == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: next
path: next
Expand All @@ -54,7 +54,7 @@ jobs:
if: ${{ needs.branch-checks.outputs.is-next-branch == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -88,7 +88,8 @@ jobs:

request-create-frontpage-branch:
if: ${{ always() }}
needs: [branch-checks, next-release-branch-check, create-next-release-branch]
needs:
[branch-checks, next-release-branch-check, create-next-release-branch]
runs-on: ubuntu-latest
steps:
- if: ${{ needs.branch-checks.outputs.is-actionable-branch == 'true' && needs.branch-checks.outputs.is-latest-branch == 'false' && needs.next-release-branch-check.outputs.check == 'false' }}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/prepare-non-patch-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ on:
workflow_dispatch:
inputs:
release-type:
description: 'Which release type to use for bumping the version'
description: "Which release type to use for bumping the version"
required: true
default: 'prerelease'
default: "prerelease"
type: choice
options:
- prerelease
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
working-directory: scripts
steps:
- name: Checkout next
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: next
# this needs to be set to a high enough number that it will contain the last version tag
Expand All @@ -52,12 +52,12 @@ jobs:
token: ${{ secrets.GH_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"

- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.yarn/berry/cache
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
run: |
yarn release:write-changelog ${{ steps.bump-version.outputs.next-version }} --verbose
- name: 'Commit changes to branch: version-non-patch-from-${{ steps.bump-version.outputs.current-version }}'
- name: "Commit changes to branch: version-non-patch-from-${{ steps.bump-version.outputs.current-version }}"
working-directory: .
run: |
git config --global user.name 'storybook-bot'
Expand Down Expand Up @@ -180,4 +180,4 @@ jobs:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_MONITORING_URL }}
uses: Ilshidur/action-discord@master
with:
args: 'The GitHub Action for preparing the release pull request bumping from v${{ steps.bump-version.outputs.current-version }} to v${{ steps.bump-version.outputs.next-version }} (triggered by ${{ github.triggering_actor }}) failed! See run at: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'
args: "The GitHub Action for preparing the release pull request bumping from v${{ steps.bump-version.outputs.current-version }} to v${{ steps.bump-version.outputs.next-version }} (triggered by ${{ github.triggering_actor }}) failed! See run at: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
6 changes: 3 additions & 3 deletions .github/workflows/prepare-patch-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ jobs:
working-directory: scripts
steps:
- name: Checkout main
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: main
token: ${{ secrets.GH_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"

- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.yarn/berry/cache
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ jobs:
gh run watch ${{ github.run_id }}
- name: Checkout ${{ github.ref_name }}
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 100
token: ${{ secrets.GH_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"

- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.yarn/berry/cache
Expand Down Expand Up @@ -197,4 +197,4 @@ jobs:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_MONITORING_URL }}
uses: Ilshidur/action-discord@master
with:
args: 'The GitHub Action for publishing version ${{ steps.version.outputs.current-version }} (triggered by ${{ github.triggering_actor }}) failed! See run at: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'
args: "The GitHub Action for publishing version ${{ steps.version.outputs.current-version }} (triggered by ${{ github.triggering_actor }}) failed! See run at: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
12 changes: 6 additions & 6 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: 'Close stale issues that need reproduction or more info from OP'
name: "Close stale issues that need reproduction or more info from OP"
on:
schedule:
- cron: '30 1 * * *'
- cron: "30 1 * * *"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
- uses: actions/stale@v9
with:
stale-issue-message: "Hi there! Thank you for opening this issue, but it has been marked as `stale` because we need more information to move forward. Could you please provide us with the requested reproduction or additional information that could help us better understand the problem? We'd love to resolve this issue, but we can't do it without your help!"
close-issue-message: "I'm afraid we need to close this issue for now, since we can't take any action without the requested reproduction or additional information. But please don't hesitate to open a new issue if the problem persists – we're always happy to help. Thanks so much for your understanding."
any-of-labels: 'needs reproduction,needs more info'
exempt-issue-labels: 'needs triage'
labels-to-add-when-unstale: 'needs triage'
any-of-labels: "needs reproduction,needs more info"
exempt-issue-labels: "needs triage"
labels-to-add-when-unstale: "needs triage"
days-before-stale: 21
days-before-pr-stale: -1
6 changes: 3 additions & 3 deletions .github/workflows/tests-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
os: [windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set node version
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
- name: install and compile
run: yarn task --task compile --start-from=auto --no-link
- name: test
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.prerelease.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
## 8.1.0-alpha.2

- CLI: Automigrate improve upgrade storybook related packages - [#26497](https://github.com/storybookjs/storybook/pull/26497), thanks @ndelangen!
- CLI: Improve `vite-config-file.ts` - [#26375](https://github.com/storybookjs/storybook/pull/26375), thanks @joevaugh4n!
- Controls: Fix number controls do not reset - [#26372](https://github.com/storybookjs/storybook/pull/26372), thanks @jiyiru!
- Core: Optimize clearNotification - [#26415](https://github.com/storybookjs/storybook/pull/26415), thanks @ndelangen!
- Portable stories: Make setProjectAnnotations accept multiple types of imports - [#26316](https://github.com/storybookjs/storybook/pull/26316), thanks @yannbf!
- UI: Add key property to list children in Highlight component - [#26471](https://github.com/storybookjs/storybook/pull/26471), thanks @valentinpalkovic!
- UI: Fix search result color contrast - [#26287](https://github.com/storybookjs/storybook/pull/26287), thanks @winchesHe!

## 8.1.0-alpha.1

- Maintenance: Fix performance regressions - [#26411](https://github.com/storybookjs/storybook/pull/26411), thanks @kasperpeulen!

## 8.1.0-alpha.0


## 8.0.0-rc.5

- CLI: Automigration fix version detection of upgrading related packages - [#26410](https://github.com/storybookjs/storybook/pull/26410), thanks @ndelangen!
Expand Down
6 changes: 3 additions & 3 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,8 @@ For migrating to CSF, see: [`storyStoreV6` and `storiesOf` is deprecated](#story
In Storybook 7, these packages existed for backwards compatibility, but were marked as deprecated:

- `@storybook/addons` - this package has been split into 2 packages: `@storybook/preview-api` and `@storybook/manager-api`, see more here: [New Addons API](#new-addons-api).
- `@storybook/channel-postmessage` - this package has been merged into `@storybook/channel`.
- `@storybook/channel-websocket` - this package has been merged into `@storybook/channel`.
- `@storybook/channel-postmessage` - this package has been merged into `@storybook/channels`.
- `@storybook/channel-websocket` - this package has been merged into `@storybook/channels`.
- `@storybook/client-api` - this package has been merged into `@storybook/preview-api`.
- `@storybook/core-client` - this package has been merged into `@storybook/preview-api`.
- `@storybook/preview-web` - this package has been merged into `@storybook/preview-api`.
Expand Down Expand Up @@ -554,7 +554,7 @@ export default defineConfig({

```ts
import { defineConfig } from "vite";
import svelte from "@sveltejs/vite-plugin-svelte";
import { svelte } from "@sveltejs/vite-plugin-svelte";

export default defineConfig({
plugins: [svelte()],
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion code/addons/a11y/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-a11y",
"version": "8.1.0-alpha.0",
"version": "8.1.0-alpha.2",
"description": "Test component compliance with web accessibility standards",
"keywords": [
"a11y",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/actions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-actions",
"version": "8.1.0-alpha.0",
"version": "8.1.0-alpha.2",
"description": "Get UI feedback when an action is performed on an interactive element",
"keywords": [
"storybook",
Expand Down
3 changes: 1 addition & 2 deletions code/addons/actions/src/runtime/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ const isReactSyntheticEvent = (e: unknown): e is SyntheticEvent =>
findProto(e, (proto) => /^Synthetic(?:Base)?Event$/.test(proto.constructor.name)) &&
typeof (e as SyntheticEvent).persist === 'function'
);
const serializeArg = <T>(a: T) => {
const serializeArg = <T extends object>(a: T) => {
if (isReactSyntheticEvent(a)) {
const e: SyntheticEvent = Object.create(
// @ts-expect-error (Converted from ts-ignore)
a.constructor.prototype,
Object.getOwnPropertyDescriptors(a)
);
Expand Down
Loading

0 comments on commit a1657fa

Please sign in to comment.