Skip to content

Commit 05eb71f

Browse files
authored
Merge branch 'next' into fix-select-double-spaces
2 parents 8dc11d5 + 64e1ac9 commit 05eb71f

File tree

164 files changed

+2286
-1507
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+2286
-1507
lines changed

.circleci/config.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -555,27 +555,27 @@ workflows:
555555
requires:
556556
- unit-tests
557557
- create-sandboxes:
558-
parallelism: 20
558+
parallelism: 21
559559
requires:
560560
- build
561561
- build-sandboxes:
562-
parallelism: 20
562+
parallelism: 21
563563
requires:
564564
- create-sandboxes
565565
- chromatic-sandboxes:
566-
parallelism: 17
566+
parallelism: 18
567567
requires:
568568
- build-sandboxes
569569
- e2e-production:
570-
parallelism: 17
570+
parallelism: 18
571571
requires:
572572
- build-sandboxes
573573
- e2e-dev:
574574
parallelism: 4
575575
requires:
576576
- create-sandboxes
577577
- test-runner-production:
578-
parallelism: 17
578+
parallelism: 18
579579
requires:
580580
- build-sandboxes
581581
- bench:
@@ -609,30 +609,30 @@ workflows:
609609
requires:
610610
- build
611611
- create-sandboxes:
612-
parallelism: 33
612+
parallelism: 34
613613
requires:
614614
- build
615615
# - smoke-test-sandboxes: # disabled for now
616616
# requires:
617617
# - create-sandboxes
618618
- build-sandboxes:
619-
parallelism: 33
619+
parallelism: 34
620620
requires:
621621
- create-sandboxes
622622
- chromatic-sandboxes:
623-
parallelism: 30
623+
parallelism: 31
624624
requires:
625625
- build-sandboxes
626626
- e2e-production:
627-
parallelism: 30
627+
parallelism: 31
628628
requires:
629629
- build-sandboxes
630630
- e2e-dev:
631631
parallelism: 4
632632
requires:
633633
- create-sandboxes
634634
- test-runner-production:
635-
parallelism: 30
635+
parallelism: 31
636636
requires:
637637
- build-sandboxes
638638
# TODO: reenable once we find out the source of flakyness

.github/workflows/prepare-prerelease.yml renamed to .github/workflows/prepare-non-patch-release.yml

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: Prepare prerelease PR
2-
run-name: Prepare prerelease PR, triggered by ${{ github.triggering_actor }}
1+
name: Prepare non-patch PR
2+
run-name: Prepare non-patch PR, triggered by ${{ github.triggering_actor }}
33

44
on:
55
push:
@@ -34,8 +34,8 @@ concurrency:
3434
cancel-in-progress: true
3535

3636
jobs:
37-
prepare-prerelease-pull-request:
38-
name: Prepare prerelease pull request
37+
prepare-non-patch-pull-request:
38+
name: Prepare non-patch pull request
3939
runs-on: ubuntu-latest
4040
environment: release
4141
defaults:
@@ -112,21 +112,37 @@ jobs:
112112
run: |
113113
yarn release:version --deferred --release-type ${{ inputs.release-type || 'prerelease' }} ${{ inputs.pre-id && format('{0} {1}', '--pre-id', inputs.pre-id) || '' }} --verbose
114114
115+
- name: Check release vs prerelease
116+
id: is-prerelease
117+
run: yarn release:is-prerelease
118+
115119
- name: Write changelog
116120
env:
117121
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
118122
run: |
119123
yarn release:write-changelog ${{ steps.bump-version.outputs.next-version }} --verbose
120124
121-
- name: 'Commit changes to branch: version-prerelease-from-${{ steps.bump-version.outputs.current-version }}'
125+
- name: 'Commit changes to branch: version-non-patch-from-${{ steps.bump-version.outputs.current-version }}'
122126
working-directory: .
123127
run: |
124128
git config --global user.name 'storybook-bot'
125129
git config --global user.email '32066757+storybook-bot@users.noreply.github.com'
126-
git checkout -b version-prerelease-from-${{ steps.bump-version.outputs.current-version }}
130+
git checkout -b version-non-patch-from-${{ steps.bump-version.outputs.current-version }}
131+
git add .
132+
git commit -m "Write changelog for ${{ steps.bump-version.outputs.next-version }} [skip ci]" || true
133+
git push --force origin version-non-patch-from-${{ steps.bump-version.outputs.current-version }}
134+
135+
- name: Resolve merge-conflicts with base branch
136+
if: steps.is-prerelease.outputs.prerelease == 'false'
137+
working-directory: .
138+
env:
139+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
140+
run: |
141+
git config pull.rebase false
142+
git pull --no-commit --no-ff origin latest-release || true
143+
git checkout --ours .
127144
git add .
128-
git commit -m "Write changelog for ${{ steps.bump-version.outputs.next-version }}" || true
129-
git push --force origin version-prerelease-from-${{ steps.bump-version.outputs.current-version }}
145+
git commit --no-verify -m "Merge latest-release into version-non-patch-from-${{ steps.bump-version.outputs.current-version }} with conflicts resolved to ours [skip ci]"
130146
131147
- name: Generate PR description
132148
id: description
@@ -144,14 +160,15 @@ jobs:
144160
gh pr edit \
145161
--repo "${{github.repository }}" \
146162
--title "Release: $CAPITALIZED_RELEASE_TYPE ${{ inputs.pre-id && format('{0} ', inputs.pre-id) }}${{ steps.bump-version.outputs.next-version }}" \
163+
--base ${{ steps.is-prerelease.outputs.prerelease == 'true' && 'next-release' || 'latest-release' }} \
147164
--body "${{ steps.description.outputs.description }}"
148165
else
149166
gh pr create \
150167
--repo "${{github.repository }}"\
151168
--title "Release: $CAPITALIZED_RELEASE_TYPE ${{ inputs.pre-id && format('{0} ', inputs.pre-id) }}${{ steps.bump-version.outputs.next-version }}" \
152169
--label "release" \
153-
--base next-release \
154-
--head version-prerelease-from-${{ steps.bump-version.outputs.current-version }} \
170+
--base ${{ steps.is-prerelease.outputs.prerelease == 'true' && 'next-release' || 'latest-release' }} \
171+
--head version-non-patch-from-${{ steps.bump-version.outputs.current-version }} \
155172
--body "${{ steps.description.outputs.description }}"
156173
fi
157174

