Skip to content

Commit ba1492d

Browse files
committed
Merge branch 'main' into numberfield-paste-announcements
# Conflicts: # packages/@react-aria/numberfield/package.json # yarn.lock
2 parents dfc570d + 5670b2a commit ba1492d

File tree

2,538 files changed

+249338
-26403
lines changed

Some content is hidden

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

2,538 files changed

+249338
-26403
lines changed

.circleci/comment.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@ async function run() {
5959
[NextJS App Size](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/publish-stats/next-build-stats.txt)
6060
[Publish stats](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/publish-stats/publish.json)
6161
[Size diff since last release](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/publish-stats/size-diff.txt)
62-
[Docs](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/docs/index.html)
6362
[Storybook](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/storybook/index.html?path=/story/accordion--default)
64-
[S2 Storybook](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/storybook-s2/index.html)`
63+
[S2 Storybook](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/storybook-s2/index.html)
64+
[S2 docs](https://d1pzu54gtk2aed.cloudfront.net/main/${process.env.CIRCLE_SHA1}/)
65+
[React Aria docs](https://d5iwopk28bdhl.cloudfront.net/main/${process.env.CIRCLE_SHA1}/)`
6566
});
6667
}
6768
} catch (error) {
@@ -81,8 +82,8 @@ async function run() {
8182
8283
* [View the storybook](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/storybook/index.html?path=/story/accordion--default)
8384
* [View the S2 storybook](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/storybook-s2/index.html)
84-
* [View the documentation](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/docs/index.html)
85-
* [View the S2 docs](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/s2-docs/index.html)`
85+
* [View the S2 docs](https://d1pzu54gtk2aed.cloudfront.net/pr/${process.env.CIRCLE_SHA1}/)
86+
* [View the React Aria docs](https://d5iwopk28bdhl.cloudfront.net/pr/${process.env.CIRCLE_SHA1}/)`
8687
});
8788
} catch (err) {
8889
console.error(err);

.circleci/config.yml

Lines changed: 129 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -13,44 +13,88 @@ parameters:
1313
type: string
1414
default: ""
1515

16+
orbs:
17+
aws-cli: circleci/aws-cli@5.4.1
18+
aws-s3: circleci/aws-s3@4.1
19+
1620
executors:
1721
rsp:
1822
docker:
19-
- image: cimg/node:22.13.1
23+
- image: cimg/node:22.21.1
2024
environment:
2125
CACHE_VERSION: v1
2226
working_directory: ~/react-spectrum
2327

2428
rsp-large:
2529
docker:
26-
- image: cimg/node:22.13.1
30+
- image: cimg/node:22.21.1
2731
resource_class: large
2832
environment:
2933
CACHE_VERSION: v1
3034
working_directory: ~/react-spectrum
3135

3236
rsp-xlarge:
3337
docker:
34-
- image: cimg/node:22.13.1
38+
- image: cimg/node:22.21.1
3539
resource_class: xlarge
3640
environment:
3741
CACHE_VERSION: v1
3842
working_directory: ~/react-spectrum
3943

4044
rsp-2xlarge:
4145
docker:
42-
- image: cimg/node:22.13.1
46+
- image: cimg/node:22.21.1
4347
resource_class: 2xlarge
4448
environment:
4549
CACHE_VERSION: v1
4650
working_directory: ~/react-spectrum
4751

52+
commands:
53+
deploy-s3:
54+
parameters:
55+
dir:
56+
type: string
57+
bucket:
58+
type: string
59+
steps:
60+
- attach_workspace:
61+
at: /tmp/dist
62+
- aws-cli/install
63+
- run:
64+
name: Check AWS credentials
65+
command: |
66+
if [ -z "$AWS_ACCESS_KEY_ID" ] || [ -z "$AWS_SECRET_ACCESS_KEY" ]; then
67+
echo "AWS credentials not found"
68+
circleci-agent step halt
69+
fi
70+
- run:
71+
name: Configure AWS CLI for concurrent requests
72+
command: aws configure set default.s3.max_concurrent_requests 100
73+
- run:
74+
name: Copy immutable assets to S3
75+
command: |
76+
aws s3 cp /tmp/dist/s2-docs/<< parameters.dir >> << parameters.bucket >> --recursive \
77+
--cache-control "public,max-age=31536000,immutable" \
78+
--exclude "*.html" --exclude "*.rsc" --exclude "*.txt" --exclude "*.json" --exclude "*.md" --exclude "*.xml"
79+
- run:
80+
name: Copy HTML and text files to S3
81+
command: |
82+
aws s3 cp /tmp/dist/s2-docs/<< parameters.dir >> << parameters.bucket >> --recursive \
83+
--cache-control "public,max-age=300,stale-while-revalidate=300" \
84+
--exclude "*" --include "*.html" --include "*.txt" --include "*.json" --include "*.md" --include "*.xml"
85+
- run:
86+
name: Copy RSC files to S3
87+
command: |
88+
aws s3 cp /tmp/dist/s2-docs/<< parameters.dir >> << parameters.bucket >> --recursive \
89+
--cache-control "public,max-age=300,stale-while-revalidate=300" \
90+
--content-type "text/x-component;charset=utf-8" \
91+
--exclude "*" --include "*.rsc"
92+
4893
jobs:
4994
install:
5095
executor: rsp-large
5196
steps:
5297
- checkout
53-
5498
- run:
5599
name: Write npmrc
56100
command: |
@@ -380,6 +424,8 @@ jobs:
380424
- run:
381425
name: build fork-point apis
382426
command: |
427+
mkdir -p ~/.ssh
428+
curl -L https://api.github.com/meta | jq -r '.ssh_keys | .[]' | sed -e 's/^/github.com /' >> ~/.ssh/known_hosts
383429
yarn build:api-branch --githash="origin/main" --output="base-api" && yarn build:api-branch && yarn compare:apis
384430
385431
- persist_to_workspace:
@@ -448,50 +494,50 @@ jobs:
448494
paths:
449495
- '*/storybook-s2/'
450496

451-
docs:
497+
s2-docs:
452498
executor: rsp-xlarge
453499
steps:
454500
- restore_cache:
455501
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}
456502

