Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5a3a830
wip: parcel upgrade
devongovett Jun 8, 2021
d5b2b82
Improvements
devongovett Jun 9, 2021
edde201
Merge branch 'main' of github.com:adobe-private/react-spectrum-v3 int…
devongovett Jun 22, 2021
0922260
Merge branch 'main' of github.com:adobe/react-spectrum into parcel-up…
devongovett Dec 6, 2021
7c96e3e
Working!
devongovett Dec 6, 2021
8addd50
Fix caching issue
devongovett Dec 7, 2021
0da1a3a
Use React 17 by default
devongovett Dec 7, 2021
74306cb
Update MDX to v2
devongovett Dec 7, 2021
3a98c05
Fix mdx comments
devongovett Dec 8, 2021
84c2850
Fix examples in MDX
devongovett Dec 8, 2021
61c4876
Fix build of docs
devongovett Dec 8, 2021
090e70b
Upgrade node
devongovett Dec 8, 2021
bc3f9dd
Upgrade types dependencies
devongovett Dec 8, 2021
6d7580f
Upgrade typescript
devongovett Dec 8, 2021
c9669c6
Fix lint
devongovett Dec 8, 2021
59d226b
Disable symbol collection in postcss transformer
devongovett Dec 8, 2021
325760d
Node 14.8 has a bug?
devongovett Dec 8, 2021
1af2426
Fix link styles
devongovett Dec 8, 2021
f775508
Move test-utils to the dev folder so it doesn't get built
devongovett Dec 16, 2021
9ed41ba
Use nightly version of Parcel to fix docs bundler issues
devongovett Dec 17, 2021
bbe87d6
Update dprint-node
devongovett Dec 20, 2021
fc2b536
Remove old babel things we don't need anymore
devongovett Dec 20, 2021
7c136b5
Merge branch 'main' of github.com:adobe/react-spectrum into parcel-up…
devongovett Dec 20, 2021
d5edb07
Fix merge
devongovett Dec 20, 2021
1cb77b0
Remove --lazy for now
devongovett Dec 20, 2021
7caa267
Revert namer changes
devongovett Dec 20, 2021
a31337f
Use <Keyboard> and <SlotProvider> to get kbd styles
devongovett Dec 21, 2021
908b98c
Fix WRAPPER regex
devongovett Dec 22, 2021
3bcceff
Fix page description styling
devongovett Dec 22, 2021
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
2 changes: 1 addition & 1 deletion .circleci/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function run() {
body: `Build successful! 🎉

* [View the storybook](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/storybook/index.html)
* [View the storybook-17](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/storybook-17/index.html)
* [View the storybook-16](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/storybook-16/index.html)
* [View the documentation](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/docs/index.html)`
});
}
54 changes: 27 additions & 27 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ orbs:
executors:
rsp:
docker:
- image: cimg/node:12.22
- image: cimg/node:14.16.0
environment:
CACHE_VERSION: v1
working_directory: ~/react-spectrum

rsp-large:
docker:
- image: cimg/node:12.22
- image: cimg/node:14.16.0
resource_class: large
environment:
CACHE_VERSION: v1
working_directory: ~/react-spectrum

rsp-xlarge:
docker:
- image: cimg/node:12.22
- image: cimg/node:14.16.0
resource_class: xlarge
environment:
CACHE_VERSION: v1
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
- ~/react-spectrum
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

install-17:
install-16:
executor: rsp-large
steps:
- checkout
Expand All @@ -73,12 +73,12 @@ jobs:
- run:
name: build
command: |
yarn install --pure-lockfile --cache-folder ~/.cache/yarn && yarn install-17 --cache-folder ~/.cache/yarn
yarn install --pure-lockfile --cache-folder ~/.cache/yarn && yarn install-16 --cache-folder ~/.cache/yarn

- save_cache:
paths:
- ~/react-spectrum
key: react-spectrum17-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}
key: react-spectrum16-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

test-ssr:
executor: rsp-xlarge
Expand Down Expand Up @@ -116,23 +116,23 @@ jobs:
- store_artifacts:
path: ~/junit

test-ssr-17:
test-ssr-16:
executor: rsp-xlarge
steps:
- restore_cache:
key: react-spectrum17-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}
key: react-spectrum16-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: test ssr
command: |
yarn test:ssr

