Skip to content

Commit

Permalink
Merge commit 'd04e70b27e40d0a04312d8c5e40127eceeefcd22' into clean-up…
Browse files Browse the repository at this point in the history
…-lint-warnings

# Conflicts:
#	packages/@react-aria/focus/src/useFocusable.tsx
#	packages/@react-aria/interactions/src/useInteractOutside.ts
#	packages/@react-aria/overlays/src/useOverlayPosition.ts
#	packages/@react-spectrum/actiongroup/src/ActionGroup.tsx
#	packages/@react-spectrum/table/src/TableView.tsx
  • Loading branch information
snowystinger committed Jun 18, 2021
2 parents c8440b1 + d04e70b commit 874011a
Show file tree
Hide file tree
Showing 493 changed files with 15,730 additions and 4,557 deletions.
169 changes: 147 additions & 22 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
version: 2.1
orbs:
azure-cli: circleci/azure-cli@1.1.0
azure-cli: circleci/azure-cli@1.2.0
jobs:
install:
docker:
- image: circleci/node:12
resource_class: large
environment:
CACHE_VERSION: v1

working_directory: ~/react-spectrum
steps:
- checkout
- restore_cache:
key: rsp-yarn-{{ checksum "yarn.lock" }}
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 @@ -23,52 +28,149 @@ jobs:
- run:
name: build
command: |
yarn --pure-lockfile
yarn --pure-lockfile --cache-folder ~/.cache/yarn
- save_cache:
paths:
- node_modules
key: rsp-yarn-{{ checksum "yarn.lock" }}
- ~/.cache/yarn
key: rsp-yarn-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-{{ checksum "yarn.lock" }}

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

install-17:
docker:
- image: circleci/node:12
resource_class: large
environment:
CACHE_VERSION: v1

working_directory: ~/react-spectrum
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: build
command: |
yarn install --pure-lockfile --cache-folder ~/.cache/yarn && yarn install-17 --cache-folder ~/.cache/yarn
- save_cache:
paths:
- ~/react-spectrum
key: react-spectrum17-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

test-ssr:
docker:
- image: circleci/node:12
resource_class: xlarge
environment:
CACHE_VERSION: v1

working_directory: ~/react-spectrum
steps:
- restore_cache:
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

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

test:
parallelism: 3
docker:
- image: circleci/node:12
resource_class: xlarge
environment:
CACHE_VERSION: v1

working_directory: ~/react-spectrum
steps:
- restore_cache:
key: react-spectrum-{{ .Environment.CIRCLE_SHA1 }}
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run: mkdir ~/junit

- run:
name: test
command: yarn ci-test
command: |
shopt -s globstar
TESTFILES=$(circleci tests glob "packages/**/*.test.[tj]{s,sx}" | circleci tests split --split-by=timings)
yarn test ${TESTFILES}
test_17:
- run:
command: |
cat junit.xml
cp junit.xml ~/junit/
when: always
- store_test_results:
path: ~/junit
- store_artifacts:
path: ~/junit

test-ssr-17:
docker:
- image: circleci/node:12
resource_class: xlarge
environment:
CACHE_VERSION: v1

working_directory: ~/react-spectrum
steps:
- restore_cache:
key: react-spectrum-{{ .Environment.CIRCLE_SHA1 }}
key: react-spectrum17-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: test ssr
command: |
yarn test:ssr
test-17:
parallelism: 3
docker:
- image: circleci/node:12
resource_class: xlarge
environment:
CACHE_VERSION: v1

working_directory: ~/react-spectrum
steps:
- restore_cache:
key: react-spectrum17-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run: mkdir ~/junit

- run:
name: test
command: yarn ci-test-17
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}
- run:
command: cp junit-17.xml ~/junit/
when: always
- store_test_results:
path: ~/junit
- store_artifacts:
path: ~/junit

lint:
docker:
- image: circleci/node:12
environment:
CACHE_VERSION: v1

working_directory: ~/react-spectrum
steps:
- restore_cache:
key: react-spectrum-{{ .Environment.CIRCLE_SHA1 }}
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: lint
Expand All @@ -78,11 +180,13 @@ jobs:
docker:
- image: circleci/node:12
resource_class: large
environment:
CACHE_VERSION: v1

working_directory: ~/react-spectrum
steps:
- restore_cache:
key: react-spectrum-{{ .Environment.CIRCLE_SHA1 }}
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: build storybook
Expand All @@ -97,11 +201,13 @@ jobs:
docker:
- image: circleci/node:12
resource_class: large
environment:
CACHE_VERSION: v1

working_directory: ~/react-spectrum
steps:
- restore_cache:
key: react-spectrum-{{ .Environment.CIRCLE_SHA1 }}
key: react-spectrum17-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: build storybook-17
Expand All @@ -116,11 +222,13 @@ jobs:
docker:
- image: circleci/node:12
resource_class: xlarge
environment:
CACHE_VERSION: v1