.github/workflows/prepare-patch-release.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,15 @@ jobs:
8888
git config --global user.email '32066757+storybook-bot@users.noreply.github.com'
8989
yarn release:pick-patches
9090
91+
- name: Cancel when no patches to pick
92+
if: steps.pick-patches.outputs.pr-count == '0' && steps.pick-patches.outputs.pr-count != null
93+
env:
94+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
95+
# From https://stackoverflow.com/a/75809743
96+
run: |
97+
gh run cancel ${{ github.run_id }}
98+
gh run watch ${{ github.run_id }}
99+
91100
- name: Bump version deferred
92101
id: bump-version
93102
if: steps.unreleased-changes.outputs.has-changes-to-release == 'true'
@@ -121,7 +130,7 @@ jobs:
121130
git config --global user.email '32066757+storybook-bot@users.noreply.github.com'
122131
git checkout -b version-patch-from-${{ steps.versions.outputs.current }}
123132
git add .
124-
git commit -m "Write changelog for ${{ steps.versions.outputs.next }}" || true
133+
git commit -m "Write changelog for ${{ steps.versions.outputs.next }} [skip ci]" || true
125134
git push --force origin version-patch-from-${{ steps.versions.outputs.current }}
126135
127136
- name: Generate PR description

.github/workflows/publish.yml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ jobs:
3636
gh run cancel ${{ github.run_id }}
3737
gh run watch ${{ github.run_id }}
3838
39+
- name: Cancel all release preparation runs
40+
env:
41+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
run: yarn release:cancel-preparation-runs
43+
3944
- name: Checkout ${{ github.ref_name }}
4045
uses: actions/checkout@v3
4146
with:
@@ -63,7 +68,6 @@ jobs:
6368
yarn install
6469
6570
- name: Apply deferred version bump and commit
66-
id: version-bump
6771
working-directory: .
6872
run: |
6973
CURRENT_VERSION=$(cat ./code/package.json | jq '.version')
@@ -122,12 +126,11 @@ jobs:
122126
run: git fetch --tags origin
123127

124128
# when this is a patch release from main, label any patch PRs included in the release
125-
# when this is a stable release from next, label ALL patch PRs found, as they will per definition be "patched" now
126129
- name: Label patch PRs as picked
127-
if: github.ref_name == 'latest-release' || (steps.publish-needed.outputs.published == 'false' && steps.target.outputs.target == 'next' && !steps.is-prerelease.outputs.prerelease)
130+
if: github.ref_name == 'latest-release'
128131
env:
129132
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
130-
run: yarn release:label-patches ${{ steps.target.outputs.target == 'next' && '--all' || '' }}
133+
run: yarn release:label-patches
131134

