Skip to content

Commit

Permalink
Merge branch 'next' into shilman/tags-filter
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman committed Jun 13, 2024
2 parents b2d4754 + dd69fd3 commit 4cff5e1
Show file tree
Hide file tree
Showing 447 changed files with 6,659 additions and 9,030 deletions.
35 changes: 20 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ parameters:
default: "skipped"

executors:
sb_node_16_classic:
sb_node_18_classic:
parameters:
class:
description: The Resource class
Expand All @@ -21,7 +21,7 @@ executors:
environment:
NODE_OPTIONS: --max_old_space_size=6144
resource_class: <<parameters.class>>
sb_node_16_browsers:
sb_node_18_browsers:
parameters:
class:
description: The Resource class
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
pretty-docs:
executor:
class: medium
name: sb_node_16_classic
name: sb_node_18_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
Expand All @@ -125,7 +125,7 @@ jobs:
build:
executor:
class: xlarge
name: sb_node_16_classic
name: sb_node_18_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
lint:
executor:
class: large
name: sb_node_16_classic
name: sb_node_18_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
Expand All @@ -185,7 +185,7 @@ jobs:
check:
executor:
class: xlarge
name: sb_node_16_classic
name: sb_node_18_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
Expand All @@ -202,7 +202,7 @@ jobs:
- report-workflow-on-failure
- cancel-workflow-on-failure
script-checks:
executor: sb_node_16_browsers
executor: sb_node_18_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
Expand Down Expand Up @@ -230,7 +230,7 @@ jobs:
unit-tests:
executor:
class: xlarge
name: sb_node_16_browsers
name: sb_node_18_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
Expand All @@ -252,7 +252,7 @@ jobs:
coverage:
executor:
class: small
name: sb_node_16_browsers
name: sb_node_18_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
Expand All @@ -263,7 +263,7 @@ jobs:
chromatic-internal-storybooks:
executor:
class: medium+
name: sb_node_16_browsers
name: sb_node_18_browsers
environment:
NODE_OPTIONS: --max_old_space_size=6144
steps:
Expand All @@ -287,13 +287,16 @@ jobs:
type: integer
executor:
class: medium
name: sb_node_16_browsers
name: sb_node_18_browsers
parallelism: << parameters.parallelism >>
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
- run:
name: Enable Corepack
command: sudo corepack enable yarn
- run:
name: Creating Sandboxes
command: yarn task --task sandbox --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox) --no-link --start-from=never --junit
Expand All @@ -311,7 +314,7 @@ jobs:
type: integer
executor:
class: medium
name: sb_node_16_browsers
name: sb_node_18_browsers
parallelism: << parameters.parallelism >>
steps:
- git-shallow-clone/checkout_advanced:
Expand All @@ -331,7 +334,7 @@ jobs:
type: integer
executor:
class: large
name: sb_node_16_browsers
name: sb_node_18_browsers
parallelism: << parameters.parallelism >>
steps:
- git-shallow-clone/checkout_advanced:
Expand Down Expand Up @@ -410,7 +413,7 @@ jobs:
type: integer
executor:
class: medium
name: sb_node_16_browsers
name: sb_node_18_browsers
parallelism: << parameters.parallelism >>
steps:
- checkout
Expand Down Expand Up @@ -493,7 +496,7 @@ jobs:
test-empty-init:
executor:
class: medium
name: sb_node_16_browsers
name: sb_node_18_browsers
parameters:
packageManager:
type: string
Expand Down Expand Up @@ -598,6 +601,8 @@ jobs:
name: Install dependencies
command: yarn install --no-immutable
working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>
environment:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
- run:
name: Run Jest tests
command: yarn jest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/canary-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ jobs:
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"

- uses: oven-sh/setup-bun@v1
with:
bun-version: 1.1.1

- name: Cache dependencies
uses: actions/cache@v4
with:
Expand Down
20 changes: 1 addition & 19 deletions .github/workflows/prepare-non-patch-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@ jobs:
run: |
yarn release:version --deferred --release-type ${{ inputs.release-type || 'prerelease' }} ${{ inputs.pre-id && format('{0} {1}', '--pre-id', inputs.pre-id) || '' }} --verbose
- name: Check release vs prerelease
id: is-prerelease
run: yarn release:is-prerelease ${{ steps.bump-version.outputs.next-version }} --verbose

