Skip to content

Commit

Permalink
Merge pull request #19520 from storybookjs/tech/improvements
Browse files Browse the repository at this point in the history
Improve misc build parts
  • Loading branch information
ndelangen authored Oct 18, 2022
2 parents 72b3180 + 7b1e0e0 commit db0b308
Show file tree
Hide file tree
Showing 14 changed files with 833 additions and 812 deletions.
36 changes: 18 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

executors:
sb_node_14_classic:
sb_node_16_classic:
parameters:
class:
description: The Resource class
Expand All @@ -14,7 +14,7 @@ executors:
environment:
NODE_OPTIONS: --max_old_space_size=3076
resource_class: <<parameters.class>>
sb_node_14_browsers:
sb_node_16_browsers:
parameters:
class:
description: The Resource class
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
check:
executor:
class: xlarge
name: sb_node_14_classic
name: sb_node_16_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand All @@ -87,14 +87,14 @@ jobs:
keys:
- build-yarn-2-cache-v4--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
- run:
name: Compile
name: Check
command: |
yarn task --task check --start-from=auto --no-link --debug
git diff --exit-code
build:
executor:
class: xlarge
name: sb_node_14_classic
name: sb_node_16_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
- code/renderers
- code/presets
chromatic:
executor: sb_node_14_browsers
executor: sb_node_16_browsers
parallelism: 15
steps:
# Keep using default checkout because Chromatic needs some git history to work properly
Expand All @@ -141,7 +141,7 @@ jobs:
examples:
executor:
class: medium+
name: sb_node_14_browsers
name: sb_node_16_browsers
parallelism: 4
steps:
- git-shallow-clone/checkout_advanced:
Expand All @@ -160,7 +160,7 @@ jobs:
publish:
executor:
class: medium
name: sb_node_14_classic
name: sb_node_16_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand Down Expand Up @@ -240,7 +240,7 @@ jobs:
smoke-tests:
executor:
class: medium+
name: sb_node_14_browsers
name: sb_node_16_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 All @@ -259,7 +259,7 @@ jobs:
lint:
executor:
class: medium
name: sb_node_14_classic
name: sb_node_16_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand All @@ -271,7 +271,7 @@ jobs:
cd code
yarn lint
script-unit-tests:
executor: sb_node_14_browsers
executor: sb_node_16_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand All @@ -285,7 +285,7 @@ jobs:
- store_test_results:
path: scripts/junit.xml
unit-tests:
executor: sb_node_14_browsers
executor: sb_node_16_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand All @@ -305,7 +305,7 @@ jobs:
coverage:
executor:
class: small
name: sb_node_14_browsers
name: sb_node_16_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand All @@ -321,7 +321,7 @@ jobs:
create-sandboxes:
executor:
class: medium+
name: sb_node_14_browsers
name: sb_node_16_browsers
parallelism: 20
steps:
- git-shallow-clone/checkout_advanced:
Expand All @@ -340,7 +340,7 @@ jobs:
smoke-test-sandboxes:
executor:
class: medium+
name: sb_node_14_browsers
name: sb_node_16_browsers
parallelism: 15
steps:
- git-shallow-clone/checkout_advanced:
Expand All @@ -355,7 +355,7 @@ jobs:
build-sandboxes:
executor:
class: medium+
name: sb_node_14_browsers
name: sb_node_16_browsers
parallelism: 20
steps:
- git-shallow-clone/checkout_advanced:
Expand All @@ -374,7 +374,7 @@ jobs:
test-runner-sandboxes:
executor:
class: medium+
name: sb_node_14_browsers
name: sb_node_16_browsers
parallelism: 18
steps:
- git-shallow-clone/checkout_advanced:
Expand All @@ -389,7 +389,7 @@ jobs:
chromatic-sandboxes:
executor:
class: medium+
name: sb_node_14_browsers
name: sb_node_16_browsers
parallelism: 20
steps:
- git-shallow-clone/checkout_advanced:
Expand Down
783 changes: 0 additions & 783 deletions .yarn/releases/yarn-3.2.3.cjs

This file was deleted.

