Skip to content

Commit 976604a

Browse files
authored
Yarn 4 (#6215)
1 parent f0aa6aa commit 976604a

File tree

136 files changed

+44538
-24322
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+44538
-24322
lines changed

.circleci/config.yml

+28-31
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ jobs:
5353
executor: rsp-large
5454
steps:
5555
- checkout
56-
- restore_cache:
57-
keys:
58-
- rsp-yarn-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
59-
- rsp-yarn-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-
60-
- rsp-yarn-{{ .Environment.CACHE_VERSION }}-
6156

6257
- run:
6358
name: Write npmrc
@@ -69,12 +64,7 @@ jobs:
6964
- run:
7065
name: build
7166
command: |
72-
yarn --pure-lockfile --cache-folder ~/.cache/yarn
73-
74-
- save_cache:
75-
paths:
76-
- ~/.cache/yarn
77-
key: rsp-yarn-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
67+
yarn --immutable
7868
7969
- save_cache:
8070
paths:
@@ -85,16 +75,18 @@ jobs:
8575
executor: rsp-large
8676
steps:
8777
- checkout
88-
- restore_cache:
89-
keys:
90-
- rsp-yarn-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
91-
- rsp-yarn-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-
92-
- rsp-yarn-{{ .Environment.CACHE_VERSION }}-
78+
79+
- run:
80+
name: Write npmrc
81+
command: |
82+
if [ $NPM_PASSWORD ]; then
83+
cp .circleci/.npmrc .npmrc
84+
fi
9385
9486
- run:
9587
name: build
9688
command: |
97-
yarn install --pure-lockfile --cache-folder ~/.cache/yarn && yarn install-16 --cache-folder ~/.cache/yarn
89+
yarn install --immutable && yarn install-16
9890
9991
- save_cache:
10092
paths:
@@ -105,16 +97,18 @@ jobs:
10597
executor: rsp-large
10698
steps:
10799
- checkout
108-
- restore_cache:
109-
keys:
110-
- rsp-yarn-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
111-
- rsp-yarn-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-
112-
- rsp-yarn-{{ .Environment.CACHE_VERSION }}-
100+
101+
- run:
102+
name: Write npmrc
103+
command: |
104+
if [ $NPM_PASSWORD ]; then
105+
cp .circleci/.npmrc .npmrc
106+
fi
113107
114108
- run:
115109
name: build
116110
command: |
117-
yarn install --pure-lockfile --cache-folder ~/.cache/yarn && yarn install-17 --cache-folder ~/.cache/yarn
111+
yarn install --immutable && yarn install-17
118112
119113
- save_cache:
120114
paths:
@@ -125,16 +119,18 @@ jobs:
125119
executor: rsp-large
126120
steps:
127121
- checkout
128-
- restore_cache:
129-
keys:
130-
- rsp-yarn-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
131-
- rsp-yarn-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-
132-
- rsp-yarn-{{ .Environment.CACHE_VERSION }}-
122+
123+
- run:
124+
name: Write npmrc
125+
command: |
126+
if [ $NPM_PASSWORD ]; then
127+
cp .circleci/.npmrc .npmrc
128+
fi
133129
134130
- run:
135131
name: build
136132
command: |
137-
yarn install --pure-lockfile --cache-folder ~/.cache/yarn && yarn install-19 --cache-folder ~/.cache/yarn
133+
yarn install --immutable && yarn install-19
138134
139135
- save_cache:
140136
paths:
@@ -292,7 +288,7 @@ jobs:
292288
name: test
293289
command: |
294290
make build
295-
yarn lerna run prepublishOnly
291+
yarn workspaces foreach --all -pt run prepublishOnly
296292
node --loader ./scripts/esm-support/loader.mjs ./scripts/esm-support/testESM.mjs
297293
298294
lint:
@@ -350,7 +346,7 @@ jobs:
350346
command: |
351347
yarn test:parcel
352348
mkdir -p dist
353-
yarn --silent compare:apis --isCI --branch-api-dir="/tmp/dist/branch-api" --base-api-dir="/tmp/dist/base-api" | tee dist/ts-diff.txt
349+
yarn compare:apis --isCI --branch-api-dir="/tmp/dist/branch-api" --base-api-dir="/tmp/dist/base-api" | tee dist/ts-diff.txt
354350
355351
- persist_to_workspace:
356352
root: dist
@@ -479,6 +475,7 @@ jobs:
479475
steps:
480476
- attach_workspace:
481477
at: /tmp/dist
478+
482479
- run:
483480
name: deploy
484481
command: |

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ build-storybook.log
88
coverage
99
dist
1010
junit.xml
11+
.yarn/install-state.gz
1112
node_modules
1213
npm-debug.log
1314
public
1415
storybook-static
1516
test-reports.xml
17+
storage
1618
packages/dev/storybook-builder-parcel/iframe.html
1719
packages/dev/storybook-builder-parcel/preview.js

.yarn/releases/yarn-4.2.2.cjs

+894
Large diffs are not rendered by default.

.yarnrc.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
nodeLinker: node-modules
2+
3+
packageExtensions:
4+
"@parcel/node-resolver-core@*":
5+
peerDependencies:
6+
"@parcel/core": ^2.12.0
7+
8+
unsafeHttpWhitelist:
9+
- localhost
10+
11+
yarnPath: .yarn/releases/yarn-4.2.2.cjs

.yvmrc

-1
This file was deleted.

Makefile

+8-3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ run_chromatic:
1515
clean:
1616
yarn clean:icons
1717
rm -rf dist public src/dist
18+
rm -rf storage
1819

1920
clean_all:
2021
$(MAKE) clean
@@ -26,10 +27,14 @@ clean_node_modules:
2627
rm -rf node_modules
2728
rm -rf packages/*/*/node_modules
2829
rm -rf examples/*/node_modules
30+
rm -rf starters/*/node_modules
2931

3032
clean_dist:
3133
rm -rf packages/*/*/dist
3234
rm -rf packages/{react-aria,react-aria-components,react-stately}/dist
35+
rm -rf packages/{react-aria,react-aria-components,react-stately}/i18n
36+
rm -rf packages/@adobe/react-spectrum/i18n
37+
rm -rf packages/@react-aria/i18n/server
3338

3439
clean_parcel:
3540
rm -rf .parcel-cache
@@ -96,7 +101,7 @@ publish-nightly: build
96101

97102
build:
98103
parcel build packages/@react-{spectrum,aria,stately}/*/ packages/@internationalized/{message,string,date,number}/ packages/react-aria-components --no-optimize --config .parcelrc-build
99-
yarn lerna run prepublishOnly
104+
yarn workspaces foreach --all -pt run prepublishOnly
100105
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/; \
101106
do node scripts/buildEsm.js $$pkg; \
102107
done
@@ -118,7 +123,7 @@ check-examples:
118123

119124
starter:
120125
node scripts/extractStarter.mjs
121-
cd starters/docs && yarn && yarn tsc
126+
cd starters/docs && yarn --no-immutable && yarn tsc
122127

123128
starter-zip: starter
124129
cp LICENSE starters/docs/.
@@ -129,7 +134,7 @@ starter-zip: starter
129134

130135
tailwind-starter:
131136
cp LICENSE starters/tailwind/.
132-
cd starters/tailwind && yarn && yarn tsc
137+
cd starters/tailwind && yarn --no-immutable && yarn tsc
133138
cd starters/tailwind && zip -r react-aria-tailwind-starter.zip . -x .gitignore .DS_Store "node_modules/*" "storybook-static/*"
134139
mv starters/tailwind/react-aria-tailwind-starter.zip dist/production/docs/react-aria-tailwind-starter.$$(git rev-parse --short HEAD).zip
135140
cd starters/tailwind && yarn build-storybook

examples/next-app/.yarn/releases/yarn-4.2.2.cjs

+894
Large diffs are not rendered by default.

examples/next-app/.yarnrc.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
3+
yarnPath: .yarn/releases/yarn-4.2.2.cjs

examples/next-app/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "next-app",
33
"version": "0.1.0",
44
"private": true,
5+
"packageManager": "[email protected]",
56
"scripts": {
67
"dev": "next dev",
78
"build": "next build",

examples/next-app/yarn.lock

Whitespace-only changes.

examples/rac-spectrum-tailwind/.yarn/releases/yarn-4.2.2.cjs

+894
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
3+
yarnPath: .yarn/releases/yarn-4.2.2.cjs

examples/rac-spectrum-tailwind/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
{
22
"name": "rac-spectrum-tailwind-example",
33
"private": true,
4+
"packageManager": "[email protected]",
45
"scripts": {
56
"start": "parcel src/index.html",
67
"build": "parcel build src/index.html",
78
"install-17": "yarn add -W react@^17 react-dom@^17"
89
},
910
"dependencies": {
1011
"@adobe/react-spectrum": "^3.28.0",
12+
"@react-spectrum/provider": "^3.9.7",
1113
"@spectrum-icons/illustrations": "^3.6.3",
12-
"@spectrum-icons/workflow": "^4.2.2",
14+
"@spectrum-icons/workflow": "^4.2.12",
1315
"parcel": "2.0.0-dev.1599",
1416
"postcss": "^8.2.1",
1517
"react": "^18.2.0",

examples/rac-spectrum-tailwind/yarn.lock

Whitespace-only changes.

0 commit comments

Comments
 (0)