Skip to content

Commit

Permalink
Merge branch 'next' into refine-yarn-usage
Browse files Browse the repository at this point in the history
# Conflicts:
#	.yarn/releases/yarn-sources.cjs
#	.yarnrc.yml
#	addons/a11y/package.json
#	addons/actions/package.json
#	addons/backgrounds/package.json
#	addons/controls/package.json
#	addons/docs/package.json
#	addons/essentials/package.json
#	addons/jest/package.json
#	addons/links/package.json
#	addons/measure/package.json
#	addons/outline/package.json
#	addons/storyshots/storyshots-core/package.json
#	addons/storyshots/storyshots-puppeteer/package.json
#	addons/storysource/package.json
#	addons/toolbars/package.json
#	addons/viewport/package.json
#	app/angular/package.json
#	app/ember/package.json
#	app/html/package.json
#	app/preact/package.json
#	app/react/package.json
#	app/server/package.json
#	app/svelte/package.json
#	app/vue/package.json
#	app/vue3/package.json
#	app/web-components/package.json
#	docs/versions/next.json
#	examples/angular-cli/package.json
#	examples/cra-kitchen-sink/package.json
#	examples/cra-react15/package.json
#	examples/cra-ts-essentials/package.json
#	examples/cra-ts-kitchen-sink/package.json
#	examples/ember-cli/package.json
#	examples/html-kitchen-sink/package.json
#	examples/official-storybook/package.json
#	examples/preact-kitchen-sink/package.json
#	examples/react-ts-webpack4/package.json
#	examples/react-ts/package.json
#	examples/server-kitchen-sink/package.json
#	examples/standalone-preview/package.json
#	examples/svelte-kitchen-sink/package.json
#	examples/vue-3-cli/package.json
#	examples/vue-cli/package.json
#	examples/vue-kitchen-sink/package.json
#	examples/web-components-kitchen-sink/yarn.lock
#	lerna.json
#	lib/addons/package.json
#	lib/api/package.json
#	lib/builder-webpack4/package.json
#	lib/builder-webpack5/package.json
#	lib/channel-postmessage/package.json
#	lib/channel-websocket/package.json
#	lib/cli-sb/package.json
#	lib/cli-storybook/package.json
#	lib/cli/package.json
#	lib/client-api/package.json
#	lib/codemod/package.json
#	lib/components/package.json
#	lib/core-client/package.json
#	lib/core-common/package.json
#	lib/core-server/package.json
#	lib/core/package.json
#	lib/manager-webpack4/package.json
#	lib/manager-webpack5/package.json
#	lib/router/package.json
#	lib/source-loader/package.json
#	lib/theming/package.json
#	lib/ui/package.json
#	package.json
#	scripts/build-package.js
#	scripts/run-registry.ts
#	yarn.lock
  • Loading branch information
