Skip to content
Merged

Yarn 4 #6215

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 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
5e2498a
Merge branch 'main' into yarn-4
snowystinger May 31, 2024
9342cf1
update from to workspaces again
snowystinger May 31, 2024
fbac033
update all yarn installations
snowystinger May 31, 2024
8fe9f64
re-add from merge
snowystinger May 31, 2024
2d6d783
fix remaining yarn version references
snowystinger May 31, 2024
e89932e
Add nightly versioning
snowystinger Jun 1, 2024
55d60c1
Remove lerna
snowystinger Jun 1, 2024
5ed717c
remove nightly plugin
snowystinger Jun 1, 2024
201cefb
fix test failing on main
snowystinger Jun 1, 2024
0f9581a
fix missing dependency for docs build
snowystinger Jun 1, 2024
92e28ee
fix lock file
snowystinger Jun 1, 2024
73509c6
add dep on test-utils to docs build pkg json
snowystinger Jun 1, 2024
85ceb9b
remove unneeded line in verdaccio for intel macs
snowystinger Jun 1, 2024
f1c6aa1
remove as workspace, not the issue
snowystinger Jun 1, 2024
9e0a70c
Add missing dependency to docs build
snowystinger Jun 1, 2024
1266307
Fix parser
snowystinger Jun 1, 2024
c7e55de
try setting a different hash for the release
snowystinger Jun 1, 2024
1941efa
Merge branch 'main' into yarn-4
snowystinger Jun 1, 2024
ff46bb9
cleanup
snowystinger Jun 1, 2024
febceaa
fix yarnlock compare
snowystinger Jun 1, 2024
ef89b14
enable verdaccio one more time
snowystinger Jun 1, 2024
cd06160
disable verdaccio build again
snowystinger Jun 1, 2024
ef1226a
Fix version bumping
snowystinger Jun 3, 2024
210b59f
fix published api
snowystinger Jun 4, 2024
b90f3ec
Undo yarn versioning
snowystinger Jun 5, 2024
925c6d4
Merge branch 'main' into yarn-4
snowystinger Jun 5, 2024
7f3d12e
run docs verdaccio
snowystinger Jun 5, 2024
4ed5872
finish reverting verdaccio changes
snowystinger Jun 5, 2024
ed816d8
missed a publish call
snowystinger Jun 5, 2024
d275b8c
try to fix verdaccio script
snowystinger Jun 5, 2024
aa374b9
Fix ts error temporarily
snowystinger Jun 5, 2024
ef46ce8
cleanup
snowystinger Jun 5, 2024
bb6bc3f
disable verdaccio on branch commit
snowystinger Jun 5, 2024
c121a19
review feedback
snowystinger Jun 7, 2024
1da31f9
Merge branch 'main' into yarn-4
snowystinger Jun 7, 2024
9ad651c
Merge branch 'main' into yarn-4
snowystinger Jun 7, 2024
d706a4e
Merge branch 'main' into yarn-4
snowystinger Jun 8, 2024
be69c0b
Merge branch 'main' into yarn-4
snowystinger Jun 10, 2024
b2073ad
undo change to rfc
snowystinger Jun 12, 2024
d025cc8
revert test change, it's fixed on main
snowystinger Jun 14, 2024
83e84d7
Merge branch 'main' into yarn-4
snowystinger Jun 14, 2024
cbbe651
Merge branch 'main' into yarn-4
snowystinger Jun 18, 2024
40be986
Merge branch 'main' into yarn-4
snowystinger Jun 21, 2024
765a28c
Merge branch 'main' into yarn-4
snowystinger Jun 23, 2024
ce9512f
fix react version
snowystinger Jun 23, 2024
b5797a8
fix missing dependency
snowystinger Jun 23, 2024
09aef19
fix missing dependency
snowystinger Jun 24, 2024
f94da57
Merge branch 'main' into yarn-4
snowystinger Jun 27, 2024
fc777fd
Merge branch 'main' into yarn-4
snowystinger Jun 29, 2024
a0ae708
Merge branch 'main' into yarn-4
snowystinger Jul 22, 2024
c7cbc87
update yarn lock
snowystinger Jul 22, 2024
b611272
Merge branch 'main' into yarn-4
snowystinger Jul 23, 2024
65d0450
allow individual versioning for packages again
snowystinger Jul 23, 2024
1ddaf26
fix invalid pkgjson entry
snowystinger Jul 23, 2024
6be2ffb
fix a few missed deps
snowystinger Jul 23, 2024
e7fe674
update lockfile
snowystinger Jul 23, 2024
7be3720
remove development scripts
snowystinger Jul 23, 2024
b30bda1
Merge branch 'main' into yarn-4
snowystinger Jul 24, 2024
c031a09
Fix build
snowystinger Jul 24, 2024
23a6b42
fix the yarn lock
snowystinger Jul 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 28 additions & 31 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
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

Copy link
Member

Choose a reason for hiding this comment

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

wait is the cache being checked in? I thought there would be something in .yarn/cache here but I don't see that in this PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

