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

Yarn 4 #6215

Open
wants to merge 63 commits into
base: main
Choose a base branch
from
Open

Yarn 4 #6215

Show file tree
Hide file tree
Changes from 51 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
c8d672d
Yarn 4 update
snowystinger Apr 16, 2024
859fe6c
Convert more package lints
snowystinger Apr 16, 2024
d707707
fix broken constraint
snowystinger Apr 16, 2024
0369b4e
enforce private and circular checks
snowystinger Apr 16, 2024
03e51d5
fix yarn install
snowystinger Apr 16, 2024
c86e306
fix lock file
snowystinger Apr 16, 2024
40eb43f
fix other react installs
snowystinger Apr 16, 2024
dbb5210
update build branch api
snowystinger Apr 17, 2024
0385610
enable corepack earlier?
snowystinger Apr 17, 2024
ae9877c
build branch api should not be an immutable install
snowystinger Apr 17, 2024
d204587
try to make lock file mutable
snowystinger Apr 17, 2024
cee068c
use undocumented flag
snowystinger Apr 17, 2024
e9eacc5
fix build step
snowystinger Apr 17, 2024
ef2ccaf
fix test esm
snowystinger Apr 17, 2024
dd0f75f
Merge branch 'main' into yarn-4
snowystinger Apr 17, 2024
b4eb9ae
check all yarn versions
snowystinger Apr 17, 2024
5fa0d98
fix names and fix deploy
snowystinger Apr 17, 2024
73598cf
get published check mostly working, will need more investigation
snowystinger Apr 17, 2024
44f0582
turn on docs verdaccio
snowystinger Apr 17, 2024
4f38f54
try to replace lerna usage in verdaccio
snowystinger Apr 17, 2024
62e8dfc
Rearrange where to publish to?
snowystinger Apr 17, 2024
1ed80b2
run the correct command
snowystinger Apr 17, 2024
825a1a6
get verdaccio working fingers crossed
snowystinger Apr 18, 2024
4ea35a5
set up auth hopefully
snowystinger Apr 18, 2024
d0968cf
Force yarn 4 on the examples
snowystinger Apr 18, 2024
79d47ee
empty yarn locks required for examples not part of the overall worksp…
snowystinger Apr 18, 2024
16e293e
Do i need yarn separately installed for each?
snowystinger Apr 18, 2024
99bbddc
fix docs from verdaccio
snowystinger Apr 18, 2024
992dc24
copy over yarn distribution
snowystinger Apr 18, 2024
97a0334
skip step to test the rest while debugging
snowystinger Apr 18, 2024
b2f558e
fix install immutables
snowystinger Apr 18, 2024
46032db
re-enable docs prod
snowystinger Apr 18, 2024
a045a86
Add helpful logs
snowystinger Apr 18, 2024
78b84fd
update install state
snowystinger Apr 18, 2024
71d9a94
lock down version of dep so we don't get install error
snowystinger Apr 18, 2024
3659d3d
small fixes to scripts in quest to win
snowystinger Apr 18, 2024
85a7422
fix docs build!
snowystinger Apr 18, 2024
61b69e9
update starters
snowystinger Apr 18, 2024
71a1130
fix starters more
snowystinger Apr 18, 2024
0e4d071
loosen restrictions on yarn install for starters
snowystinger Apr 18, 2024
f6a2a71
fix resolutions hopefully
snowystinger Apr 19, 2024
cf0dc05
run directly
snowystinger Apr 19, 2024
85016fa
call script correctly
snowystinger Apr 19, 2024
4f18b20
add logs to determine where the fails is
snowystinger Apr 19, 2024
d19ec04
relocate storage
snowystinger Apr 19, 2024
241a3f4
Merge branch 'main' into yarn-4
snowystinger Apr 19, 2024
c0bdffa
update install state
snowystinger Apr 19, 2024
03a37fe
dedupe packages
snowystinger Apr 19, 2024
305e751
remove install-state
snowystinger Apr 19, 2024
4894126
ignore install state in the future
snowystinger Apr 19, 2024
412cce0
move storage back to default location
snowystinger Apr 19, 2024
c0dab4c
debugging
snowystinger Apr 19, 2024
ec0a4d5
more debugging scripts
snowystinger Apr 19, 2024
d55c3fe
Try another location
snowystinger Apr 19, 2024
759a136
compare yarn locks
snowystinger Apr 19, 2024
fbbba2b
a little cleanup
snowystinger Apr 19, 2024
0e96872
disable extra verdaccio step
snowystinger Apr 19, 2024
c650741
Merge branch 'main' into yarn-4
snowystinger Apr 23, 2024
c496951
Merge branch 'main' into yarn-4
snowystinger May 2, 2024
8bb3435
Merge branch 'main' into yarn-4
snowystinger May 8, 2024
3c4e271
fix esm test step
snowystinger May 8, 2024
13c3a27
ensure that the verdaccio build still works
snowystinger May 8, 2024
68ef5ee
Merge branch 'main' into yarn-4
snowystinger May 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
186 changes: 152 additions & 34 deletions .circleci/config.yml
Expand Up @@ -53,11 +53,6 @@ jobs:
executor: rsp-large
steps:
- checkout
- restore_cache:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cache is checked into github right now, but we could change the caching strategy. This is the recommended one though

