Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Future - Move all code into a code directory #18759

Merged
merged 48 commits into from
Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
c2bbe43
stage0
ndelangen Jul 21, 2022
0a6bccf
map script to correct dir (1 up)
ndelangen Jul 21, 2022
6240167
bootstrap works
ndelangen Jul 21, 2022
d7b63c9
ignore storyshots in prep-mode
ndelangen Jul 21, 2022
45bc96f
update circle config to use the `code` dir
ndelangen Jul 21, 2022
cd4386c
update github workflows
ndelangen Jul 21, 2022
c4ae96f
update netlify config
ndelangen Jul 21, 2022
882106a
update vscode config
ndelangen Jul 21, 2022
9a6072e
update jest config and eslint config
ndelangen Jul 21, 2022
c9f7b89
fix danger config
ndelangen Jul 21, 2022
f75593e
fix circleci config some more
ndelangen Jul 21, 2022
5c22958
fix the ci configs
ndelangen Jul 21, 2022
37b5d2a
add installation of dependencies for script and add that to the cache
ndelangen Jul 21, 2022
f8e93ed
fix some scripts to point at the code dir
ndelangen Jul 21, 2022
1e0998e
disable overriding global registry, fix reference to .babelrc file in…
ndelangen Jul 21, 2022
6653781
move babel plugin from the oddest of places, this is exclusively used…
ndelangen Jul 21, 2022
a71a94a
add missing dependencies need for running unit tests
ndelangen Jul 21, 2022
b016c1e
fix unit tests & fix linting
ndelangen Jul 21, 2022
02b6cf6
fix examples script
ndelangen Jul 21, 2022
c1b5557
fix circleci config for smoke tests
ndelangen Jul 21, 2022
1d0d267
fix inconsistent @types/react
ndelangen Jul 22, 2022
2fa7b08
fix publish step, fix chromatics step
ndelangen Jul 22, 2022
c23f36a
fix the e2e script
ndelangen Jul 22, 2022
e8a0c54
fix more e2e configuration in circleci
ndelangen Jul 22, 2022
d03c328
fix unit tests
ndelangen Jul 22, 2022
5ff09de
fix unit tests reporting
ndelangen Jul 22, 2022
897c8da
experiment on making e2e tests work again
ndelangen Jul 22, 2022
4364910
fix refs to where cypress tests are
ndelangen Jul 22, 2022
2bfbba5
fix cra bench
ndelangen Jul 22, 2022
60a8b48
move the templates of lib/cli so we do not copy in cjs files
ndelangen Jul 22, 2022
8d892d9
fix ref to frameworks/common
ndelangen Jul 23, 2022
9baa5aa
fix unit tests
ndelangen Jul 23, 2022
3126c8a
fix common file copy
ndelangen Jul 23, 2022
7d80c53
add linting on scripts dir && fix linting
ndelangen Jul 23, 2022
ebb1189
fix linting in code
ndelangen Jul 23, 2022
3594a55
disabled eslint plugin for cra examples
ndelangen Jul 23, 2022
3a43023
Merge branch 'future/base' into future/move-code-into-directory
ndelangen Jul 23, 2022
4b141c9
fix some deepscan issues
ndelangen Jul 23, 2022
dc3b1ba
fix: bundle.ts is self-invoking now
ndelangen Jul 23, 2022
eeb36c1
fix netlify
ndelangen Jul 23, 2022
e3bdfa9
fix output dir for netlify
ndelangen Jul 23, 2022
57dd1f1
cleanup npm-scripts in ./scripts
ndelangen Jul 24, 2022
1775e46
ensure packages are installed before running bootstrap via yarn
ndelangen Jul 25, 2022
e147649
add a little bit of documentation in cOntributing.md
ndelangen Jul 25, 2022
d51b4d5
Merge branch 'next' into future/move-code-into-directory
ndelangen Jul 25, 2022
116e5e2
change to use a shell script instead of having a package.json in the …
ndelangen Jul 25, 2022
113e058
Merge branch 'next' into future/move-code-into-directory
ndelangen Jul 26, 2022
dd82d44
fix linting
ndelangen Jul 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .ci/danger/dangerfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const flatten = require('lodash/flatten');
const intersection = require('lodash/intersection');
const isEmpty = require('lodash/isEmpty');