test-17:
test-16:
parallelism: 3
executor: rsp-xlarge
steps:
- restore_cache:
key: react-spectrum17-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}
key: react-spectrum16-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run: mkdir ~/junit

Expand All @@ -141,10 +141,10 @@ jobs:
command: |
shopt -s globstar
TESTFILES=$(circleci tests glob "packages/**/*.test.[tj]{s,sx}" | circleci tests split --split-by=timings)
JEST_JUNIT_OUTPUT_NAME="junit-17.xml" yarn test ${TESTFILES}
JEST_JUNIT_OUTPUT_NAME="junit-16.xml" yarn test ${TESTFILES}

- run:
command: cp junit-17.xml ~/junit/
command: cp junit-16.xml ~/junit/
when: always
- store_test_results:
path: ~/junit
Expand Down Expand Up @@ -176,20 +176,20 @@ jobs:
paths:
- '*/storybook/'

storybook-17:
storybook-16:
executor: rsp-large
steps:
- restore_cache:
key: react-spectrum17-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}
key: react-spectrum16-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: build storybook-17
command: make storybook-17
name: build storybook-16
command: make storybook-16

- persist_to_workspace:
root: dist
paths:
- '*/storybook-17/'
- '*/storybook-16/'

docs:
executor: rsp-xlarge
Expand Down Expand Up @@ -275,28 +275,28 @@ workflows:
commit:
jobs:
- install
- install-17
- install-16
- test-ssr:
requires:
- install
- test:
requires:
- install
- test-ssr-17:
- test-ssr-16:
requires:
- install-17
- test-17:
- install-16
- test-16:
requires:
- install-17
- install-16
- lint:
requires:
- install
- storybook:
requires:
- install
- storybook-17:
- storybook-16:
requires:
- install-17
- install-16
- docs:
requires:
- install
Expand All @@ -311,10 +311,10 @@ workflows:
- lint
- test-ssr
- test
- test-ssr-17
- test-17
- test-ssr-16
- test-16
- storybook
- storybook-17
- storybook-16
- docs
- deploy-production:
filters:
Expand Down
5 changes: 4 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ module.exports = {
'expect': true,
'JSX': 'readonly',
'NodeJS': 'readonly',
'AsyncIterable': 'readonly'
'AsyncIterable': 'readonly',
'FileSystemFileEntry': 'readonly',
'FileSystemDirectoryEntry': 'readonly',
'FileSystemEntry': 'readonly'
},
settings: {
jsdoc: {
Expand Down
12 changes: 9 additions & 3 deletions .parcelrc
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
{
"extends": "@parcel/config-default",
"resolvers": ["parcel-resolver-docs", "..."],
"resolvers": ["@parcel/resolver-glob", "parcel-resolver-docs", "..."],
"bundler": "@parcel/bundler-experimental",
Copy link
Member Author

Choose a reason for hiding this comment

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

This fixes the issue with some examples not rendering which we had patched Parcel before, disabling optimization. The new bundler is currently in progress and experimental, but it seems to build our docs correctly.

"transformers": {
"apiCheck:*.{js,ts,tsx,json}": ["parcel-transformer-docs"],
"docs:*.{js,ts,tsx,json}": ["parcel-transformer-docs", "@parcel/transformer-inline"],
"docs-json:*.{js,ts,tsx,json}": ["parcel-transformer-docs"],
"*.{md,mdx}": ["parcel-transformer-mdx-docs"],
"*.svg": ["@parcel/transformer-svg-react"],
"*.css": ["...", "parcel-transformer-css-env"]
"*.css": ["...", "parcel-transformer-css-env"],
"*.{js,mjs,jsm,jsx,es6,cjs,ts,tsx}": [
Copy link
Member Author

Choose a reason for hiding this comment

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

This disables Babel from running in Parcel, even though we have a .babelrc. Parcel includes a much faster transpiler now. Eventual goal is to also use it for Jest and Storybook and remove Babel completely.

"@parcel/transformer-js",
"@parcel/transformer-react-refresh-wrap"
]
},
"namers": ["parcel-namer-docs", "..."],
"packagers": {
"*.json": "parcel-packager-docs",
"*.html": "@parcel/packager-js"
},
"optimizers": {
"*.js": ["parcel-optimizer-ssg", "..."]
"*.html": ["parcel-optimizer-ssg", "..."]
}
}
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ icons: packages/@spectrum-icons/workflow/src packages/@spectrum-icons/color/src
storybook:
NODE_ENV=production yarn build:storybook

storybook-17:
yarn build:storybook-17
storybook-16:
yarn build:storybook-16

# for now doesn't have deploy since v3 doesn't have a place for docs and stuff yet
ci:
Expand All @@ -79,7 +79,7 @@ publish-nightly: build
yarn publish:nightly

build:
parcel build packages/@react-{spectrum,aria,stately}/*/ packages/@internationalized/*/ --no-minify
parcel build packages/@react-{spectrum,aria,stately}/*/ packages/@internationalized/*/ --no-optimize

website:
yarn build:docs --public-url /reactspectrum/$$(git rev-parse HEAD)/docs --dist-dir dist/$$(git rev-parse HEAD)/docs
Expand Down
15 changes: 3 additions & 12 deletions babel.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"presets": [
"@babel/preset-typescript",
"@babel/preset-react",
["@parcel/babel-preset-env",
["@babel/preset-env",
{
"loose": true
}
Expand All @@ -12,7 +12,7 @@
"storybook": {
"presets": [
[
"@parcel/babel-preset-env",
"@babel/preset-env",
{
"loose": true,
"targets": {
Expand Down Expand Up @@ -42,7 +42,7 @@
},
"plugins": [
[
"@parcel/babel-plugin-transform-runtime",
"@babel/plugin-transform-runtime",
{
"version": "^7.6.2"
}
Expand All @@ -53,15 +53,6 @@
"legacy": true
}
],
[
"@babel/plugin-proposal-class-properties",
{
"loose": true
}
],
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-syntax-class-properties",
Copy link
Member Author

Choose a reason for hiding this comment

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

These are included in @babel/preset-env. No need to duplicate them here.

"transform-glob-import",
"babel-plugin-macros"
],
Expand Down
38 changes: 17 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@
],
"scripts": {
"check-types": "tsc",
"install-17": "yarn add -W react@^17.0.1 react-dom@^17.0.1",
"install-16": "yarn add -W react@^16.8.0 react-dom@^16.8.0",
"start": "cross-env NODE_ENV=storybook start-storybook -p 9003 --ci -c '.storybook'",
"build:storybook": "build-storybook -c .storybook -o dist/$(git rev-parse HEAD)/storybook",
"build:storybook-17": "build-storybook -c .storybook -o dist/$(git rev-parse HEAD)/storybook-17",
"build:storybook-16": "build-storybook -c .storybook -o dist/$(git rev-parse HEAD)/storybook-16",
"start:chromatic": "NODE_ENV=storybook start-storybook -p 9004 --ci -c '.chromatic'",
"build:chromatic": "build-storybook -c .chromatic -o dist/$(git rev-parse HEAD)/chromatic",
"start:docs": "PARCEL_WORKER_BACKEND=process DOCS_ENV=dev parcel 'packages/@react-{spectrum,aria,stately}/*/docs/*.mdx' 'packages/dev/docs/pages/**/*.mdx'",
"build:docs": "PARCEL_WORKER_BACKEND=process DOCS_ENV=staging parcel build 'packages/@react-{spectrum,aria,stately}/*/docs/*.mdx' 'packages/dev/docs/pages/**/*.mdx' --no-scope-hoist",
"build:docs": "PARCEL_WORKER_BACKEND=process DOCS_ENV=staging parcel build 'packages/@react-{spectrum,aria,stately}/*/docs/*.mdx' 'packages/dev/docs/pages/**/*.mdx'",
"test": "yarn jest",
"build": "make build",
"test:ssr": "yarn jest --config jest.ssr.config.js",
"ci-test": "yarn jest --maxWorkers=2 && yarn test:ssr --runInBand",
"ci-test-17": "yarn jest --maxWorkers=2 && yarn test:ssr --runInBand",
"ci-test-16": "yarn jest --maxWorkers=2 && yarn test:ssr --runInBand",
"lint": "concurrently \"yarn check-types\" \"eslint packages --ext .js,.ts,.tsx\" \"node scripts/lint-packages.js\"",
"jest": "node scripts/jest.js",
"copyrights": "babel-node --presets @babel/env ./scripts/addHeaders.js",
Expand Down Expand Up @@ -56,26 +56,21 @@
"@babel/cli": "^7.12.10",
"@babel/core": "^7.12.10",
"@babel/node": "^7.12.10",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-proposal-decorators": "^7.12.1",
"@babel/plugin-proposal-export-default-from": "^7.12.1",
"@babel/plugin-proposal-export-namespace-from": "^7.12.1",
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
"@babel/plugin-syntax-class-properties": "^7.12.1",
"@babel/plugin-syntax-decorators": "^7.12.1",
"@babel/plugin-syntax-object-rest-spread": "^7.8.3",
"@babel/plugin-transform-async-to-generator": "^7.12.1",
"@babel/plugin-transform-runtime": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"@babel/preset-react": "^7.12.10",
"@babel/preset-typescript": "^7.12.7",
"@babel/register": "^7.12.10",
"@babel/runtime": "^7.12.5",
"@octokit/rest": "*",
"@parcel/babel-plugin-transform-runtime": "nightly",
"@parcel/babel-preset-env": "nightly",
"@parcel/transformer-inline": "nightly",
"@parcel/transformer-svg-react": "nightly",
"@parcel/bundler-experimental": "2.0.0-nightly.2573",
"@parcel/packager-ts": "2.0.0-nightly.951",
"@parcel/resolver-glob": "2.0.2-nightly.2573",
"@parcel/transformer-inline": "2.0.0-nightly.951",
"@parcel/transformer-svg-react": "2.0.2-nightly.2573",
"@parcel/transformer-typescript-types": "2.0.0-nightly.951",
"@spectrum-css/component-builder": "^1.0.0",
"@spectrum-css/vars": "^2.3.0",
"@storybook/addon-a11y": "^6.1.10",
Expand All @@ -89,9 +84,9 @@
"@testing-library/dom": "^8.0.0",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^12.0.0",
"@testing-library/react-hooks": "^3.4.1",
"@testing-library/react-hooks": "^7.0.2",
"@testing-library/user-event": "^12.1.3",
"@types/react": "^16.9.23",
"@types/react": "^17.0.37",
"@types/storybook__react": "^5.2.1",
"@typescript-eslint/eslint-plugin": "^4.3.0",
"@typescript-eslint/parser": "^4.3.0",
Expand Down Expand Up @@ -140,9 +135,10 @@
"md5": "^2.2.1",
"nyc": "^10.2.0",
"p-queue": "^6.2.1",
"parcel": "nightly",
"parcel": "2.0.0-nightly.949",
"patch-package": "^6.2.0",
"plop": "^2.4.0",
"postcss": "^7.0.0",
"postcss-calc": "^6.0.0",
"postcss-custom-properties": "6.3.1",
"postcss-dir-pseudo-class": "^5.0.0",
Expand All @@ -157,9 +153,9 @@
"postcss-svg": "^3.0.0",
"prop-types": "^15.6.0",
"raf": "^3.4.0",
"react": "^16.8.0 || ^17.0.0-rc.1",
"react": "^17.0.2",
"react-axe": "^3.0.2",
"react-dom": "^16.8.0 || ^17.0.0-rc.1",
"react-dom": "^17.0.2",
"react-overlays": "0.8.3",
"react-test-renderer": "^16.9.0",
Copy link
Member

Choose a reason for hiding this comment

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

should we update this as well?
i'm not sure why it wasn't included in the install-17 script

Copy link
Member Author

Choose a reason for hiding this comment

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

Do we even use it? I don't see any references. And the tests seem to pass?

"recursive-readdir": "^2.2.2",
Expand All @@ -169,7 +165,7 @@
"storybook-dark-mode": "^1.0.3",
"style-loader": "^0.23.1",
"tempy": "^0.5.0",
"typescript": "^3.8.3",
"typescript": "^4.5.2",
"url-loader": "^1.1.2",
"walk-object": "^4.0.0",
"webpack": "^4.44.2",
Expand Down
Loading