Skip to content

Commit

Permalink
Merge branch 'next' into fix/addon-toolbars
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf authored Nov 25, 2024
2 parents 1bf3b54 + 9c2e624 commit f0720db
Show file tree
Hide file tree
Showing 954 changed files with 15,506 additions and 4,455 deletions.
94 changes: 80 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,17 +165,15 @@ jobs:
root: .
paths:
- code/node_modules
- code/addons
- scripts/node_modules
- code/bench
- code/examples
- code/node_modules
- code/addons
- code/frameworks
- code/deprecated
- code/lib
- code/core
- code/builders
- code/ui
- code/renderers
- code/presets
- .verdaccio-cache
Expand Down Expand Up @@ -211,23 +209,88 @@ jobs:
yarn knip --no-exit-code
- report-workflow-on-failure
- cancel-workflow-on-failure
check:
bench-packages:
executor:
class: xlarge
class: medium
name: sb_node_22_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
# if there is a base branch AND a PR number in parameters, benchmark packages against those
# this happens when run against a PR
- when:
condition:
and:
- << pipeline.parameters.ghBaseBranch >>
- << pipeline.parameters.ghPrNumber >>
steps:
- run:
name: Benchmarking packages against base branch
working_directory: scripts
command: |
yarn local-registry --open &
until curl -s http://localhost:6001 > /dev/null; do
echo 'Waiting for local registry to be available...'
sleep 2
done
yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload
# if there is a NOT a base branch OR NOT a PR number in parameters, just upload benchmarks for the branch
# this happens when runned directly on branches, like next or main
- when:
condition:
or:
- not: << pipeline.parameters.ghBaseBranch >>
- not: << pipeline.parameters.ghPrNumber >>
steps:
- run:
name: Uploading package benchmarks for branch
working_directory: scripts
command: |
yarn local-registry --open &
until curl -s http://localhost:6001 > /dev/null; do
echo 'Waiting for local registry to be available...'
sleep 2
done
yarn bench-packages --upload
- store_artifacts:
path: bench/packages/results.json
- store_artifacts:
path: bench/packages/compare-with-<< pipeline.parameters.ghBaseBranch >>.json
- report-workflow-on-failure
- cancel-workflow-on-failure
check:
executor:
class: xlarge
name: sb_node_22_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
- nx/set-shas:
main-branch-name: "next"
workflow-name: << pipeline.parameters.workflow >>
- run:
name: install in scripts
command: |
cd scripts
yarn install
- run:
name: install in code
command: |
cd code
yarn install
- run:
name: Compile
command: |
yarn task --task compile --start-from=compile --no-link --debug
- run:
name: Check
command: |
yarn task --task compile --start-from=auto --no-link --debug
yarn task --task check --start-from=auto --no-link --debug
yarn task --task check --start-from=check --no-link --debug
- run:
name: Ensure no changes pending
command: |
git diff --exit-code
- report-workflow-on-failure
- cancel-workflow-on-failure
Expand Down Expand Up @@ -543,7 +606,7 @@ jobs:
- store_artifacts: # this is where playwright puts more complex stuff
path: code/playwright-results/
destination: playwright
bench:
bench-sandboxes:
parameters:
parallelism:
type: integer
Expand Down Expand Up @@ -753,9 +816,10 @@ workflows:
- knip:
requires:
- build
- check:
- bench-packages:
requires:
- build
- check
- unit-tests:
requires:
- build
Expand Down Expand Up @@ -799,7 +863,7 @@ workflows:
parallelism: 5
requires:
- create-sandboxes
- bench:
- bench-sandboxes:
parallelism: 5
requires:
- build-sandboxes
Expand Down Expand Up @@ -828,9 +892,10 @@ workflows:
- knip:
requires:
- build
- check:
- bench-packages:
requires:
- build
- check
- unit-tests:
requires:
- build
Expand Down Expand Up @@ -883,7 +948,7 @@ workflows:
- test-ui-testing-module:
requires:
- build
- bench:
- bench-sandboxes:
parallelism: 5
requires:
- build-sandboxes
Expand All @@ -904,9 +969,10 @@ workflows:
- knip:
requires:
- build
- check:
- bench-packages:
requires:
- build
- check
- unit-tests:
requires:
- build
Expand Down Expand Up @@ -977,7 +1043,7 @@ workflows:
# --smoke-test is not supported for the angular builder right now
# - "angular-cli"
- "lit-vite-ts"
- bench:
- bench-sandboxes:
parallelism: 5
requires:
- build-sandboxes
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 8.4.5