const pkg = require('../../package.json'); // eslint-disable-line import/newline-after-import
const pkg = require('../../code/package.json'); // eslint-disable-line import/newline-after-import
const prLogConfig = pkg['pr-log'];

const Versions = {
Expand Down
121 changes: 87 additions & 34 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,30 +86,40 @@ jobs:
- restore_cache:
name: Restore Yarn cache
keys:
- build-yarn-2-cache-v3--{{ checksum "yarn.lock" }}
- build-yarn-2-cache-v3--{{ checksum "code/yarn.lock" }}
- run:
name: Install dependencies
command: yarn install --immutable
command: |
cd code
yarn install --immutable
- run:
name: Install script dependencies
command: |
cd scripts
yarn install --immutable
- run:
name: Bootstrap
command: |
cd code
yarn bootstrap --build
git diff --exit-code
- save_cache:
name: Save Yarn cache
key: build-yarn-2-cache-v3--{{ checksum "yarn.lock" }}
key: build-yarn-2-cache-v3--{{ checksum "code/yarn.lock" }}
paths:
- ~/.yarn/berry/cache
- persist_to_workspace:
root: .
paths:
- examples
- node_modules
- addons
- frameworks
- lib
- renderers
- presets
- code/node_modules
- scripts/node_modules
- code/examples
- code/node_modules
- code/addons
- code/frameworks
- code/lib
- code/renderers
- code/presets
chromatic:
executor: sb_node_14_browsers
parallelism: 15
Expand All @@ -121,6 +131,7 @@ jobs:
- run:
name: chromatic
command: |
cd code
yarn run-chromatics
examples:
executor:
Expand All @@ -135,11 +146,12 @@ jobs:
- run:
name: examples
command: |
cd code
yarn build-storybooks --all
- persist_to_workspace:
root: .
paths:
- built-storybooks
- code/built-storybooks
publish:
executor:
class: medium
Expand All @@ -151,7 +163,9 @@ jobs:
at: .
- run:
name: running local registry
command: yarn local-registry --publish
command: |
cd code
yarn local-registry --publish
- persist_to_workspace:
root: .
paths:
Expand All @@ -178,14 +192,20 @@ jobs:
at: .
- run:
name: running local registry
command: yarn local-registry --port 6000 --open
command: |
cd code
yarn local-registry --port 6000 --open
background: true
- run:
name: Wait for registry
command: yarn wait-on http://localhost:6000
command: |
cd code
yarn wait-on http://localhost:6000
- run:
name: Run E2E (extended) tests
command: yarn test:e2e-framework --clean --all --skip angular --skip angular12 --skip vue3 --skip web_components_typescript --skip cra --skip react
command: |
cd code
yarn test:e2e-framework --clean --all --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 @@ -202,16 +222,22 @@ jobs:
at: .
- run:
name: Running local registry
command: yarn local-registry --port 6000 --open
command: |
cd code
yarn local-registry --port 6000 --open
background: true
- run:
name: Wait for registry
command: yarn wait-on http://localhost:6000
command: |
cd code
yarn wait-on http://localhost:6000
- run:
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 angular130 angular13 angular12 web_components_typescript web_components_lit2 react react_legacy_root_api
command: |
cd code
yarn test:e2e-framework vue3 angular130 angular13 angular12 web_components_typescript web_components_lit2 react react_legacy_root_api
no_output_timeout: 5m
- run:
name: prep artifacts
Expand Down Expand Up @@ -259,21 +285,29 @@ jobs:
at: .
- run:
name: install playright
command: npx playwright install
command: |
cd code
npx playwright install
- run:
name: Running local registry
command: yarn local-registry --port 6000 --open
command: |
cd code
yarn local-registry --port 6000 --open
background: true
- run:
name: Wait for registry
command: yarn wait-on http://localhost:6000
command: |
cd code
yarn wait-on http://localhost:6000
- run:
name: set up cra repro, skip tests
command: node ./lib/cli/bin/index.js repro -t cra --e2e ../cra-bench
command: |
cd code
node ./lib/cli/bin/index.js repro -t cra --e2e ../cra-bench
- run:
name: Run @storybook/bench on repro
command: |
cd ../cra-bench
cd ./cra-bench
npx @storybook/[email protected] 'echo noop' --label cra
e2e-tests-pnp:
executor:
Expand All @@ -287,14 +321,20 @@ jobs:
at: .
- run:
name: Running local registry
command: yarn local-registry --port 6000 --open
command: |
cd code
yarn local-registry --port 6000 --open
background: true
- run:
name: Wait for registry
command: yarn wait-on http://localhost:6000
command: |
cd code
yarn wait-on http://localhost:6000
- run:
name: run e2e tests cra
command: yarn test:e2e-framework --pnp cra
command: |
cd code
yarn test:e2e-framework --pnp cra
# - run:
# name: run e2e tests vue
# command: yarn test:e2e-framework --pnp sfcVue
Expand All @@ -319,14 +359,20 @@ jobs:
at: .
- run:
name: running example
command: yarn serve-storybooks
command: |
cd code
yarn serve-storybooks
background: true
- run:
name: await running examples
command: yarn await-serve-storybooks
command: |
cd code
yarn await-serve-storybooks
- run:
name: cypress run
command: yarn test:e2e-examples
command: |
cd code
yarn test:e2e-examples
- store_artifacts:
path: /tmp/cypress-record
destination: cypress
Expand All @@ -347,6 +393,7 @@ jobs:
- run:
name: smoke tests
command: |
cd code
yarn smoketest-storybooks --all
lint:
executor:
Expand All @@ -359,7 +406,9 @@ jobs:
at: .
- run:
name: Lint
command: yarn lint
command: |
cd code
yarn lint
unit-tests:
executor: sb_node_14_browsers
steps:
Expand All @@ -369,13 +418,15 @@ jobs:
at: .
- run:
name: Test
command: yarn test --coverage --runInBand --ci
command: |
cd code
yarn test --coverage --runInBand --ci
- store_test_results:
path: junit.xml
path: code/junit.xml
- persist_to_workspace:
root: .
paths:
- coverage
- code/coverage
coverage:
executor:
class: small
Expand All @@ -387,7 +438,9 @@ jobs:
at: .
- run:
name: Upload coverage
command: yarn coverage
command: |
cd code
yarn coverage

workflows:
test:
Expand Down
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/.yarn/** linguist-generated
/**/.yarn/** linguist-generated
2 changes: 2 additions & 0 deletions .github/workflows/generate-repros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
run: |
git config --global user.name "Storybook Bot"
git config --global user.email "[email protected]"
- name: Change directory
run: cd code
- name: Install dependencies
run: yarn install
- name: Generate repros with Latest Storybook CLI
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/tests-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ jobs:
cache: yarn
- name: install, bootstrap
run: |
cd code
yarn install --immutable
yarn bootstrap --core
- name: test
run: |
cd code
yarn test --runInBand --ci
29 changes: 1 addition & 28 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,10 @@ node_modules
.idea
*.iml
*.sw*
npm-shrinkwrap.json
dist
.tern-port
*.DS_Store
.cache
.parcel-cache
coverage/
*.lerna_backup
build
packages/examples/automated-*
/**/LICENSE
docs/public
packs/*.tgz
package-lock.json
.nvmrc
storybook-static
integration/__image_snapshots__/__diff_output__
.jest-test-results.json
/examples/cra-kitchen-sink/src/__image_snapshots__/__diff_output__/
lib/*.jar
lib/**/dll
/false
/addons/docs/common/config-*
built-storybooks
cypress/videos
cypress/screenshots
examples/ember-cli/ember-output
.verdaccio-cache
tsconfig.tsbuildinfo
examples/angular-cli/addon-jest.testresults.json
junit.xml
.next

# Yarn stuff
/**/.yarn/*
Expand All @@ -43,3 +15,4 @@ junit.xml
!/**/.yarn/sdks
!/**/.yarn/versions
/**/.pnp.*
/yarn.lock
Loading