https://yarnpkg.com/features/caching

New recommendations will come eventually

keys:
- rsp-yarn-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
- rsp-yarn-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-
- rsp-yarn-{{ .Environment.CACHE_VERSION }}-

- run:
name: Write npmrc
Expand All @@ -67,14 +62,14 @@ jobs:
fi

- run:
name: build
name: Yarn version
command: |
yarn --pure-lockfile --cache-folder ~/.cache/yarn
yarn -v

- save_cache:
paths:
- ~/.cache/yarn
key: rsp-yarn-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
- run:
name: build
command: |
yarn --immutable

- save_cache:
paths:
Expand All @@ -85,16 +80,23 @@ jobs:
executor: rsp-large
steps:
- checkout
- restore_cache:
keys:
- rsp-yarn-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
- rsp-yarn-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-
- rsp-yarn-{{ .Environment.CACHE_VERSION }}-

- run:
name: Write npmrc
command: |
if [ $NPM_PASSWORD ]; then
cp .circleci/.npmrc .npmrc
fi

- run:
name: Yarn version
command: |
yarn -v

- run:
name: build
command: |
yarn install --pure-lockfile --cache-folder ~/.cache/yarn && yarn install-16 --cache-folder ~/.cache/yarn
yarn install --immutable && yarn install-16

- save_cache:
paths:
Expand All @@ -105,16 +107,23 @@ jobs:
executor: rsp-large
steps:
- checkout
- restore_cache:
keys:
- rsp-yarn-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
- rsp-yarn-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-
- rsp-yarn-{{ .Environment.CACHE_VERSION }}-

- run:
name: Write npmrc
command: |
if [ $NPM_PASSWORD ]; then
cp .circleci/.npmrc .npmrc
fi

- run:
name: Yarn version
command: |
yarn -v

- run:
name: build
command: |
yarn install --pure-lockfile --cache-folder ~/.cache/yarn && yarn install-17 --cache-folder ~/.cache/yarn
yarn install --immutable && yarn install-17

- save_cache:
paths:
Expand All @@ -125,16 +134,23 @@ jobs:
executor: rsp-large
steps:
- checkout
- restore_cache:
keys:
- rsp-yarn-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
- rsp-yarn-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-
- rsp-yarn-{{ .Environment.CACHE_VERSION }}-

- run:
name: Write npmrc
command: |
if [ $NPM_PASSWORD ]; then
cp .circleci/.npmrc .npmrc
fi

- run:
name: Yarn version
command: |
yarn -v

- run:
name: build
command: |
yarn install --pure-lockfile --cache-folder ~/.cache/yarn && yarn install-canary --cache-folder ~/.cache/yarn
yarn install --immutable && yarn install-canary

- save_cache:
paths:
Expand All @@ -147,6 +163,11 @@ jobs:
- restore_cache:
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: Yarn version
command: |
yarn -v

- run:
name: test ssr
command: yarn test:ssr
Expand All @@ -160,6 +181,11 @@ jobs:

- run: mkdir ~/junit

- run:
name: Yarn version
command: |
yarn -v

- run:
name: test
command: |
Expand All @@ -183,6 +209,11 @@ jobs:
- restore_cache:
key: react-spectrum16-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: Yarn version
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was useful for debugging, feel like it should stay in

command: |
yarn -v

