Skip to content

Commit

Permalink
[Dev Deps] [*] update babel-register, prop-types, babel-cli, `e…
Browse files Browse the repository at this point in the history
…slint`, `eslint-config-airbnb`, `eslint-plugin-import`, `eslint`, `eslint-plugin-jsx-a11y`, `eslint-plugin-react`, `rimraf`, `sinon`
  • Loading branch information
ljharb committed Nov 2, 2017
1 parent 32b5118 commit 3692808
Show file tree
Hide file tree
Showing 34 changed files with 1,370 additions and 1,411 deletions.
2 changes: 1 addition & 1 deletion docs/common-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ class Comp extends React.Component {
}

const wrapper = mount(<Comp />);
const portal = wrapper.instance().portal;
const { portal } = wrapper.instance();
// assert on `portal`
```
2 changes: 1 addition & 1 deletion docs/guides/jsdom.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Here is the sample of [jsdom old API](https://github.com/tmpvar/jsdom/blob/maste
```js
/* setup.js */

const jsdom = require('jsdom').jsdom;
const { jsdom } = require('jsdom');

global.document = jsdom('');
global.window = document.defaultView;
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,22 @@
"author": "Leland Richardson <leland.richardson@airbnb.com>",
"license": "MIT",
"devDependencies": {
"prop-types": "^15.5.10",
"babel-cli": "^6.24.1",
"babel-core": "^6.25.0",
"babel-eslint": "^7.2.3",
"babel-loader": "^6.4.1",
"babel-plugin-transform-replace-object-assign": "^0.2.1",
"babel-preset-airbnb": "^2.4.0",
"babel-register": "^6.24.1",
"babel-register": "^6.26.0",
"chai": "^4.1.1",
"coveralls": "^2.13.1",
"create-react-class": "^15.6.0",
"eslint": "^4.4.1",
"eslint-config-airbnb": "^15.1.0",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^5.0.3",
"eslint": "^4.10.0",
"eslint-config-airbnb": "^16.1.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^5.1.1",
"eslint-plugin-markdown": "^1.0.0-beta.6",
"eslint-plugin-react": "^7.2.1",
"eslint-plugin-react": "^7.4.0",
"gitbook-cli": "^1.0.1",
"gitbook-plugin-anchors": "^0.7.1",
"gitbook-plugin-codeblock-disable-glossary": "0.0.1",
Expand All @@ -99,9 +98,10 @@
"karma-webpack": "^1.8.1",
"lerna": "^2.0.0",
"mocha": "^3.5.0",
"rimraf": "^2.6.1",
"prop-types": "^15.6.0",
"rimraf": "^2.6.2",
"safe-publish-latest": "^1.1.1",
"sinon": "^2.4.1",
"sinon": "^4.1.0",
"webpack": "^1.13.3"
},
"dependencies": {}
Expand Down
10 changes: 7 additions & 3 deletions packages/enzyme-adapter-react-13/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@
"react": "^0.13.0"
},
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-cli": "^6.26.0",
"enzyme": "^3.0.0",
"eslint": "^4.4.1",
"eslint": "^4.10.0",
"eslint-config-airbnb": "^16.1.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.4.0",
"in-publish": "^2.0.0",
"rimraf": "^2.6.1"
"rimraf": "^2.6.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ export default function elementToTree(el) {
if (el === null || typeof el !== 'object' || !('type' in el)) {
return el;
}
const { type, props, key, ref } = el;
const {
type,
props,
key,
ref,
} = el;
const { children } = props;
let rendered = null;
if (isArrayLike(children)) {
Expand Down
10 changes: 7 additions & 3 deletions packages/enzyme-adapter-react-14/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,15 @@
"react-dom": "^0.14.0"
},
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-cli": "^6.26.0",
"enzyme": "^3.0.0",
"eslint": "^4.4.1",
"eslint": "^4.10.0",
"eslint-config-airbnb": "^16.1.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.4.0",
"in-publish": "^2.0.0",
"rimraf": "^2.6.1",
"rimraf": "^2.6.2",
"safe-publish-latest": "^1.1.1"
}
}
10 changes: 7 additions & 3 deletions packages/enzyme-adapter-react-15.4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,15 @@
"react-addons-test-utils": "15.0.0-0 - 15.4.x"
},
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-cli": "^6.26.0",
"enzyme": "^3.0.0",
"eslint": "^4.4.1",
"eslint": "^4.10.0",
"eslint-config-airbnb": "^16.1.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.4.0",
"in-publish": "^2.0.0",
"rimraf": "^2.6.1",
"rimraf": "^2.6.2",
"safe-publish-latest": "^1.1.1"
}
}
10 changes: 7 additions & 3 deletions packages/enzyme-adapter-react-15/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,16 @@
"react-test-renderer": "^15.5.0"
},
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-cli": "^6.26.0",
"babel-plugin-transform-replace-object-assign": "^0.2.1",
"enzyme": "^3.0.0",
"eslint": "^4.4.1",
"eslint": "^4.10.0",
"eslint-config-airbnb": "^16.1.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.4.0",
"in-publish": "^2.0.0",
"rimraf": "^2.6.1",
"rimraf": "^2.6.2",
"safe-publish-latest": "^1.1.1"
}
}
10 changes: 7 additions & 3 deletions packages/enzyme-adapter-react-16/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,15 @@
"react-dom": "^16.0.0-0"
},
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-cli": "^6.26.0",
"enzyme": "^3.0.0",
"eslint": "^4.4.1",
"eslint": "^4.10.0",
"eslint-config-airbnb": "^16.1.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.4.0",
"in-publish": "^2.0.0",
"rimraf": "^2.6.1",
"rimraf": "^2.6.2",
"safe-publish-latest": "^1.1.1"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Extracted from https://github.com/facebook/react/blob/7bdf93b17a35a5d8fcf0ceae0bf48ed5e6b16688/src/renderers/shared/fiber/ReactFiberTreeReflection.js#L104-L228
function findCurrentFiberUsingSlowPath(fiber) {
const alternate = fiber.alternate;
const { alternate } = fiber;
if (!alternate) {
return fiber;
}
Expand All @@ -21,7 +21,7 @@ function findCurrentFiberUsingSlowPath(fiber) {
// assume that the child is current. This happens when we bailout on low
// priority: the bailed out fiber's child reuses the current child.
if (parentA.child === parentB.child) {
let child = parentA.child;
let { child } = parentA;
while (child) {
if (child === a) {
// We've determined that A is the current branch.
Expand Down Expand Up @@ -52,7 +52,7 @@ function findCurrentFiberUsingSlowPath(fiber) {
//
// Search parent A's child set
let didFindChild = false;
let child = parentA.child;
let { child } = parentA;
while (child) {
if (child === a) {
didFindChild = true;
Expand All @@ -70,7 +70,7 @@ function findCurrentFiberUsingSlowPath(fiber) {
}
if (!didFindChild) {
// Search parent B's child set
child = parentB.child;
({ child } = parentB);
while (child) {
if (child === a) {
didFindChild = true;
Expand Down
10 changes: 7 additions & 3 deletions packages/enzyme-adapter-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,15 @@
"react": "0.13.x || 0.14.x || ^15.0.0-0 || ^16.0.0-0"
},
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-cli": "^6.26.0",
"babel-plugin-transform-replace-object-assign": "^0.2.1",
"eslint": "^4.4.1",
"eslint": "^4.10.0",
"eslint-config-airbnb": "^16.1.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.4.0",
"in-publish": "^2.0.0",
"rimraf": "^2.6.1",
"rimraf": "^2.6.2",
"safe-publish-latest": "^1.1.1"
}
}
11 changes: 7 additions & 4 deletions packages/enzyme-adapter-utils/src/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ export function withSetStateAllowed(fn) {

export function assertDomAvailable(feature) {
if (!global || !global.document || !global.document.createElement) {
throw new Error(
`Enzyme's ${feature} expects a DOM environment to be loaded, but found none`,
);
throw new Error(`Enzyme's ${feature} expects a DOM environment to be loaded, but found none`);
}
}

Expand Down Expand Up @@ -118,7 +116,12 @@ export function elementToTree(el) {
if (el === null || typeof el !== 'object' || !('type' in el)) {
return el;
}
const { type, props, key, ref } = el;
const {
type,
props,
key,
ref,
} = el;
const { children } = props;
let rendered = null;
if (isArrayLike(children)) {
Expand Down
1 change: 1 addition & 0 deletions packages/enzyme-example-mocha/.npmrc
2 changes: 1 addition & 1 deletion packages/enzyme-example-mocha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"babel": "^6.23.0",
"babel-core": "^6.26.0",
"babel-preset-airbnb": "^2.4.0",
"eslint": "^4.9.0",
"eslint": "^4.10.0",
"eslint-config-airbnb": "^16.1.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
Expand Down
13 changes: 11 additions & 2 deletions packages/enzyme-test-suite/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"extends": "airbnb",
"root": true,
"env": {
"mocha": true,
},
"rules": {
"no-param-reassign": 0,
"padded-blocks": 0,
Expand All @@ -12,7 +17,11 @@
"import/no-extraneous-dependencies": [2, {
"devDependencies": true
}],
"jsx-a11y/click-events-have-key-events": 0,
"jsx-a11y/no-static-element-interactions": 0,
"jsx-a11y/anchor-has-content": 0
}
"jsx-a11y/anchor-has-content": 0,
"jsx-a11y/anchor-is-valid": 0,
"jsx-a11y/label-has-for": 0,
"react/jsx-curly-brace-presence": 0,
},
}
1 change: 1 addition & 0 deletions packages/enzyme-test-suite/.npmrc
7 changes: 7 additions & 0 deletions packages/enzyme-test-suite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,12 @@
"peerDependencies": {
"react": "^15.5.0",
"react-dom": "^15.5.0"
},
"devDependencies": {
"eslint": "^4.10.0",
"eslint-config-airbnb": "^16.1.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.4.0"
}
}
Loading

0 comments on commit 3692808

Please sign in to comment.