457503
- run:
458-
name: build docs
459-
command: make website
504+
name: build s2 docs
505+
command: make s2-docs
460506

461507
- persist_to_workspace:
462508
root: dist
463509
paths:
464-
- '*/docs/'
510+
- 's2-docs/'
465511

466-
docs-production:
512+
s2-docs-stage:
467513
executor: rsp-xlarge
468514
steps:
469515
- restore_cache:
470516
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}
471517

472518
- run:
473-
name: build docs
474-
command: make website-production
519+
name: build s2 docs
520+
command: make s2-docs-stage
475521

476522
- persist_to_workspace:
477523
root: dist
478524
paths:
479-
- '*/docs/'
525+
- 's2-docs/'
480526

481-
s2-docs:
527+
s2-docs-production:
482528
executor: rsp-xlarge
483529
steps:
484530
- restore_cache:
485531
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}
486532

487533
- run:
488534
name: build s2 docs
489-
command: make s2-docs
535+
command: make s2-docs-production
490536

491537
- persist_to_workspace:
492538
root: dist
493539
paths:
494-
- '*/s2-docs/'
540+
- 's2-docs/'
495541

496542
verdaccio:
497543
executor: rsp-xlarge
@@ -515,37 +561,6 @@ jobs:
515561
paths:
516562
- storage
517563

518-
v-docs:
519-
executor: rsp-2xlarge
520-
steps:
521-
- restore_cache:
522-
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}
523-
524-
- attach_workspace:
525-
at: /tmp/verdaccio-workspace
526-
527-
- run:
528-
name: build docs off verdaccio
529-
command: |
530-
./scripts/verdaccio-ci.sh
531-
./scripts/verdaccio-build.sh
532-
environment:
533-
VERDACCIO_STORAGE_PATH: /tmp/verdaccio-workspace/storage
534-
535-
- run:
536-
name: build docs off verdaccio retry
537-
command: |
538-
./scripts/verdaccio-ci.sh
539-
./scripts/verdaccio-build.sh
540-
environment:
541-
VERDACCIO_STORAGE_PATH: /tmp/verdaccio-workspace/storage
542-
when: on_fail
543-
544-
- persist_to_workspace:
545-
root: verdaccio_dist
546-
paths:
547-
- '*/verdaccio/docs'
548-
549564
v-rsp-cra-18:
550565
executor: rsp-xlarge
551566
steps:
@@ -741,6 +756,28 @@ jobs:
741756
paths:
742757
- '*/verdaccio/publish-stats'
743758