132135
- name: Create GitHub Release
133136
if: steps.publish-needed.outputs.published == 'false'
@@ -151,16 +154,28 @@ jobs:
151154
git merge ${{ github.ref_name }}
152155
git push origin ${{ steps.target.outputs.target }}
153156
157+
- name: Ensure `next` is a minor version ahead of `main`
158+
if: steps.target.outputs.target == 'main'
159+
run: |
160+
git checkout next
161+
git pull
162+
163+
yarn release:ensure-next-ahead --main-version "${{ steps.version.outputs.current-version }}"
164+
165+
git add ..
166+
git commit -m "Bump next to be one minor ahead of main [skip ci]"
167+
git push origin next
168+
154169
- name: Sync CHANGELOG.md from `main` to `next`
155-
if: github.ref_name == 'latest-release'
170+
if: steps.target.outputs.target == 'main'
156171
working-directory: .
157172
run: |
158173
git fetch origin next
159174
git checkout next
160175
git pull
161176
git checkout origin/main ./CHANGELOG.md
162177
git add ./CHANGELOG.md
163-
git commit -m "Update CHANGELOG.md for v${{ steps.version.outputs.current-version }} [skip ci]"
178+
git commit -m "Update CHANGELOG.md for v${{ steps.version.outputs.current-version }} [skip ci]" || true
164179
git push origin next
165180
166181
- name: Sync version JSONs from `next-release` to `main`
@@ -176,10 +191,6 @@ jobs:
176191
git commit -m "Update $VERSION_FILE for v${{ steps.version.outputs.current-version }}"
177192
git push origin main
178193
179-
- name: Overwrite main with next
180-
if: steps.target.outputs.target == 'next' && steps.is-prerelease.outputs.prerelease == 'false'
181-
run: git push --force origin next:main
182-
183194
- name: Report job failure to Discord
184195
if: failure()
185196
env:

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 7.4.6
2+
3+
- CLI: Fix Nextjs project detection - [#24346](https://github.com/storybookjs/storybook/pull/24346), thanks [@yannbf](https://github.com/yannbf)!
4+
- Core: Fix missing favicon during dev - [#24356](https://github.com/storybookjs/storybook/pull/24356), thanks [@ndelangen](https://github.com/ndelangen)!
5+
16
## 7.4.5
27

38
- UI: Fix infinite hook call causing browsers to freeze - [#24291](https://github.com/storybookjs/storybook/pull/24291), thanks [@yannbf](https://github.com/yannbf)!

CHANGELOG.prerelease.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## 7.5.0-alpha.4
2+
3+
- CLI: Fix Nextjs project detection - [#24346](https://github.com/storybookjs/storybook/pull/24346), thanks [@yannbf](https://github.com/yannbf)!
4+
- Core: Deprecate `storyStoreV6` (including `storiesOf`) and `storyIndexers` - [#23938](https://github.com/storybookjs/storybook/pull/23938), thanks [@JReinhold](https://github.com/JReinhold)!
5+
- Core: Fix Promise cycle bug in useSharedState - [#24268](https://github.com/storybookjs/storybook/pull/24268), thanks [@ndelangen](https://github.com/ndelangen)!
6+
- Core: Fix missing favicon during dev - [#24356](https://github.com/storybookjs/storybook/pull/24356), thanks [@ndelangen](https://github.com/ndelangen)!
7+
- NextJS: Change babel plugins from `proposal-...` to `transform-...` - [#24290](https://github.com/storybookjs/storybook/pull/24290), thanks [@roottool](https://github.com/roottool)!
8+
- Nextjs: Improve support for Windows-style paths - [#23695](https://github.com/storybookjs/storybook/pull/23695), thanks [@T99](https://github.com/T99)!
9+
- UI: Fix infinite hook call causing browsers to freeze - [#24291](https://github.com/storybookjs/storybook/pull/24291), thanks [@yannbf](https://github.com/yannbf)!
10+
- UI: Improve contrast ratio between focus / hover - [#24205](https://github.com/storybookjs/storybook/pull/24205), thanks [@chocoscoding](https://github.com/chocoscoding)!
11+
- Vite: Move mdx-plugin from @storybook/builder-vite to @storybook/addon-docs - [#24166](https://github.com/storybookjs/storybook/pull/24166), thanks [@bryanjtc](https://github.com/bryanjtc)!
12+
113
## 7.5.0-alpha.3
214

315
- Build: Filter some manager errors - [#24217](https://github.com/storybookjs/storybook/pull/24217), thanks [@yannbf](https://github.com/yannbf)!

0 commit comments

Comments
 (0)