Skip to content

Commit

Permalink
initial bumping
Browse files Browse the repository at this point in the history
  • Loading branch information
alexreardon committed Apr 17, 2020
1 parent 0600bbb commit 9186352
Show file tree
Hide file tree
Showing 82 changed files with 2,241 additions and 1,323 deletions.
3 changes: 2 additions & 1 deletion .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"rules": {
"declaration-empty-line-before": null,
"comment-empty-line-before": null,
"block-no-empty": null
"block-no-empty": null,
"value-keyword-case": null
}
}
4 changes: 2 additions & 2 deletions browser-test-harness.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ Promise.all([
process.on('exit', () => {
child.kill();
});
child.on('exit', code => {
child.on('exit', (code) => {
process.exit(code);
});
})
.catch(error => {
.catch((error) => {
// eslint-disable-next-line no-console
console.error('Unable to spin up standalone servers');
// eslint-disable-next-line no-console
Expand Down
12 changes: 6 additions & 6 deletions csp-server/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import PropTypes from 'prop-types';
import { DragDropContext, Droppable, Draggable } from '../src';

// fake data generator
const getItems = count =>
Array.from({ length: count }, (v, k) => k).map(k => ({
const getItems = (count) =>
Array.from({ length: count }, (v, k) => k).map((k) => ({
id: `item-${k}`,
content: `item ${k}`,
}));
Expand All @@ -33,8 +33,8 @@ export default class App extends Component {
}

componentDidMount() {
document.addEventListener('securitypolicyviolation', e => {
this.setState(state => {
document.addEventListener('securitypolicyviolation', (e) => {
this.setState((state) => {
return { cspErrors: [...state.cspErrors, e] };
});
});
Expand Down Expand Up @@ -67,11 +67,11 @@ export default class App extends Component {
<b id="cspErrors">{this.state.cspErrors.length}</b>
</h1>
<Droppable droppableId="droppable">
{droppableProvided => (
{(droppableProvided) => (
<div ref={droppableProvided.innerRef}>
{this.state.items.map((item, index) => (
<Draggable key={item.id} draggableId={item.id} index={index}>
{draggableProvided => (
{(draggableProvided) => (
<div
ref={draggableProvided.innerRef}
{...draggableProvided.draggableProps}
Expand Down
2 changes: 1 addition & 1 deletion csp-server/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const compiler = webpack(config);
// $ExpectError
compiler.outputFileSystem = fs;
// $ExpectError
const outputPath = compiler.compilers.find(cfg => cfg.name === 'client')
const outputPath = compiler.compilers.find((cfg) => cfg.name === 'client')
.outputPath;

compiler.run(() => {
Expand Down
17 changes: 4 additions & 13 deletions cypress/integration/content-security-policy.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@ import ports from '../../server-ports';
function commonTest(url: string, cspTest: string) {
cy.visit(url);

cy.get(getHandleSelector())
.eq(0)
.as('first')
.should('contain', 'item 0');
cy.get(getHandleSelector())
.eq(1)
.should('contain', 'item 1');
cy.get(getHandleSelector()).eq(0).as('first').should('contain', 'item 0');
cy.get(getHandleSelector()).eq(1).should('contain', 'item 1');

// reorder operation
cy.get('@first')
Expand All @@ -28,13 +23,9 @@ function commonTest(url: string, cspTest: string) {

// order now 2, 1
// note: not using get aliases as they where returning incorrect results
cy.get(getHandleSelector())
.eq(0)
.should('contain', 'item 1');
cy.get(getHandleSelector()).eq(0).should('contain', 'item 1');

cy.get(getHandleSelector())
.eq(1)
.should('contain', 'item 0');
cy.get(getHandleSelector()).eq(1).should('contain', 'item 0');

// element should maintain focus post drag
cy.focused().should('contain', 'item 0');
Expand Down
17 changes: 4 additions & 13 deletions cypress/integration/reorder-lists.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,9 @@ describe('reorder lists', () => {

it('should reorder lists', () => {
// order: Jake, BMO
cy.get('h4')
.eq(0)
.as('first')
.should('contain', 'Jake');
cy.get('h4').eq(0).as('first').should('contain', 'Jake');

cy.get('h4')
.eq(1)
.should('contain', 'BMO');
cy.get('h4').eq(1).should('contain', 'BMO');

// reorder operation
cy.get('@first')
Expand All @@ -31,13 +26,9 @@ describe('reorder lists', () => {

// order now 2, 1
// note: not using get aliases as they where returning incorrect results
cy.get('h4')
.eq(0)
.should('contain', 'BMO');
cy.get('h4').eq(0).should('contain', 'BMO');

// index of the drag handle has changed
cy.get('h4')
.eq(1)
.should('contain', 'Jake');
cy.get('h4').eq(1).should('contain', 'Jake');
});
});
10 changes: 3 additions & 7 deletions cypress/integration/reorder-virtual.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,9 @@ describe('reorder: virtual', () => {
it('should reorder within a list', () => {
const movements: number = 12;

cy.get(getHandleSelector())
.first()
.as('item');
cy.get(getHandleSelector()).first().as('item');

cy.get('@item')
.invoke('attr', 'data-testid')
.as('item-id');
cy.get('@item').invoke('attr', 'data-testid').as('item-id');

cy.get('@item')
.invoke('attr', 'data-index')
Expand Down Expand Up @@ -48,7 +44,7 @@ describe('reorder: virtual', () => {
// This is setting up a chain of commands and this test will not wait
// for a 'promise' to resolve. Linting is getting confused by .then
// eslint-disable-next-line jest/valid-expect-in-promise
cy.get('@item-id').then(id => {
cy.get('@item-id').then((id) => {
cy.get(getHandleSelector(id))
.invoke('attr', 'data-index')
.should('equal', `${movements}`);
Expand Down
17 changes: 4 additions & 13 deletions cypress/integration/reorder.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@ describe('reorder', () => {

it('should reorder within a list', () => {
// order: 1, 2
cy.get(getHandleSelector())
.eq(0)
.as('first')
.should('contain', 'id:1');
cy.get(getHandleSelector())
.eq(1)
.should('contain', 'id:2');
cy.get(getHandleSelector()).eq(0).as('first').should('contain', 'id:1');
cy.get(getHandleSelector()).eq(1).should('contain', 'id:2');

// reorder operation
cy.get('@first')
Expand All @@ -31,13 +26,9 @@ describe('reorder', () => {

// order now 2, 1
// note: not using get aliases as they where returning incorrect results
cy.get(getHandleSelector())
.eq(0)
.should('contain', 'id:2');
cy.get(getHandleSelector()).eq(0).should('contain', 'id:2');

cy.get(getHandleSelector())
.eq(1)
.should('contain', 'id:1');
cy.get(getHandleSelector()).eq(1).should('contain', 'id:1');

// element should maintain focus post drag
cy.focused().should('contain', 'id:1');
Expand Down
2 changes: 1 addition & 1 deletion docs/api/draggable.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ The function is provided with three arguments:
```js
type DraggableProvided = {|
innerRef: HTMLElement => void,
innerRef: (HTMLElement) => void,
draggableProps: DraggableProps,
// will be null if the draggable is disabled
dragHandleProps: ?DragHandleProps,
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/dragging-svgs.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ You can use the `src` of an `<img>` tag (which is a `HTMLElement`) to have a dra
```js
// ✅ supported
<Draggable draggableId="supported" index={0}>
{provided => (
{(provided) => (
<img
{...provided.draggableProps}
{...provided.dragHandleProps}
Expand All @@ -95,7 +95,7 @@ Alternatively you could also apply the SVG as a `background-image` to another `H
```js
// ✅ supported
<Draggable draggableId="supported" index={0}>
{provided => (
{(provided) => (
<div
{...provided.draggableProps}
{...provided.dragHandleProps}
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/screen-reader.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ When making a screen reader announcement we recommend announcing the position of
It reads more natural to hear "You have moved an item to position 2" than "You have moved an item to index 1"

```js
const position = index => index + 1;
const position = (index) => index + 1;

const startPosition = position(source.index);
const endPosition = destination ? position(destination.index) : null;
Expand Down
6 changes: 3 additions & 3 deletions docs/guides/using-inner-ref.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class Person extends React.Component {
}

class App extends React.Component {
setPersonRef = ref => {
setPersonRef = (ref) => {
this.personRef = ref;

// When the ref changes it will firstly be set to null
Expand All @@ -71,7 +71,7 @@ class App extends React.Component {
this.personRef.sayHello();
}
};
setDivRef = ref => {
setDivRef = (ref) => {
this.divRef = ref;

if (this.divRef) {
Expand Down Expand Up @@ -190,7 +190,7 @@ If you also need to use the _HTMLElement_ within your _Component_ you can have a

```js
class Person extends React.Component {
setRef = ref => {
setRef = (ref) => {
// keep a reference to the dom ref as an instance property
this.ref = ref;
// give the dom ref to react-beautiful-dnd
Expand Down
92 changes: 46 additions & 46 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"/src"
],
"config": {
"prettier_target": "*.{js,jsx,md,json} src/**/*.{js,jsx,md,json} test/**/*.{js,jsx,md,json} docs/**/*.{js,jsx,md,json} stories/**/*.{js,jsx,md,json} cypress/**/*.{js,jsx,md,json}"
"prettier_target": "*.{js,jsx,md,json} src/**/*.{js,jsx,md,json} test/**/*.{js,jsx,md,json} docs/**/*.{js,jsx,md,json} stories/**/*.{js,jsx,md,json} cypress/**/*.{js,jsx,md,json} csp-server/**/*.{js,jsx,md,json}"
},
"scripts": {
"test:accessibility": "lighthouse http://localhost:9002/iframe.html?id=single-vertical-list--basic --chrome-flags='--headless' --output=json --output=html --output-path=./test-reports/lighthouse/a11y.json && node a11y-audit-parse.js",
Expand All @@ -56,7 +56,7 @@
"prepublishOnly": "yarn build"
},
"dependencies": {
"@babel/runtime": "^7.8.4",
"@babel/runtime": "^7.9.2",
"css-box-model": "^1.2.0",
"memoize-one": "^5.1.1",
"raf-schd": "^4.0.2",
Expand All @@ -65,82 +65,82 @@
"use-memo-one": "^1.1.1"
},
"devDependencies": {
"@atlaskit/css-reset": "^5.0.9",
"@atlaskit/theme": "^9.5.0",
"@babel/core": "^7.8.4",
"@atlaskit/css-reset": "^5.0.10",
"@atlaskit/theme": "^9.5.2",
"@babel/core": "^7.9.0",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-transform-modules-commonjs": "^7.8.3",
"@babel/plugin-transform-modules-commonjs": "^7.9.0",
"@babel/plugin-transform-object-assign": "^7.8.3",
"@babel/plugin-transform-runtime": "^7.8.3",
"@babel/preset-env": "^7.8.4",
"@babel/preset-flow": "^7.8.3",
"@babel/preset-react": "^7.8.3",
"@babel/plugin-transform-runtime": "^7.9.0",
"@babel/preset-env": "^7.9.5",
"@babel/preset-flow": "^7.9.0",
"@babel/preset-react": "^7.9.4",
"@emotion/babel-preset-css-prop": "^10.0.27",
"@emotion/core": "^10.0.27",
"@emotion/core": "^10.0.28",
"@emotion/styled": "^10.0.27",
"@storybook/react": "^5.3.10",
"@storybook/theming": "^5.3.10",
"@testing-library/react": "^9.4.0",
"@storybook/react": "^5.3.18",
"@storybook/theming": "^5.3.18",
"@testing-library/react": "^10.0.2",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.0.3",
"babel-jest": "^25.1.0",
"babel-loader": "^8.0.6",
"babel-eslint": "^10.1.0",
"babel-jest": "^25.3.0",
"babel-loader": "^8.1.0",
"babel-plugin-dev-expression": "^0.2.2",
"babel-plugin-emotion": "^10.0.27",
"cross-env": "^7.0.0",
"cypress": "^4.0.0",
"babel-plugin-emotion": "^10.0.33",
"cross-env": "^7.0.2",
"cypress": "^4.4.0",
"emotion-theming": "^10.0.27",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.2",
"eslint": "6.8.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-cypress": "^2.8.1",
"eslint-config-airbnb": "^18.1.0",
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-cypress": "^2.10.3",
"eslint-plugin-emotion": "^10.0.27",
"eslint-plugin-es5": "^1.5.0",
"eslint-plugin-flowtype": "^4.6.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-jest": "^23.6.0",
"eslint-plugin-flowtype": "^4.7.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-jest": "^23.8.2",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.18.3",
"eslint-plugin-react-hooks": "^2.3.0",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^3.0.0",
"flow-bin": "0.110.1",
"fs-extra": "^8.0.1",
"fs-extra": "^9.0.0",
"globby": "^11.0.0",
"jest": "^25.1.0",
"jest-axe": "^3.3.0",
"jest": "^25.3.0",
"jest-axe": "^3.4.0",
"jest-junit": "^10.0.0",
"jest-watch-typeahead": "^0.4.2",
"jest-watch-typeahead": "^0.5.0",
"lighthouse": "^5.6.0",
"markdown-it": "^10.0.0",
"prettier": "^1.19.1",
"prettier": "^2.0.4",
"raf-stub": "^3.0.0",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-test-renderer": "^16.12.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-test-renderer": "^16.13.1",
"react-virtualized": "^9.21.2",
"react-window": "^1.8.5",
"require-from-string": "^2.0.2",
"rimraf": "^3.0.1",
"rollup": "^1.31.0",
"rollup-plugin-babel": "^4.3.3",
"rimraf": "^3.0.2",
"rollup": "^2.6.1",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-node-resolve": "^5.1.0",
"rollup-plugin-replace": "^2.2.0",
"rollup-plugin-size-snapshot": "^0.11.0",
"rollup-plugin-strip": "^1.2.2",
"rollup-plugin-terser": "^5.2.0",
"styled-components": "5.0.0",
"stylelint": "^13.0.0",
"rollup-plugin-terser": "^5.3.0",
"styled-components": "5.1.0",
"stylelint": "^13.3.2",
"stylelint-config-prettier": "^8.0.1",
"stylelint-config-recommended": "^3.0.0",
"stylelint-config-standard": "^19.0.0",
"stylelint-config-standard": "^20.0.0",
"stylelint-config-styled-components": "^0.1.1",
"stylelint-processor-styled-components": "^1.9.0",
"stylelint-processor-styled-components": "^1.10.0",
"wait-port": "^0.2.7",
"webpack": "^4.41.5"
"webpack": "^4.42.1"
},
"peerDependencies": {
"react": "^16.8.5",
Expand Down
Loading

0 comments on commit 9186352

Please sign in to comment.