Skip to content

Commit

Permalink
Merge branch 'next' into b/undefined_docs_context
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Feb 21, 2022
2 parents 37fa89d + d6aa6f3 commit 953eb2d
Show file tree
Hide file tree
Showing 525 changed files with 16,305 additions and 16,859 deletions.
4 changes: 4 additions & 0 deletions .babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module.exports = {
ignore: [
'./lib/codemod/src/transforms/__testfixtures__',
'./lib/postinstall/src/__testfixtures__',
'**/typings.d.ts',
],
presets: [
[
Expand All @@ -49,6 +50,7 @@ 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 }],
Expand Down Expand Up @@ -85,6 +87,7 @@ 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 }],
Expand Down Expand Up @@ -128,6 +131,7 @@ module.exports = {
'@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
49 changes: 29 additions & 20 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

executors:
sb_node_12_classic:
sb_node_14_classic:
parameters:
class:
description: The Resource class
Expand All @@ -10,11 +10,11 @@ executors:
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
Expand All @@ -23,7 +23,7 @@ executors:
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>>
Expand Down Expand Up @@ -79,14 +79,14 @@ 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-v2--{{ checksum "yarn.lock" }}
- run:
name: Install dependencies
command: yarn install --immutable
Expand All @@ -95,7 +95,7 @@ jobs:
command: yarn bootstrap --core
- save_cache:
name: Save Yarn cache
key: build-yarn-2-cache-v1--{{ checksum "yarn.lock" }}
key: build-yarn-2-cache-v2--{{ 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 @@ -121,7 +121,7 @@ jobs:
packtracker:
executor:
class: medium
name: sb_node_12_browsers
name: sb_node_14_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand All @@ -135,7 +135,7 @@ jobs:
examples:
executor:
class: medium
name: sb_node_12_browsers
name: sb_node_14_browsers
parallelism: 4
steps:
- git-shallow-clone/checkout_advanced:
Expand All @@ -153,7 +153,7 @@ jobs:
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 Down Expand Up @@ -195,7 +195,7 @@ jobs:
command: yarn wait-on http://localhost:6000
- run:
name: Run E2E tests
command: yarn test:e2e-framework --clean --all --skip angular11 --skip angular --skip angular12 --skip vue3 --skip web_components_typescript --skip cra
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
Expand All @@ -221,8 +221,7 @@ jobs:
name: Run E2E 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
# TODO: Add `angular` as soon as Storybook is compatible with Angular 13
command: yarn test:e2e-framework vue3 angular130 angular13 angular12 angular11 web_components_typescript web_components_lit2
command: yarn test:e2e-framework vue3 angular130 angular13 angular12 angular11 web_components_typescript web_components_lit2 react
no_output_timeout: 5m
- store_artifacts:
path: /tmp/cypress-record
Expand Down Expand Up @@ -269,11 +268,21 @@ 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
Expand All @@ -299,7 +308,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 @@ -357,7 +366,7 @@ jobs:
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 @@ -367,7 +376,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 @@ -383,7 +392,7 @@ jobs:
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 Down
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ lib/manager-webpack4/prebuilt
lib/manager-webpack5/prebuilt
lib/core-server/prebuilt
lib/codemod/src/transforms/__testfixtures__
lib/components/src/controls/react-editable-json-tree
scripts/storage
scripts/repros-generator
*.bundle.js
Expand Down
29 changes: 29 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,25 @@ module.exports = {
],
},
overrides: [
{
// this package depends on a lot of peerDependencies we don't want to specify, because npm would install them
files: ['**/addons/docs/**/*'],
rules: {
'import/no-extraneous-dependencies': 'off',
},
},
{
// this package uses pre-bundling, dependencies will be bundled, and will be in devDepenencies
files: [
'**/lib/theming/**/*',
'**/lib/router/**/*',
'**/lib/ui/**/*',
'**/lib/components/**/*',
],
rules: {
'import/no-extraneous-dependencies': ['error', { bundledDependencies: false }],
},
},
{
files: [
'**/__tests__/**',
Expand Down Expand Up @@ -46,6 +65,16 @@ module.exports = {
'react/prop-types': 'off', // we should use types
'react/forbid-prop-types': 'off', // we should use types
'no-dupe-class-members': 'off', // this is called overloads in typescript
'react/no-unused-prop-types': 'off', // we should use types
'react/default-props-match-prop-types': 'off', // we should use types
'import/no-named-as-default': 'warn',
'import/no-named-as-default-member': 'warn',
'react/destructuring-assignment': 'warn',

// This warns about importing interfaces and types in a normal import, it's arguably better to import with the `type` prefix separate from the runtime imports,
// I leave this as a warning right now because we haven't really decided yet, and the codebase is riddled with errors if I set to 'error'.
// It IS set to 'error' for JS files.
'import/named': 'warn',
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linear-export.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ jobs:
linearIssuePrefix: SB
linearLabel: Storybook
linearPRLabel: PR
linearTeam: CH
linearTeam: SB
linearApiKey: ${{ secrets.LINEAR_API_KEY }}
2 changes: 1 addition & 1 deletion .github/workflows/tests-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
build:
name: Core Unit Tests node-${{ matrix.node_version }}, ${{ matrix.os }}
if: github.event_name == 'push' || github.event.label.name == 'ci:matrix'
if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'ci:matrix')
strategy:
fail-fast: false
matrix:
Expand Down
363 changes: 363 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

768 changes: 768 additions & 0 deletions .yarn/releases/yarn-3.1.1.cjs

Large diffs are not rendered by default.

631 changes: 0 additions & 631 deletions .yarn/releases/yarn-sources.cjs

This file was deleted.

4 changes: 3 additions & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ npmRegistryServer: "https://registry.yarnpkg.com"
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
spec: "@yarnpkg/plugin-typescript"
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"

unsafeHttpWhitelist:
- localhost

yarnPath: .yarn/releases/yarn-sources.cjs
yarnPath: .yarn/releases/yarn-3.1.1.cjs
32 changes: 0 additions & 32 deletions ADDONS_SUPPORT.md

This file was deleted.

0 comments on commit 953eb2d

Please sign in to comment.