759+
v-starters:
760+
executor: rsp-xlarge
761+
steps:
762+
- restore_cache:
763+
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}
764+
765+
- attach_workspace:
766+
at: /tmp/verdaccio-workspace
767+
768+
- run:
769+
name: build s2-next off verdaccio
770+
command: |
771+
./scripts/verdaccio-ci.sh
772+
./scripts/verdaccio-build-starters.sh
773+
environment:
774+
VERDACCIO_STORAGE_PATH: /tmp/verdaccio-workspace/storage
775+
776+
- persist_to_workspace:
777+
root: dist
778+
paths:
779+
- 's2-docs/'
780+
744781
deploy:
745782
docker:
746783
- image: mcr.microsoft.com/azure-cli:2.63.0
@@ -786,24 +823,25 @@ jobs:
786823
done
787824
fi
788825
789-
deploy-production:
790-
docker:
791-
- image: mcr.microsoft.com/azure-cli:2.63.0
826+
deploy-s3-stage:
827+
executor: rsp
792828
steps:
793-
- attach_workspace:
794-
at: /tmp/dist
795-
- run:
796-
name: Install AzCopy
797-
command: |
798-
wget -O azcopy.tar.gz https://aka.ms/downloadazcopy-v10-linux
799-
tar -xf azcopy.tar.gz
800-
mv ./azcopy_linux_amd64_*/azcopy /usr/local/bin/
801-
- run:
802-
name: deploy
803-
command: |
804-
azcopy copy "/tmp/dist/production/docs/*" "https://reactspectrum.blob.core.windows.net/\$web${AZURE_STORAGE_SAS_TOKEN}" --recursive --exclude-pattern "*.md;*.txt"
805-
azcopy copy "/tmp/dist/production/docs/*" "https://reactspectrum.blob.core.windows.net/\$web${AZURE_STORAGE_SAS_TOKEN}" --recursive --include-pattern "*.md" --content-type "text/markdown; charset=utf-8"
806-
azcopy copy "/tmp/dist/production/docs/*" "https://reactspectrum.blob.core.windows.net/\$web${AZURE_STORAGE_SAS_TOKEN}" --recursive --include-pattern "*.txt" --content-type "text/plain; charset=utf-8"
829+
- deploy-s3:
830+
dir: react-aria
831+
bucket: s3://react-aria-stage
832+
- deploy-s3:
833+
dir: s2
834+
bucket: s3://react-spectrum-stage
835+
836+
deploy-s3-production:
837+
executor: rsp
838+
steps:
839+
- deploy-s3:
840+
dir: react-aria
841+
bucket: s3://react-aria-prod
842+
- deploy-s3:
843+
dir: s2
844+
bucket: s3://react-spectrum-prod
807845

808846
comment:
809847
executor: rsp
@@ -910,21 +948,21 @@ workflows:
910948
- storybook-s2:
911949
requires:
912950
- install
913-
- docs:
951+
- s2-docs:
914952
requires:
915953
- install
916-
- s2-docs:
954+
- s2-docs-stage:
917955
requires:
918956
- install
957+
filters:
958+
branches:
959+
only: main
919960
- verdaccio:
920961
filters:
921962
branches:
922963
only: main
923964
requires:
924965
- install
925-
- v-docs:
926-
requires:
927-
- verdaccio
928966
- v-rsp-cra-18:
929967
requires:
930968
- verdaccio
@@ -955,6 +993,9 @@ workflows:
955993
- v-webpack-4
956994
- v-nextjs
957995
- v-rsp-cra-18
996+
- v-starters:
997+
requires:
998+
- verdaccio
958999
- deploy:
9591000
requires:
9601001
- lint
@@ -969,11 +1010,24 @@ workflows:
9691010
- test-esm
9701011
- storybook
9711012
- storybook-s2
972-
- docs
1013+
- deploy-s3-stage:
1014+
name: deploy-s3-commit
1015+
requires:
1016+
- s2-docs
1017+
filters:
1018+
branches:
1019+
ignore: main
1020+
- deploy-s3-stage:
1021+
name: deploy-s3-main
1022+
requires:
9731023
- s2-docs
1024+
- s2-docs-stage
1025+
- v-starters
1026+
filters:
1027+
branches:
1028+
only: main
9741029
- deploy-verdaccio:
9751030
requires:
976-
- v-docs
9771031
- v-rsp-cra-18
9781032
- v-webpack-4
9791033
- v-nextjs
@@ -991,6 +1045,7 @@ workflows:
9911045
requires:
9921046
- ts-diff
9931047
- deploy
1048+
- deploy-s3-commit
9941049
- comment:
9951050
name: comment-verdaccio
9961051
requires:
@@ -1005,18 +1060,18 @@ workflows:
10051060
- equal: [ "workflow_dispatch", << pipeline.parameters.GHA_Event >>]
10061061
jobs:
10071062
- install
1008-
- docs-production:
1063+
- s2-docs-production:
10091064
filters:
10101065
branches:
10111066
only: main
10121067
requires:
10131068
- install
1014-
- deploy-production:
1069+
- deploy-s3-production:
10151070
filters:
10161071
branches:
10171072
only: main
10181073
requires:
1019-
- docs-production
1074+
- s2-docs-production
10201075

10211076
nightly:
10221077
triggers:

0 commit comments

Comments
 (0)