ah, looks like i went back on this due to size
I think we can discuss if we want to do this or not
right now, the install time on CI has stayed roughly the same (technically it's a little faster than it used to be) so that's why I left off the manual caching we were doing previously

Copy link
Member

Choose a reason for hiding this comment

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

oh interesting that the install time is roughly the same as before even without the caching, I'm fine with not caching then

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 @@ -69,12 +64,7 @@ jobs:
- run:
name: build
command: |
yarn --pure-lockfile --cache-folder ~/.cache/yarn

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

- save_cache:
paths:
Expand All @@ -85,16 +75,18 @@ 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: 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 +97,18 @@ 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: 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 +119,18 @@ 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: build
command: |
yarn install --pure-lockfile --cache-folder ~/.cache/yarn && yarn install-19 --cache-folder ~/.cache/yarn
yarn install --immutable && yarn install-19

- save_cache:
paths:
Expand Down Expand Up @@ -292,7 +288,7 @@ jobs:
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 Down Expand Up @@ -350,7 +346,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 Down Expand Up @@ -479,6 +475,7 @@ jobs:
steps:
- attach_workspace:
at: /tmp/dist

- run:
name: deploy
command: |
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ build-storybook.log
coverage
dist
junit.xml
.yarn/install-state.gz
node_modules
npm-debug.log
public
storybook-static
test-reports.xml
storage
packages/dev/storybook-builder-parcel/iframe.html
packages/dev/storybook-builder-parcel/preview.js
894 changes: 894 additions & 0 deletions .yarn/releases/yarn-4.2.2.cjs

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
nodeLinker: node-modules

packageExtensions:
"@parcel/node-resolver-core@*":
peerDependencies:
"@parcel/core": ^2.12.0

unsafeHttpWhitelist:
- localhost

yarnPath: .yarn/releases/yarn-4.2.2.cjs
1 change: 0 additions & 1 deletion .yvmrc

This file was deleted.

11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ run_chromatic:
clean:
yarn clean:icons
rm -rf dist public src/dist
rm -rf storage

clean_all:
$(MAKE) clean
Expand All @@ -26,10 +27,14 @@ clean_node_modules:
rm -rf node_modules
rm -rf packages/*/*/node_modules
rm -rf examples/*/node_modules
rm -rf starters/*/node_modules

clean_dist:
rm -rf packages/*/*/dist
rm -rf packages/{react-aria,react-aria-components,react-stately}/dist
rm -rf packages/{react-aria,react-aria-components,react-stately}/i18n
rm -rf packages/@adobe/react-spectrum/i18n
rm -rf packages/@react-aria/i18n/server

clean_parcel:
rm -rf .parcel-cache
Expand Down Expand Up @@ -96,7 +101,7 @@ publish-nightly: build

build:
parcel build packages/@react-{spectrum,aria,stately}/*/ packages/@internationalized/{message,string,date,number}/ packages/react-aria-components --no-optimize --config .parcelrc-build
yarn lerna run prepublishOnly
yarn workspaces foreach --all -pt run prepublishOnly
for pkg in packages/@react-{spectrum,aria,stately}/*/ packages/@internationalized/{message,string,date,number}/ packages/@adobe/react-spectrum/ packages/react-aria/ packages/react-stately/ packages/react-aria-components/; \
do node scripts/buildEsm.js $$pkg; \
done
Expand All @@ -118,7 +123,7 @@ check-examples:

starter:
node scripts/extractStarter.mjs
cd starters/docs && yarn && yarn tsc
cd starters/docs && yarn --no-immutable && yarn tsc
Copy link
Member Author

Choose a reason for hiding this comment

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

by default on CI, yarn install is always immutable. This is important for many of our steps, however, when it comes to our sub projects with no lock files, we don't want that

note, all of them now have to have a blank yarn.lock, otherwise yarn4 will try to associate them with workspaces in our monorepo, which we don't want. this is their official stance on it and if you remove a blank one, you'll get an error message explaining you need to include a blank one


starter-zip: starter
cp LICENSE starters/docs/.
Expand All @@ -129,7 +134,7 @@ starter-zip: starter

tailwind-starter:
cp LICENSE starters/tailwind/.
cd starters/tailwind && yarn && yarn tsc
cd starters/tailwind && yarn --no-immutable && yarn tsc
cd starters/tailwind && zip -r react-aria-tailwind-starter.zip . -x .gitignore .DS_Store "node_modules/*" "storybook-static/*"
mv starters/tailwind/react-aria-tailwind-starter.zip dist/production/docs/react-aria-tailwind-starter.$$(git rev-parse --short HEAD).zip
cd starters/tailwind && yarn build-storybook
Expand Down
894 changes: 894 additions & 0 deletions examples/next-app/.yarn/releases/yarn-4.2.2.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions examples/next-app/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.2.2.cjs
1 change: 1 addition & 0 deletions examples/next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "next-app",
"version": "0.1.0",
"private": true,
"packageManager": "yarn@4.2.2",
"scripts": {
"dev": "next dev",
"build": "next build",
Expand Down
Empty file added examples/next-app/yarn.lock
Empty file.
894 changes: 894 additions & 0 deletions examples/rac-spectrum-tailwind/.yarn/releases/yarn-4.2.2.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions examples/rac-spectrum-tailwind/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.2.2.cjs
4 changes: 3 additions & 1 deletion examples/rac-spectrum-tailwind/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
{
"name": "rac-spectrum-tailwind-example",
"private": true,
"packageManager": "yarn@4.2.2",
"scripts": {
"start": "parcel src/index.html",
"build": "parcel build src/index.html",
"install-17": "yarn add -W react@^17 react-dom@^17"
},
"dependencies": {
"@adobe/react-spectrum": "^3.28.0",
"@react-spectrum/provider": "^3.9.7",
Copy link
Member

Choose a reason for hiding this comment

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

where did this direct dependency come from?

Copy link
Member Author

Choose a reason for hiding this comment

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

I noticed a couple packages had a specific minimum range, so I figured this was a good idea to just always update like the rest of our dependencies

"@spectrum-icons/illustrations": "^3.6.3",
"@spectrum-icons/workflow": "^4.2.2",
"@spectrum-icons/workflow": "^4.2.12",
"parcel": "2.0.0-dev.1599",
"postcss": "^8.2.1",
"react": "^18.2.0",
Expand Down
Empty file.
Loading