- name: Write changelog
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -133,19 +129,6 @@ jobs:
git commit -m "Write changelog for ${{ steps.bump-version.outputs.next-version }} [skip ci]" || true
git push --force origin version-non-patch-from-${{ steps.bump-version.outputs.current-version }}
- name: Resolve merge-conflicts with base branch
if: steps.is-prerelease.outputs.prerelease == 'false'
working-directory: .
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config pull.rebase false
git pull --no-commit --no-ff origin latest-release || true
git checkout --ours .
git add .
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]"
git push origin version-non-patch-from-${{ steps.bump-version.outputs.current-version }}
- name: Generate PR description
id: description
env:
Expand All @@ -162,14 +145,13 @@ jobs:
gh pr edit \
--repo "${{github.repository }}" \
--title "Release: $CAPITALIZED_RELEASE_TYPE ${{ inputs.pre-id && format('{0} ', inputs.pre-id) }}${{ steps.bump-version.outputs.next-version }}" \
--base ${{ steps.is-prerelease.outputs.prerelease == 'true' && 'next-release' || 'latest-release' }} \
--body "${{ steps.description.outputs.description }}"
else
gh pr create \
--repo "${{github.repository }}"\
--title "Release: $CAPITALIZED_RELEASE_TYPE ${{ inputs.pre-id && format('{0} ', inputs.pre-id) }}${{ steps.bump-version.outputs.next-version }}" \
--label "release" \
--base ${{ steps.is-prerelease.outputs.prerelease == 'true' && 'next-release' || 'latest-release' }} \
--base next-release \
--head version-non-patch-from-${{ steps.bump-version.outputs.current-version }} \
--body "${{ steps.description.outputs.description }}"
fi
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,14 @@ jobs:
git merge ${{ github.ref_name }}
git push origin ${{ steps.target.outputs.target }}
- name: Force push from 'next' to 'latest-release' and 'main' on minor/major releases
if: github.ref_name == 'next-release' && steps.is-prerelease.outputs.prerelease == 'false'
run: |
git checkout next
git pull
git push --force origin latest-release
git push --force origin main
- name: Sync CHANGELOG.md from `main` to `next`
if: steps.target.outputs.target == 'main'
working-directory: .
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/trigger-circle-ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
# Use pull_request_target, as we don't need to check out the actual code of the fork in this script.
# And this is the only way to trigger the Circle CI API on forks as well.
pull_request_target:
types: [opened, synchronize, labeled, unlabeled, reopened, converted_to_draft, ready_for_review]
types: [opened, synchronize, labeled, reopened]
push:
branches:
- next
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
trigger-normal-tests:
runs-on: ubuntu-latest
needs: get-branch
if: github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ci:normal')
if: github.event_name == 'pull_request_target' && ((github.event.action == 'labeled' && github.event.label.name == 'ci:normal') || (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'ci:normal')))
steps:
- name: Trigger Normal tests
run: >
Expand All @@ -58,7 +58,7 @@ jobs:
trigger-docs-tests:
runs-on: ubuntu-latest
needs: get-branch
if: github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ci:docs')
if: github.event_name == 'pull_request_target' && ((github.event.action == 'labeled' && github.event.label.name == 'ci:docs') || (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'ci:docs')))
steps:
- name: Trigger docs tests
run: >
Expand All @@ -77,7 +77,7 @@ jobs:
trigger-merged-tests:
runs-on: ubuntu-latest
needs: get-branch
if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'ci:merged')
if: github.event_name == 'push' || (github.event.action == 'labeled' && github.event.label.name == 'ci:merged') || (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'ci:merged'))
steps:
- name: Trigger merged tests
run: >
Expand All @@ -96,7 +96,7 @@ jobs:
trigger-daily-tests:
runs-on: ubuntu-latest
needs: get-branch
if: github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ci:daily')
if: github.event_name == 'pull_request_target' && ((github.event.action == 'labeled' && github.event.label.name == 'ci:daily') || (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'ci:daily')))
steps:
- name: Trigger the daily tests
run: >
Expand Down
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,46 @@
## 8.1.8

