Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/next' into kasper/c…
Browse files Browse the repository at this point in the history
…anvas
  • Loading branch information
kasperpeulen committed Jul 2, 2024
2 parents 777df33 + 4931b38 commit 623d4e3
Show file tree
Hide file tree
Showing 2,013 changed files with 8,568 additions and 7,732 deletions.
27 changes: 18 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ orbs:
browser-tools: circleci/[email protected]
discord: antonioned/[email protected]
codecov: codecov/[email protected]
bun-orb: cmgriffing/[email protected]
node: circleci/[email protected]
nx: nrwl/[email protected]

commands:
Expand Down Expand Up @@ -129,6 +131,8 @@ jobs:
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
- bun-orb/setup:
version: 1.1.1
- restore_cache:
name: Restore Yarn cache
keys:
Expand Down Expand Up @@ -161,6 +165,7 @@ jobs:
- code/frameworks
- code/deprecated
- code/lib
- code/core
- code/builders
- code/ui
- code/renderers
Expand Down Expand Up @@ -189,6 +194,8 @@ jobs:
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
- bun-orb/setup:
version: 1.1.1
- attach_workspace:
at: .
- nx/set-shas:
Expand Down Expand Up @@ -260,7 +267,7 @@ jobs:
at: .
- codecov/upload
- report-workflow-on-failure
chromatic-internal-storybooks:
chromatic-internal-storybook:
executor:
class: medium+
name: sb_node_18_browsers
Expand All @@ -273,10 +280,8 @@ jobs:
at: .
- run:
name: Running Chromatic
command: |
cd code
yarn storybook:ui:chromatic
yarn storybook:blocks:chromatic
command: yarn storybook:ui:chromatic
working_directory: code
- report-workflow-on-failure
- store_test_results:
path: test-results
Expand Down Expand Up @@ -339,6 +344,8 @@ jobs:
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
- bun-orb/setup:
version: 1.1.1
- attach_workspace:
at: .
- run:
Expand All @@ -349,13 +356,15 @@ jobs:
- run:
name: Building Sandboxes
command: yarn task --task build --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task build) --no-link --start-from=never --junit
environment:
STORYBOOK_TELEMETRY_URL: "http://localhost:6007/event-log"
- run:
name: Verifying Telemetry
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task build)
if [[ $TEMPLATE != bench/* ]]
then
node --loader esbuild-register/loader -r esbuild-register ./event-log-checker build $TEMPLATE
node --loader esbuild-register/loader -r esbuild-register ./event-log-checker.ts build $TEMPLATE
fi
working_directory: scripts
- report-workflow-on-failure:
Expand Down Expand Up @@ -644,7 +653,7 @@ workflows:
- script-checks:
requires:
- build
- chromatic-internal-storybooks:
- chromatic-internal-storybook:
requires:
- build
- coverage:
Expand Down Expand Up @@ -706,7 +715,7 @@ workflows:
- script-checks:
requires:
- build
- chromatic-internal-storybooks:
- chromatic-internal-storybook:
requires:
- build
- coverage:
Expand Down Expand Up @@ -769,7 +778,7 @@ workflows:
- script-checks:
requires:
- build
- chromatic-internal-storybooks:
- chromatic-internal-storybook:
requires:
- build
- create-sandboxes:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/canary-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
| | |
| --- | --- |
| **Published version** | [`${{ steps.version.outputs.next-version }}`](https://npmjs.com/package/@storybook/cli/v/${{ steps.version.outputs.next-version }}) |
| **Published version** | [`${{ steps.version.outputs.next-version }}`](https://npmjs.com/package/storybook/v/${{ steps.version.outputs.next-version }}) |
| **Triggered by** | @${{ github.triggering_actor }} |
| **Repository** | [${{ steps.info.outputs.repository }}](https://github.com/${{ steps.info.outputs.repository }}) |
| **Branch** | [`${{ steps.info.outputs.branch }}`](https://github.com/${{ steps.info.outputs.repository }}/tree/${{ steps.info.outputs.branch }}) |
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/generate-sandboxes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ jobs:
with:
ref: next

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

- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
Expand Down Expand Up @@ -82,6 +86,10 @@ jobs:
with:
ref: main

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

- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/prepare-non-patch-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ jobs:
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
4 changes: 4 additions & 0 deletions .github/workflows/prepare-patch-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ jobs:
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
4 changes: 4 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ jobs:
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
6 changes: 5 additions & 1 deletion .github/workflows/tests-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
with:
bun-version: 1.1.1
- name: Set node version
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"

- name: install and compile
run: yarn task --task compile --start-from=auto --no-link
run: yarn task --task compile --start-from=auto
- name: test
run: yarn test
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ code/playwright/.cache/
code/bench-results/

/packs
code/.nx/cache
code/.nx/cache
!**/fixtures/**/yarn.lock
12 changes: 10 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

Storybook is developed against a specific node version which is defined in an `.nvmrc` file. You can use any Node version manager that uses the `.nvmrc` configuration file (we recommend [fnm](https://fnm.vercel.app/)).

## Ensure you have the required system utilities

You will need to have the following installed:
- git
- node
- yarn
- (bun)[https://bun.sh/]

## Using fnm as a Node version manager

- Install fnm [as per instructions](https://github.com/Schniz/fnm/tree/master#installation)
Expand Down Expand Up @@ -50,7 +58,7 @@ If you want to make code changes to Storybook packages while running a sandbox,

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

2. If you are running the sandbox in "linked" mode (the default), you should see the changes reflected on a refresh (you may need to restart it if changing server packages)
Expand All @@ -71,7 +79,7 @@ yarn task --prod

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

## Contributing to Storybook
Expand Down
26 changes: 13 additions & 13 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,17 @@
- [Tab addons cannot manually route, Tool addons can filter their visibility via tabId](#tab-addons-cannot-manually-route-tool-addons-can-filter-their-visibility-via-tabid)
- [Removed `config` preset](#removed-config-preset-1)
- [From version 7.5.0 to 7.6.0](#from-version-750-to-760)
- [CommonJS with Vite is deprecated](#commonjs-with-vite-is-deprecated)
- [Using implicit actions during rendering is deprecated](#using-implicit-actions-during-rendering-is-deprecated)
- [typescript.skipBabel deprecated](#typescriptskipbabel-deprecated)
- [Primary doc block accepts of prop](#primary-doc-block-accepts-of-prop)
- [Addons no longer need a peer dependency on React](#addons-no-longer-need-a-peer-dependency-on-react)
- [CommonJS with Vite is deprecated](#commonjs-with-vite-is-deprecated)
- [Using implicit actions during rendering is deprecated](#using-implicit-actions-during-rendering-is-deprecated)
- [typescript.skipBabel deprecated](#typescriptskipbabel-deprecated)
- [Primary doc block accepts of prop](#primary-doc-block-accepts-of-prop)
- [Addons no longer need a peer dependency on React](#addons-no-longer-need-a-peer-dependency-on-react)
- [From version 7.4.0 to 7.5.0](#from-version-740-to-750)
- [`storyStoreV6` and `storiesOf` is deprecated](#storystorev6-and-storiesof-is-deprecated)
- [`storyIndexers` is replaced with `experimental_indexers`](#storyindexers-is-replaced-with-experimental_indexers)
- [`storyStoreV6` and `storiesOf` is deprecated](#storystorev6-and-storiesof-is-deprecated)
- [`storyIndexers` is replaced with `experimental_indexers`](#storyindexers-is-replaced-with-experimental_indexers)
- [From version 7.0.0 to 7.2.0](#from-version-700-to-720)
- [Addon API is more type-strict](#addon-api-is-more-type-strict)
- [Addon-controls hideNoControlsWarning parameter is deprecated](#addon-controls-hidenocontrolswarning-parameter-is-deprecated)
- [Addon API is more type-strict](#addon-api-is-more-type-strict)
- [Addon-controls hideNoControlsWarning parameter is deprecated](#addon-controls-hidenocontrolswarning-parameter-is-deprecated)
- [From version 6.5.x to 7.0.0](#from-version-65x-to-700)
- [7.0 breaking changes](#70-breaking-changes)
- [Dropped support for Node 15 and below](#dropped-support-for-node-15-and-below)
Expand All @@ -136,7 +136,7 @@
- [Deploying build artifacts](#deploying-build-artifacts)
- [Dropped support for file URLs](#dropped-support-for-file-urls)
- [Serving with nginx](#serving-with-nginx)
- [Ignore story files from node_modules](#ignore-story-files-from-node_modules)
- [Ignore story files from node\_modules](#ignore-story-files-from-node_modules)
- [7.0 Core changes](#70-core-changes)
- [7.0 feature flags removed](#70-feature-flags-removed)
- [Story context is prepared before for supporting fine grained updates](#story-context-is-prepared-before-for-supporting-fine-grained-updates)
Expand All @@ -150,7 +150,7 @@
- [Addon-interactions: Interactions debugger is now default](#addon-interactions-interactions-debugger-is-now-default)
- [7.0 Vite changes](#70-vite-changes)
- [Vite builder uses Vite config automatically](#vite-builder-uses-vite-config-automatically)
- [Vite cache moved to node_modules/.cache/.vite-storybook](#vite-cache-moved-to-node_modulescachevite-storybook)
- [Vite cache moved to node\_modules/.cache/.vite-storybook](#vite-cache-moved-to-node_modulescachevite-storybook)
- [7.0 Webpack changes](#70-webpack-changes)
- [Webpack4 support discontinued](#webpack4-support-discontinued)
- [Babel mode v7 exclusively](#babel-mode-v7-exclusively)
Expand Down Expand Up @@ -200,7 +200,7 @@
- [Dropped addon-docs manual babel configuration](#dropped-addon-docs-manual-babel-configuration)
- [Dropped addon-docs manual configuration](#dropped-addon-docs-manual-configuration)
- [Autoplay in docs](#autoplay-in-docs)
- [Removed STORYBOOK_REACT_CLASSES global](#removed-storybook_react_classes-global)
- [Removed STORYBOOK\_REACT\_CLASSES global](#removed-storybook_react_classes-global)
- [7.0 Deprecations and default changes](#70-deprecations-and-default-changes)
- [storyStoreV7 enabled by default](#storystorev7-enabled-by-default)
- [`Story` type deprecated](#story-type-deprecated)
Expand Down Expand Up @@ -5616,7 +5616,7 @@ Also, here's the error you'll get if you're running an older version of React:
```

core.browser.esm.js:15 Uncaught TypeError: Object(...) is not a function
at Module../node_modules/@emotion/core/dist/core.browser.esm.js (core.browser.esm.js:15)
at Module../node_modules/@emotion/core/core.browser.esm.js (core.browser.esm.js:15)
at **webpack_require** (bootstrap:724)
at fn (bootstrap:101)
at Module../node_modules/@emotion/styled-base/dist/styled-base.browser.esm.js (styled-base.browser.esm.js:1)
Expand Down
4 changes: 2 additions & 2 deletions code/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ ember-output
!.eslintrc.js
!.eslintrc-markdown.js
!.storybook
lib/core-common/templates/base-preview-head.html
lib/core-server/src/utils/__search-files-tests__
core/assets
core/src/core-server/utils/__search-files-tests__
22 changes: 5 additions & 17 deletions code/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ const addonsPackages = fs
const libPackages = fs
.readdirSync(path.join(__dirname, 'lib'))
.filter((p) => fs.statSync(path.join(__dirname, 'lib', p)).isDirectory());
const uiPackages = fs
.readdirSync(path.join(__dirname, 'ui'))
.filter((p) => fs.statSync(path.join(__dirname, 'ui', p)).isDirectory())
.filter((p) => !p.startsWith('.'));

module.exports = {
root: true,
Expand All @@ -23,6 +19,7 @@ module.exports = {
},
plugins: ['local-rules'],
rules: {
'import/no-unresolved': 'off', // covered by typescript
'eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }],
'eslint-comments/no-unused-disable': 'error',
'react-hooks/rules-of-hooks': 'off',
Expand Down Expand Up @@ -93,20 +90,20 @@ module.exports = {
{
// these packages use pre-bundling, dependencies will be bundled, and will be in devDepenencies
files: ['frameworks/**/*', 'builders/**/*', 'deprecated/**/*', 'renderers/**/*'],
excludedFiles: ['frameworks/angular/**/*', 'frameworks/ember/**/*', 'lib/core-server/**/*'],
excludedFiles: ['frameworks/angular/**/*', 'frameworks/ember/**/*', 'core/**/*'],
rules: {
'import/no-extraneous-dependencies': [
'error',
{ bundledDependencies: false, devDependencies: true },
{ bundledDependencies: false, devDependencies: true, peerDependencies: true },
],
},
},
{
files: ['**/ui/.storybook/**'],
files: ['**/.storybook/**'],
rules: {
'import/no-extraneous-dependencies': [
'error',
{ packageDir: [__dirname], devDependencies: true },
{ packageDir: [__dirname], devDependencies: true, peerDependencies: true },
],
},
},
Expand All @@ -122,15 +119,6 @@ module.exports = {
],
},
})),
...uiPackages.map((directory) => ({
files: [path.join('**', 'ui', directory, '**', '*.*')],
rules: {
'import/no-extraneous-dependencies': [
'error',
{ packageDir: [__dirname, path.join(__dirname, 'ui', directory)], devDependencies: true },
],
},
})),
...libPackages.map((directory) => ({
files: [path.join('**', 'lib', directory, '**', '*.*')],
rules: {
Expand Down
File renamed without changes.
Loading

0 comments on commit 623d4e3

Please sign in to comment.