ndelangen committed Jun 30, 2022
2 parents 5450252 + 10a87ce commit 3fc8bdd
Show file tree
Hide file tree
Showing 3,004 changed files with 116,735 additions and 49,709 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
12 changes: 8 additions & 4 deletions .babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const withTests = {
],
],
plugins: [
'babel-plugin-require-context-hook',
'@storybook/babel-plugin-require-context-hook',
'babel-plugin-dynamic-import-node',
'@babel/plugin-transform-runtime',
],
Expand All @@ -24,6 +24,7 @@ module.exports = {
ignore: [
'./lib/codemod/src/transforms/__testfixtures__',
'./lib/postinstall/src/__testfixtures__',
'**/typings.d.ts',
],
presets: [
[
Expand All @@ -49,11 +50,12 @@ module.exports = {
],
['@babel/plugin-proposal-class-properties', { loose: true }],
['@babel/plugin-proposal-private-methods', { loose: true }],
['@babel/plugin-proposal-private-property-in-object', { loose: true }],
'@babel/plugin-proposal-export-default-from',
'@babel/plugin-syntax-dynamic-import',
['@babel/plugin-proposal-object-rest-spread', { loose: true, useBuiltIns: true }],
'babel-plugin-macros',
['emotion', { sourceMap: true, autoLabel: true }],
['@emotion', { sourceMap: true, autoLabel: 'always' }],
],
env: {
test: withTests,
Expand Down Expand Up @@ -85,9 +87,10 @@ module.exports = {
['@babel/plugin-proposal-object-rest-spread', { loose: true, useBuiltIns: true }],
'@babel/plugin-proposal-export-default-from',
'@babel/plugin-syntax-dynamic-import',
['@babel/plugin-proposal-private-property-in-object', { loose: true }],
['@babel/plugin-proposal-class-properties', { loose: true }],
'babel-plugin-macros',
['emotion', { sourceMap: true, autoLabel: true }],
['@emotion', { sourceMap: true, autoLabel: 'always' }],
'babel-plugin-add-react-displayname',
],
env: {
Expand Down Expand Up @@ -122,12 +125,13 @@ module.exports = {
],
],
plugins: [
'emotion',
'@emotion',
'babel-plugin-macros',
'@babel/plugin-transform-arrow-functions',
'@babel/plugin-transform-shorthand-properties',
'@babel/plugin-transform-block-scoping',
'@babel/plugin-transform-destructuring',
['@babel/plugin-proposal-private-property-in-object', { loose: true }],
['@babel/plugin-proposal-class-properties', { loose: true }],
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-proposal-export-default-from',
Expand Down
143 changes: 74 additions & 69 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
version: 2.1

executors:
sb_node_12_classic:
sb_node_14_classic:
parameters:
class:
description: The Resource class
type: enum
enum: ['small', 'medium', 'large', 'xlarge']
enum: ['small', 'medium', 'medium+', 'large', 'xlarge']
default: 'medium'
working_directory: /tmp/storybook
docker:
- image: circleci/node:12
- image: circleci/node:14
environment:
NODE_OPTIONS: --max_old_space_size=3076
resource_class: <<parameters.class>>
sb_node_12_browsers:
sb_node_14_browsers:
parameters:
class:
description: The Resource class
type: enum
enum: ['small', 'medium', 'large', 'xlarge']
enum: ['small', 'medium', 'medium+', 'large', 'xlarge']
default: 'medium'
working_directory: /tmp/storybook
docker:
- image: circleci/node:12-browsers
- image: circleci/node:14-browsers
environment:
NODE_OPTIONS: --max_old_space_size=3076
resource_class: <<parameters.class>>
sb_cypress_6_node_12:
sb_cypress_8_node_14:
parameters:
class:
description: The Resource class
type: enum
enum: ['small', 'medium', 'large', 'xlarge']
enum: ['small', 'medium', 'medium+', 'large', 'xlarge']
default: 'medium'
working_directory: /tmp/storybook
docker:
# ⚠️ The Cypress docker image is based on Node.js one so be careful when updating it because it can also
# cause an upgrade of the Node.
- image: cypress/included:6.8.0
# cause an upgrade of Node.js version too. Cypress 8.5 image is based on Node.js 14
- image: cypress/included:8.7.0
environment:
NODE_OPTIONS: --max_old_space_size=3076
resource_class: <<parameters.class>>
Expand Down Expand Up @@ -79,23 +79,23 @@ jobs:
build:
executor:
class: xlarge
name: sb_node_12_classic
name: sb_node_14_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
- restore_cache:
name: Restore Yarn cache
keys:
- build-yarn-2-cache-v1--{{ checksum "yarn.lock" }}
- build-yarn-2-cache-v3--{{ checksum "yarn.lock" }}
- run:
name: Install dependencies
command: yarn install --immutable
- run:
name: Bootstrap
command: yarn bootstrap --core
command: yarn bootstrap --build --manager
- save_cache:
name: Save Yarn cache
key: build-yarn-2-cache-v1--{{ checksum "yarn.lock" }}
key: build-yarn-2-cache-v3--{{ checksum "yarn.lock" }}
paths:
- ~/.yarn/berry/cache
- persist_to_workspace:
Expand All @@ -107,7 +107,7 @@ jobs:
- app
- lib
chromatic:
executor: sb_node_12_browsers
executor: sb_node_14_browsers
parallelism: 4
steps:
# Keep using default checkout because Chromatic needs some git history to work properly
Expand All @@ -118,25 +118,11 @@ jobs:
name: examples
command: |
yarn run-chromatics
packtracker:
executor:
class: medium
name: sb_node_12_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
name: Report webpack stats for manager of official storybook
command: |
cd examples/official-storybook
yarn packtracker
examples:
executor:
class: medium
name: sb_node_12_browsers
parallelism: 4
class: medium+
name: sb_node_14_browsers
parallelism: 17
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand All @@ -145,15 +131,15 @@ jobs:
- run:
name: examples
command: |
yarn build-storybooks
yarn build-storybooks --all
- persist_to_workspace:
root: .
paths:
- built-storybooks
publish:
executor:
class: medium
name: sb_node_12_classic
name: sb_node_14_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand All @@ -169,7 +155,7 @@ jobs:
e2e-tests-extended:
executor:
class: medium
name: sb_cypress_6_node_12
name: sb_cypress_8_node_14
parallelism: 4
steps:
- when:
Expand All @@ -194,17 +180,17 @@ jobs:
name: Wait for registry
command: yarn wait-on http://localhost:6000
- run:
name: Run E2E tests
command: yarn test:e2e-framework --clean --all --skip angular11 --skip angular --skip vue3 --skip web_components_typescript --skip cra
name: Run E2E (extended) tests
command: yarn test:e2e-framework --clean --all --skip angular11 --skip angular --skip angular12 --skip vue3 --skip web_components_typescript --skip cra --skip react
no_output_timeout: 5m
- store_artifacts:
path: /tmp/cypress-record
destination: cypress
e2e-tests-core:
executor:
class: medium
name: sb_cypress_6_node_12
parallelism: 2
class: large
name: sb_cypress_8_node_14
parallelism: 8
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand All @@ -218,18 +204,39 @@ jobs:
name: Wait for registry
command: yarn wait-on http://localhost:6000
- run:
name: Run E2E tests
name: Run E2E (core) tests
# Do not test CRA here because it's done in PnP part
# TODO: Remove `web_components_typescript` as soon as Lit 2 stable is released
command: yarn test:e2e-framework vue3 angular angular11 web_components_typescript web_components_lit2
command: yarn test:e2e-framework vue3 angular130 angular13 angular12 angular11 web_components_typescript web_components_lit2 react react_legacy_root_api vite_react
no_output_timeout: 5m
- store_artifacts:
path: /tmp/cypress-record
destination: cypress
e2e-tests-sb-docs:
executor:
class: large
name: sb_cypress_8_node_14
parallelism: 2
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
name: Running local registry
command: yarn local-registry --port 6000 --open
background: true
- run:
name: Wait for registry
command: yarn wait-on http://localhost:6000
- run:
name: Run smoke tests
command: yarn test:e2e-framework angular_modern_inline_rendering --test-runner --docs-mode
no_output_timeout: 5m
cra-bench:
executor:
class: medium
name: sb_cypress_6_node_12
name: sb_cypress_8_node_14
working_directory: /tmp/storybook
steps:
- git-shallow-clone/checkout_advanced:
Expand All @@ -249,11 +256,11 @@ jobs:
cd ..
npx create-react-app cra-bench
cd cra-bench
npx @storybook/bench 'npx sb init' --label cra --extra-flags "--modern"
npx @storybook/bench@latest 'npx sb init' --label cra --extra-flags "--modern"
e2e-tests-pnp:
executor:
class: medium
name: sb_cypress_6_node_12
name: sb_cypress_8_node_14
working_directory: /tmp/storybook
steps:
- git-shallow-clone/checkout_advanced:
Expand All @@ -268,15 +275,25 @@ jobs:
name: Wait for registry
command: yarn wait-on http://localhost:6000
- run:
name: run e2e tests
command: yarn test:e2e-framework --pnp sfcVue cra
name: run e2e tests cra
command: yarn test:e2e-framework --pnp cra
# - run:
# name: run e2e tests vue
# command: yarn test:e2e-framework --pnp sfcVue
- run:
name: prep artifacts
when: always
command: zip -r /tmp/storybook-e2e-testing-out.zip /tmp/storybook-e2e-testing
- store_artifacts:
path: /tmp/cypress-record
destination: cypress
- store_artifacts:
path: /tmp/storybook-e2e-testing-out.zip
destination: e2e
e2e-tests-examples:
executor:
class: small
name: sb_cypress_6_node_12
name: sb_cypress_8_node_14
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand All @@ -298,7 +315,7 @@ jobs:
smoke-tests:
executor:
class: medium
name: sb_node_12_browsers
name: sb_node_14_browsers
environment:
# Disable ESLint when running smoke tests to improve perf + As of CRA 4.0.3, CRA kitchen sinks are throwing
# because of some ESLint warnings, related to: https://github.com/facebook/create-react-app/pull/10590
Expand Down Expand Up @@ -353,21 +370,10 @@ jobs:
command: |
cd examples/cra-react15
yarn storybook --smoke-test --quiet
frontpage:
executor: sb_node_12_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
- run:
name: Install dependencies
command: yarn install --immutable
- run:
name: Trigger build
command: ./scripts/build-frontpage.js
lint:
executor:
class: small
name: sb_node_12_classic
name: sb_node_14_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand All @@ -377,7 +383,7 @@ jobs:
name: Lint
command: yarn lint
unit-tests:
executor: sb_node_12_browsers
executor: sb_node_14_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand All @@ -386,14 +392,16 @@ jobs:
- run:
name: Test
command: yarn test --coverage --runInBand --ci
- store_test_results:
path: junit.xml
- persist_to_workspace:
root: .
paths:
- coverage
coverage:
executor:
class: small
name: sb_node_12_browsers
name: sb_node_14_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand All @@ -419,9 +427,6 @@ workflows:
- smoke-tests:
requires:
- build
- packtracker:
requires:
- build
- unit-tests:
requires:
- build
Expand All @@ -440,12 +445,12 @@ workflows:
- e2e-tests-core:
requires:
- publish
- e2e-tests-sb-docs:
requires:
- publish
- e2e-tests-pnp:
requires:
- publish
- cra-bench:
requires:
- publish
deploy:
jobs:
- frontpage

0 comments on commit 3fc8bdd

Please sign in to comment.