- Automigrations: Make VTA "learn more" link clickable - [#28020](https://github.com/storybookjs/storybook/pull/28020), thanks @deiga!
- CLI: Fix `init --skip-install` - [#28226](https://github.com/storybookjs/storybook/pull/28226), thanks @shilman!

## 8.1.7

- Addon-actions: Only log spies with names - [#28091](https://github.com/storybookjs/storybook/pull/28091), thanks @kasperpeulen!
- CLI: Fix typo in React Docgen migration - [#27536](https://github.com/storybookjs/storybook/pull/27536), thanks @jonniebigodes!
- Portable Stories: Add tags to composed story - [#27708](https://github.com/storybookjs/storybook/pull/27708), thanks @yannbf!
- Test: Display toHaveBeenCalledWith expected / received values on failure - [#28088](https://github.com/storybookjs/storybook/pull/28088), thanks @kasperpeulen!

## 8.1.6

- CLI: Only log the UpgradeStorybookToSameVersionError but continue the upgrade as normal - [#27217](https://github.com/storybookjs/storybook/pull/27217), thanks @kasperpeulen!
- Core: Replace ip function with a small helper function to address security concerns - [#27529](https://github.com/storybookjs/storybook/pull/27529), thanks @tony19!
- Tags: Fix unsafe project-level tags lookup - [#27511](https://github.com/storybookjs/storybook/pull/27511), thanks @shilman!
- Vite: Fix stats-plugin to normalize file names with posix paths - [#27218](https://github.com/storybookjs/storybook/pull/27218), thanks @AlexAtVista!

## 8.1.5

- CSF-Tools: Fix export specifier bug - [#27418](https://github.com/storybookjs/storybook/pull/27418), thanks @valentinpalkovic!
- Dependency: Upgrade tempy - [#27366](https://github.com/storybookjs/storybook/pull/27366), thanks @mnigh!
- Tags: Refine composition behavior - [#27379](https://github.com/storybookjs/storybook/pull/27379), thanks @shilman!
- Theming: Fix self-referencing type - [#27155](https://github.com/storybookjs/storybook/pull/27155), thanks @SimenB!

## 8.1.4

- Angular: Revert style adjustments - [#27361](https://github.com/storybookjs/storybook/pull/27361), thanks @valentinpalkovic!
- Svelte: Support latest prerelease - [#27378](https://github.com/storybookjs/storybook/pull/27378), thanks @valentinpalkovic!
- Tags: Fix composition with older storybooks - [#27358](https://github.com/storybookjs/storybook/pull/27358), thanks @shilman!
- Vite: Fix HMR issue for Storybook preview files - [#27256](https://github.com/storybookjs/storybook/pull/27256), thanks @valentinpalkovic!

## 8.1.3

- Angular: Support v18 - [#27237](https://github.com/storybookjs/storybook/pull/27237), thanks @valentinpalkovic!
- Telemetry: Add test packages - [#27226](https://github.com/storybookjs/storybook/pull/27226), thanks @shilman!

## 8.1.2

- Angular: Fix filtering of workspace config styles - [#27108](https://github.com/storybookjs/storybook/pull/27108), thanks @valentinpalkovic!
- Next.js: Avoid interfering with the svgr loader - [#27198](https://github.com/storybookjs/storybook/pull/27198), thanks @seanparmelee!

## 8.1.1

- Docgen: Only add react-docgen info when a component is defined in the file - [#26967](https://github.com/storybookjs/storybook/pull/26967), thanks @glenjamin!
Expand Down
55 changes: 55 additions & 0 deletions CHANGELOG.prerelease.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,58 @@
## 8.2.0-alpha.8

- Automigrations: Make VTA "learn more" link clickable - [#28020](https://github.com/storybookjs/storybook/pull/28020), thanks @deiga!
- CLI: Fix `init --skip-install` - [#28226](https://github.com/storybookjs/storybook/pull/28226), thanks @shilman!
- CSF: Rename `preview.js` `globals` to `initialGlobals` - [#27517](https://github.com/storybookjs/storybook/pull/27517), thanks @shilman!

## 8.2.0-alpha.7

- Angular: Allow outputPath object syntax - [#28144](https://github.com/storybookjs/storybook/pull/28144), thanks @valentinpalkovic!
- Angular: Introduce preserveSymlink builder option - [#28145](https://github.com/storybookjs/storybook/pull/28145), thanks @valentinpalkovic!
- CLI: Fix typo in React Docgen migration - [#27536](https://github.com/storybookjs/storybook/pull/27536), thanks @jonniebigodes!
- CSF: Automatically extract componentPath - [#24396](https://github.com/storybookjs/storybook/pull/24396), thanks @shilman!
- Core: Remove more `.stories.mdx` handling - [#25973](https://github.com/storybookjs/storybook/pull/25973), thanks @JReinhold!
- Docs-tools: Replace `doctrine` with `jsdoc-type-pratt-parser` - [#26305](https://github.com/storybookjs/storybook/pull/26305), thanks @43081j!
- Test: Display toHaveBeenCalledWith expected / received values on failure - [#28088](https://github.com/storybookjs/storybook/pull/28088), thanks @kasperpeulen!

## 8.2.0-alpha.6

- Addon-actions: Only log spies with names - [#28091](https://github.com/storybookjs/storybook/pull/28091), thanks @kasperpeulen!
- Build: Change require/import order, so that import has higher prio if both are specified - [#27730](https://github.com/storybookjs/storybook/pull/27730), thanks @kasperpeulen!
- CLI: Only log the UpgradeStorybookToSameVersionError but continue the upgrade as normal - [#27217](https://github.com/storybookjs/storybook/pull/27217), thanks @kasperpeulen!
- Core: Replace ip function with a small helper function to address security concerns - [#27529](https://github.com/storybookjs/storybook/pull/27529), thanks @tony19!
- Portable Stories: Add tags to composed story - [#27708](https://github.com/storybookjs/storybook/pull/27708), thanks @yannbf!
- Test: Upgrade deps of @storybook/test - [#27862](https://github.com/storybookjs/storybook/pull/27862), thanks @kasperpeulen!
- Vite: Fix stats-plugin to normalize file names with posix paths - [#27218](https://github.com/storybookjs/storybook/pull/27218), thanks @AlexAtVista!

## 8.2.0-alpha.5

- Angular: Fix wrong detection of standalone components - [#27353](https://github.com/storybookjs/storybook/pull/27353), thanks @dario-baumberger!
- Dependency: Bump Express.js - [#26680](https://github.com/storybookjs/storybook/pull/26680), thanks @valentinpalkovic!
- Tags: Fix unsafe project-level tags lookup - [#27511](https://github.com/storybookjs/storybook/pull/27511), thanks @shilman!

## 8.2.0-alpha.4

- CSF-Tools: Fix export specifier bug - [#27418](https://github.com/storybookjs/storybook/pull/27418), thanks @valentinpalkovic!
- Dependency: Upgrade tempy - [#27366](https://github.com/storybookjs/storybook/pull/27366), thanks @mnigh!
- Tags: Refine composition behavior - [#27379](https://github.com/storybookjs/storybook/pull/27379), thanks @shilman!
- Theming: Fix self-referencing type - [#27155](https://github.com/storybookjs/storybook/pull/27155), thanks @SimenB!
- Vue3: Enable new hydration mismatch compile time flag - [#27192](https://github.com/storybookjs/storybook/pull/27192), thanks @Cherry!

## 8.2.0-alpha.3

- Addon-A11y: Fix property default assignment - [#27224](https://github.com/storybookjs/storybook/pull/27224), thanks @valentinpalkovic!
- Angular: Revert style adjustments - [#27361](https://github.com/storybookjs/storybook/pull/27361), thanks @valentinpalkovic!
- Angular: Support v18 - [#27237](https://github.com/storybookjs/storybook/pull/27237), thanks @valentinpalkovic!
- Controls: Fix date picker control validation and assignment - [#26695](https://github.com/storybookjs/storybook/pull/26695), thanks @leeovictor!
- Next.js: Avoid interfering with the svgr loader - [#27198](https://github.com/storybookjs/storybook/pull/27198), thanks @seanparmelee!
- Svelte: Support latest prerelease - [#27378](https://github.com/storybookjs/storybook/pull/27378), thanks @valentinpalkovic!
- Tags: Fix composition with older storybooks - [#27358](https://github.com/storybookjs/storybook/pull/27358), thanks @shilman!
- Telemetry: Add test packages - [#27226](https://github.com/storybookjs/storybook/pull/27226), thanks @shilman!
- Types: Fix type implementation for `CompatibleString` - [#27180](https://github.com/storybookjs/storybook/pull/27180), thanks @sni-J!
- Vite: Fix HMR issue for Storybook preview files - [#27256](https://github.com/storybookjs/storybook/pull/27256), thanks @valentinpalkovic!
- Vite: Fix asset warning by externalizing sb-common-assets font - [#27110](https://github.com/storybookjs/storybook/pull/27110), thanks @valentinpalkovic!
- Webpack5/Vite: Fix sourcemaps - [#27171](https://github.com/storybookjs/storybook/pull/27171), thanks @valentinpalkovic!

## 8.2.0-alpha.2

- Angular: Cleanup types - [#27189](https://github.com/storybookjs/storybook/pull/27189), thanks @valentinpalkovic!
Expand Down
13 changes: 13 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,19 @@ yarn build --watch react core-server api addon-docs
yarn task --task dev --template <your template> --start-from=publish
```

### Making code changes when working on Angular-specific code

If you are working on Angular-specific code, you will need to append `--prod` to the above mentioned commands to ensure that the Angular compiler is able to pick up the changes appropriately and doesn't fail. This will build all the packages in production mode.

```sh
yarn task --prod
```

```bash
cd code
yarn build --prod --watch angular core-server api addon-docs
```

## Contributing to Storybook

For further advice on how to contribute, please refer to our [NEW contributing guide on the Storybook website](https://storybook.js.org/docs/contribute).
Loading

0 comments on commit 4cff5e1

Please sign in to comment.