- Angular: Support v19 - [#29659](https://github.com/storybookjs/storybook/pull/29659), thanks @leosvelperez!
- CLI: Disable corepack auto pin behavior - [#29627](https://github.com/storybookjs/storybook/pull/29627), thanks @yannbf!
- CLI: Fix qwik init - [#29632](https://github.com/storybookjs/storybook/pull/29632), thanks @shilman!
- Nextjs-Vite: Add Next.js 15 support - [#29640](https://github.com/storybookjs/storybook/pull/29640), thanks @yannbf!

## 8.4.4

- Addon Test: Only optimize react deps if applicable in vitest-plugin - [#29617](https://github.com/storybookjs/storybook/pull/29617), thanks @yannbf!

## 8.4.3

- Addon Test: Optimize internal dependencies - [#29595](https://github.com/storybookjs/storybook/pull/29595), thanks @yannbf!
- Next.js: Add support for Next 15 - [#29587](https://github.com/storybookjs/storybook/pull/29587), thanks @yannbf!

## 8.4.2

- Addon Test: Fix post-install logic for Next.js Vite framework support - [#29524](https://github.com/storybookjs/storybook/pull/29524), thanks @valentinpalkovic!
Expand Down
37 changes: 37 additions & 0 deletions CHANGELOG.prerelease.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
## 8.5.0-alpha.10

- Addon Test: Use pathe for better windows support - [#29676](https://github.com/storybookjs/storybook/pull/29676), thanks @yannbf!
- Angular: Default to standalone components in Angular v19 - [#29677](https://github.com/storybookjs/storybook/pull/29677), thanks @ingowagner!

## 8.5.0-alpha.9

- Angular: Support v19 - [#29659](https://github.com/storybookjs/storybook/pull/29659), thanks @leosvelperez!
- Manager: Fix size regression - [#29660](https://github.com/storybookjs/storybook/pull/29660), thanks @JReinhold!
- Nextjs-Vite: Add Next.js 15 support - [#29640](https://github.com/storybookjs/storybook/pull/29640), thanks @yannbf!

## 8.5.0-alpha.8

- UI: Sidebar context menu addon API - [#29557](https://github.com/storybookjs/storybook/pull/29557), thanks @ndelangen!

## 8.5.0-alpha.7

- CLI: Disable corepack auto pin behavior - [#29627](https://github.com/storybookjs/storybook/pull/29627), thanks @yannbf!
- RNW-Vite: Integrate with experimental-addon-test - [#29645](https://github.com/storybookjs/storybook/pull/29645), thanks @shilman!

## 8.5.0-alpha.6

- CLI: Fix qwik init - [#29632](https://github.com/storybookjs/storybook/pull/29632), thanks @shilman!
- React Native Web: Add framework, CLI integration, sandboxes - [#29520](https://github.com/storybookjs/storybook/pull/29520), thanks @shilman!

## 8.5.0-alpha.5

- Addon Test: Only optimize react deps if applicable in vitest-plugin - [#29617](https://github.com/storybookjs/storybook/pull/29617), thanks @yannbf!
- Addon Test: Optimize internal dependencies - [#29595](https://github.com/storybookjs/storybook/pull/29595), thanks @yannbf!
- CLI: Fix init help for `storybook` command - [#29480](https://github.com/storybookjs/storybook/pull/29480), thanks @toothlessdev!
- Composition: Fix composed story search - [#29453](https://github.com/storybookjs/storybook/pull/29453), thanks @jsingh0026!

## 8.5.0-alpha.4

- Next.js: Add support for Next 15 - [#29587](https://github.com/storybookjs/storybook/pull/29587), thanks @yannbf!
- UI: Add Yarn to About Section - [#29225](https://github.com/storybookjs/storybook/pull/29225), thanks @grantwforsythe!

## 8.5.0-alpha.3

- Addon Test: Fix post-install logic for Next.js Vite framework support - [#29524](https://github.com/storybookjs/storybook/pull/29524), thanks @valentinpalkovic!
Expand Down
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Storybook is developed against a specific node version which is defined in an `.
## Ensure you have the required system utilities

You will need to have the following installed:

- git
- node
- yarn
Expand All @@ -20,7 +21,7 @@ You will need to have the following installed:

## Running the local development environment

- Ensure if you are using Windows to use the Windows Subsystem for Linux (WSL).
- All commands should be run in a terminal with administrator privileges in Windows environments.
- Run `yarn start` in the root directory to run a basic test Storybook "sandbox".

The `yarn start` script will generate a React Vite TypeScript sandbox with a set of test stories inside it, as well as taking all steps required to get it running (building the various packages we need etc). There is no need to run `yarn` or `yarn install` as `yarn start` will do this for you.
Expand Down
54 changes: 54 additions & 0 deletions CONTRIBUTING/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- [5. Make Manual Changes](#5-make-manual-changes)
- [6. Merge](#6-merge)
- [7. See the "Publish" Workflow Finish](#7-see-the-publish-workflow-finish)
- [Releasing changes to older minor versions](#releasing-changes-to-older-minor-versions)
- [Releasing Locally in an Emergency 🚨](#releasing-locally-in-an-emergency-)
- [Canary Releases](#canary-releases)
- [With GitHub UI](#with-github-ui)
Expand Down Expand Up @@ -330,6 +331,59 @@ Merging the pull request will trigger [the publish workflow](https://github.com/

Done! 🚀

## Releasing changes to older minor versions

If you need to release a change to an older minor version that is not the latest, you have to do it manually, locally. The process is described below, with an example of releasing a new `v8.3.7` in a situation where `8.4.0` is currently the latest version.

1. Checkout the _existing_ tag that matches the latest minor release you want to bump, and create a new branch from it. In this case, we want to do:
1. `git fetch --all --tags`
2. `git checkout tags/v8.3.6 -b patch-8-3-7`
2. Make the changes you need to, most likely cherry-picking commits from the fix you need to back-port.
3. Run `yarn install` in `scripts` and `code`
4. Build all packages in `code` with `yarn task --task compile --no-link`
5. Commit and push your changes.
6. Trigger _daily_ CI manually on your branch:
1. Open [CircleCI](https://app.circleci.com/pipelines/github/storybookjs/storybook) and click "Trigger Pipeline" on the top right corner of the page.
2. Set the following configuration options:
- Pipeline: _"storybook default"_
- Config Source: _"storybook"_
- Branch: Your branch, eg. `patch-8-3-7`
3. Add a parameter, with _"name"_ `workflow`, _"value"_ `daily`
7. Wait for CI to finish successfully.
8. Bump all package versions:
1. `cd scripts`
2. `yarn release:version --release-type patch`
9. Commit with `git commit -m "Bump version from <CURRENT_VERSION> to <NEXT_VERSION> MANUALLY"`
10. Add a new entry to `CHANGELOG.md`, describing your changes
11. Commit with `git commit -m "Update CHANGELOG.md with <NEXT_VERSION> MANUALLY"`
12. Ensure you have the correct write permissions for all the Storybook npm packages. You need to be an admin of the _storybook_ org, and the packages that are not in the org. The simplest way to check this is to ensure you can see the _"Settings"_ tab in the following packages:
1. [`@storybook/react-vite`](https://www.npmjs.com/package/@storybook/react-vite/access)
2. [`storybook`](https://www.npmjs.com/package/storybook/access)
3. [`sb`](https://www.npmjs.com/package/sb/access)
4. [`create-storybook`](https://www.npmjs.com/package/create-storybook/access)
13. Get your npm access token or generate a new one at https://www.npmjs.com/settings/your-username/tokens. Remember to give it access to the `storybook` org and the packages not in the org, as listed above.
14. Publish all packages with `YARN_NPM_AUTH_TOKEN=<NPM_TOKEN> yarn release:publish --tag tag-for-publishing-older-releases --verbose`
- It goes through all packages and publishes them. If any number of packages fails to publish, it will retry 5 times, skipping those that have already been published.
15. Confirm the new version has been released on npm with the tag `tag-for-publishing-older-releases`:
1. [`@storybook/react-vite`](https://www.npmjs.com/package/@storybook/react-vite?activeTab=versions)
2. [`storybook`](https://www.npmjs.com/package/storybook?activeTab=versions)
3. [`sb`](https://www.npmjs.com/package/sb?activeTab=versions)
4. [`create-storybook`](https://www.npmjs.com/package/create-storybook?activeTab=versions)
16. Push
17. Manually create a GitHub Release at https://github.com/storybookjs/storybook/releases/new with:
1. Create new tag: `v<VERSION>` (e.g., `v8.3.7`)
2. Target: your branch (e.g., `patch-8-3-7`)
3. Previous tag: `v<PREVIOUS_VERSION>` (e.g., `v8.3.6`)
4. Title: `v<VERSION>` (e.g., `v8.3.7`)
5. Description: The content you added to `CHANGELOG.md`
6. Untick _"Set as the latest release"_
18. Cherry-pick your changelog changes into `next`, so they are actually visible
1. Checkout the `next` branch
2. Cherry-pick the commit you created with your changelog modifications
3. Push

Done. 🎉

## Releasing Locally in an Emergency 🚨

Things can fail, code can break, and bugs can exist. When automation is broken, there may be a need for an emergency escape hatch to release new fixes. In such a situation, it's valid to run the whole release process locally instead of relying on pull requests and workflows. You don't need to create pull requests or split preparation and publishing; you can do it all at once, but make sure you still follow the correct branching strategy.
Expand Down
Loading

0 comments on commit f0720db

Please sign in to comment.