working_directory: ~/react-spectrum
steps:
- restore_cache:
key: react-spectrum-{{ .Environment.CIRCLE_SHA1 }}
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: build docs
Expand All @@ -135,11 +243,13 @@ jobs:
docker:
- image: circleci/node:12
resource_class: xlarge
environment:
CACHE_VERSION: v1

working_directory: ~/react-spectrum
steps:
- restore_cache:
key: react-spectrum-{{ .Environment.CIRCLE_SHA1 }}
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: build docs
Expand Down Expand Up @@ -174,11 +284,14 @@ jobs:
comment:
docker:
- image: circleci/node:12
environment:
CACHE_VERSION: v1

working_directory: ~/react-spectrum
steps:
- checkout
- restore_cache:
key: rsp-yarn-{{ checksum "yarn.lock" }}
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: comment on pr
Expand All @@ -191,10 +304,13 @@ jobs:
docker:
- image: circleci/node:12
resource_class: xlarge
environment:
CACHE_VERSION: v1

working_directory: ~/react-spectrum
steps:
- restore_cache:
key: react-spectrum-{{ .Environment.CIRCLE_SHA1 }}
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}
- run:
name: Authenticate with npm
command: |
Expand All @@ -209,12 +325,19 @@ workflows:
commit:
jobs:
- install
- test:
- install-17
- test-ssr:
requires:
- install
- test_17:
- test:
requires:
- install
- test-ssr-17:
requires:
- install-17
- test-17:
requires:
- install-17
- lint:
requires:
- install
Expand All @@ -223,7 +346,7 @@ workflows:
- install
- storybook-17:
requires:
- install
- install-17
- docs:
requires:
- install
Expand All @@ -236,8 +359,10 @@ workflows:
- deploy:
requires:
- lint
- test-ssr
- test
- test_17
- test-ssr-17
- test-17
- storybook
- storybook-17
- docs
Expand Down
5 changes: 3 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let rulesDirPlugin = require('eslint-plugin-rulesdir');
rulesDirPlugin.RULES_DIR = './bin';

module.exports = {
plugins: ['react', 'rulesdir', 'jsx-a11y', 'react-hooks', 'jest', 'monorepo', 'eslint-plugin-test-act'],
plugins: ['react', 'rulesdir', 'jsx-a11y', 'react-hooks', 'jest', 'monorepo', 'eslint-plugin-rsp-rules'],
extends: ['eslint:recommended'],
parser: 'babel-eslint',
parserOptions: {
Expand Down Expand Up @@ -51,7 +51,8 @@ module.exports = {
}, {
files: ['**/test/**', '**/stories/**', '**/docs/**', '**/chromatic/**'],
rules: {
'test-act/act-events-test': ERROR,
'rsp-rules/act-events-test': ERROR,
'rsp-rules/no-getByRole-toThrow': ERROR,
'rulesdir/imports': OFF,
'monorepo/no-internal-import': OFF,
'jsdoc/require-jsdoc': OFF
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/Bug_Report.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Search open/closed issues before submitting since someone might have asked the s
## 💻 Code Sample

<!-- Please provide a code repository, gist, code snippet or sample files to reproduce the issue -->
<!-- You can use this codesandbox template to get started https://codesandbox.io/s/react-spectrum-template-syueo -->

## 🌍 Your Environment

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ node_modules
npm-debug.log
build-storybook.log
test-reports.xml
junit.xml
.nyc_output
dist
.idea
Expand All @@ -15,3 +16,4 @@ packages/dev/v2-test-deps
dist
public
storybook-static
junit.xml
4 changes: 3 additions & 1 deletion .storybook/layout.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import clsx from 'clsx';
import React from 'react';
import {useViewportSize} from '@react-aria/utils';

export function VerticalCenter({children, className, style}) {
let size = useViewportSize();
return (
<div
className={ clsx('react-spectrum-story', className) }
style={style}
style={{...style, minHeight: size.height}}
>
<span style={{position: 'absolute', top: 0, left: 0}}>{REACT_VERSION}</span>
{ children }
Expand Down
13 changes: 13 additions & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,16 @@ This codebase contains ResizeObserver.d.ts type declaration file which can be ob
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

------------------------------------------------------------------------------

This codebase contains a portion of code that vuejs adapted from jest-dom which can be obtained at:
* SOURCE:
* https://github.com/vuejs/vue-test-utils-next/blob/master/src/utils/isElementVisible.ts
* LICENSE:
* https://github.com/vuejs/vue-test-utils-next/blob/master/LICENSE

* SOURCE:
* https://github.com/testing-library/jest-dom/blob/main/src/to-be-visible.js
* LICENSE:
* https://github.com/testing-library/jest-dom/blob/main/LICENSE

------------------------------------------------------------------------------
Loading

0 comments on commit 874011a

Please sign in to comment.