801 changes: 801 additions & 0 deletions .yarn/releases/yarn-3.2.4.cjs

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
installStatePath: ./.yarn/root-install-state.gz

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.2.3.cjs
installStatePath: "./.yarn/root-install-state.gz"
yarnPath: .yarn/releases/yarn-3.2.4.cjs
2 changes: 1 addition & 1 deletion code/.yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ plugins:
unsafeHttpWhitelist:
- localhost

yarnPath: ../.yarn/releases/yarn-3.2.3.cjs
yarnPath: ../.yarn/releases/yarn-3.2.4.cjs
installStatePath: '../.yarn/code-install-state.gz'
2 changes: 1 addition & 1 deletion code/nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"default": {
"runner": "@nrwl/nx-cloud",
"options": {
"cacheableOperations": ["build", "test", "lint", "package", "prep"],
"cacheableOperations": ["build", "test", "lint", "package", "prep", "check"],
"accessToken": "NGVmYTkxMmItYzY3OS00MjkxLTk1ZDktZDFmYTFmNmVlNGY4fHJlYWQ=",
"canTrackAnalytics": false,
"showUsageWarnings": true,
Expand Down
2 changes: 1 addition & 1 deletion code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@
"verdaccio": "^4.10.0",
"verdaccio-auth-memory": "^9.7.2"
},
"packageManager": "[email protected].3",
"packageManager": "[email protected].4",
"engines": {
"node": ">=10.13.0",
"yarn": ">=1.3.2"
Expand Down
2 changes: 1 addition & 1 deletion code/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -39182,7 +39182,7 @@ __metadata:

"typescript@patch:typescript@npm%3A~4.6.3#~builtin<compat/typescript>":
version: 4.6.4
resolution: "typescript@patch:typescript@npm%3A4.6.4#~builtin<compat/typescript>::version=4.6.4&hash=a1c5e5"
resolution: "typescript@patch:typescript@npm%3A4.6.4#~builtin<compat/typescript>::version=4.6.4&hash=701156"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"test": "cd code; yarn test",
"lint": "cd code; yarn lint"
},
"packageManager": "[email protected].3"
"packageManager": "[email protected].4"
}
2 changes: 1 addition & 1 deletion scripts/.yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ plugins:
unsafeHttpWhitelist:
- localhost

yarnPath: ../.yarn/releases/yarn-3.2.3.cjs
yarnPath: ../.yarn/releases/yarn-3.2.4.cjs
installStatePath: "../.yarn/scripts-install-state.gz"
2 changes: 1 addition & 1 deletion scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
"verdaccio": "^4.10.0",
"verdaccio-auth-memory": "^9.7.2"
},
"packageManager": "[email protected].3",
"packageManager": "[email protected].4",
"engines": {
"node": ">=10.13.0",
"yarn": ">=1.3.2"
Expand Down
2 changes: 1 addition & 1 deletion scripts/prepare/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => {
outDir: join(process.cwd(), 'dist'),
...(tsConfigExists ? { tsconfig: tsConfigPath } : {}),
format: ['cjs'],
target: 'node14',
target: 'node16',
platform: 'node',
clean: !watch,
external: [name, ...Object.keys(dependencies || {}), ...Object.keys(peerDependencies || {})],
Expand Down
2 changes: 2 additions & 0 deletions scripts/utils/yarn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export const addPackageResolutions = async ({ cwd, dryRun }: YarnOptions) => {

export const installYarn2 = async ({ cwd, dryRun, debug }: YarnOptions) => {
const command = [
`touch yarn.lock`,
`touch yarnrc.yml`,
`yarn set version berry`,
// Use the global cache so we aren't re-caching dependencies each time we run sandbox
`yarn config set enableGlobalCache true`,
Expand Down
2 changes: 1 addition & 1 deletion scripts/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -19100,7 +19100,7 @@ __metadata:

"typescript@patch:typescript@npm%3A~4.6.3#~builtin<compat/typescript>":
version: 4.6.4
resolution: "typescript@patch:typescript@npm%3A4.6.4#~builtin<compat/typescript>::version=4.6.4&hash=a1c5e5"
resolution: "typescript@patch:typescript@npm%3A4.6.4#~builtin<compat/typescript>::version=4.6.4&hash=701156"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
Expand Down

0 comments on commit db0b308

Please sign in to comment.