- run:
name: test ssr
command: |
Expand All @@ -194,6 +225,11 @@ jobs:
- restore_cache:
key: react-spectrum17-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: Yarn version
command: |
yarn -v

- run:
name: test ssr
command: |
Expand All @@ -205,6 +241,11 @@ jobs:
- restore_cache:
key: react-spectrum-canary-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: Yarn version
command: |
yarn -v

- run:
name: test ssr
command: |
Expand All @@ -219,6 +260,11 @@ jobs:

- run: mkdir ~/junit

- run:
name: Yarn version
command: |
yarn -v

- run:
name: test
command: |
Expand All @@ -243,6 +289,11 @@ jobs:

- run: mkdir ~/junit

- run:
name: Yarn version
command: |
yarn -v

- run:
name: test
command: |
Expand All @@ -267,6 +318,11 @@ jobs:

- run: mkdir ~/junit

- run:
name: Yarn version
command: |
yarn -v

- run:
name: test
command: |
Expand All @@ -288,11 +344,16 @@ jobs:
- restore_cache:
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: Yarn version
command: |
yarn -v

- run:
name: test
command: |
make build
yarn lerna run prepublishOnly
yarn workspaces foreach --all -pt run prepublishOnly
node --loader ./scripts/esm-support/loader.mjs ./scripts/esm-support/testESM.mjs

lint:
Expand All @@ -301,6 +362,11 @@ jobs:
- restore_cache:
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: Yarn version
command: |
yarn -v

- run:
name: lint
command: yarn lint
Expand All @@ -311,6 +377,15 @@ jobs:
- restore_cache:
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: Yarn version
command: |
yarn -v

- run:
name: Corepack
command: corepack enable --install-directory ~/bin

- run:
name: build branch apis
command: yarn build:api-branch
Expand All @@ -326,6 +401,11 @@ jobs:
- restore_cache:
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: Yarn version
command: |
yarn -v

- run:
name: build fork-point apis
command: |
Expand All @@ -342,6 +422,11 @@ jobs:
- restore_cache:
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: Yarn version
command: |
yarn -v

- attach_workspace:
at: /tmp/dist

Expand All @@ -350,7 +435,7 @@ jobs:
command: |
yarn test:parcel
mkdir -p dist
yarn --silent compare:apis --isCI --branch-api-dir="/tmp/dist/branch-api" --base-api-dir="/tmp/dist/base-api" | tee dist/ts-diff.txt
yarn compare:apis --isCI --branch-api-dir="/tmp/dist/branch-api" --base-api-dir="/tmp/dist/base-api" | tee dist/ts-diff.txt

- persist_to_workspace:
root: dist
Expand All @@ -363,6 +448,11 @@ jobs:
- restore_cache:
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: Yarn version
command: |
yarn -v

- run:
name: check-examples
command: make check-examples
Expand All @@ -373,6 +463,11 @@ jobs:
- restore_cache:
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: Yarn version
command: |
yarn -v

- run:
name: build storybook
command: make storybook
Expand All @@ -388,6 +483,11 @@ jobs:
- restore_cache:
key: react-spectrum16-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: Yarn version
command: |
yarn -v

- run:
name: build storybook-16
command: make storybook-16
Expand All @@ -403,6 +503,11 @@ jobs:
- restore_cache:
key: react-spectrum17-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: Yarn version
command: |
yarn -v

- run:
name: build storybook-17
command: make storybook-17
Expand All @@ -418,6 +523,11 @@ jobs:
- restore_cache:
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: Yarn version
command: |
yarn -v

- run:
name: build docs
command: make website
Expand All @@ -433,6 +543,11 @@ jobs:
- restore_cache:
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: Yarn version
command: |
yarn -v

- run:
name: build docs
command: make website-production
Expand All @@ -448,6 +563,11 @@ jobs:
- restore_cache:
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: Yarn version
command: |
yarn -v

- run:
name: run verdaccio
command: ./scripts/verdaccio.sh ci
Expand All @@ -464,6 +584,7 @@ jobs:
steps:
- attach_workspace:
at: /tmp/dist

- run:
name: deploy
command: |
Expand Down Expand Up @@ -592,9 +713,6 @@ workflows:
requires:
- install
- docs-verdaccio:
filters:
branches:
only: main
requires:
- install
- deploy:
Expand Down