Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support React 0.14 #178

Merged
merged 3 commits into from
Sep 4, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 14 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"react-component"
],
"peerDependencies": {
"react": ">=0.13.0"
"react": ">=0.13.0 <0.15.0 || ^0.14.0-alpha"
Copy link
Owner

Choose a reason for hiding this comment

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

@namuol Hey Louise, @jpuri and I tested it quite intense. Good job. We noticed the 0.14 is already at beta3 and only tested it for this version.

Our idea was to make the version explicit to make sure people don't run into trouble: "react": ">=0.13.0 || ^0.14.0-beta3". Once beta4 is out we can migrate to it and verify there are no breaking changes. Are you using the 0.14.0-alpha anywhere or is it fine like that?

},
"scripts": {
"start": "babel --watch --source-maps-inline --optional='es7.classProperties' --out-dir='lib' src",
Expand All @@ -47,8 +47,18 @@
"underscore"
],
"scriptPreprocessor": "<rootDir>/node_modules/babel-jest",
"testFileExtensions": ["jsx", "js"],
"moduleFileExtensions": ["js", "json", "jsx"]
"testFileExtensions": [
"jsx",
"js"
],
"moduleFileExtensions": [
"js",
"json",
"jsx"
]
},
"license": "MIT"
"license": "MIT",
"dependencies": {
"exenv": "^1.2.0"
}
}
3 changes: 1 addition & 2 deletions src/components/Button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import config from '../config/button';
const buttonTypes = ['button', 'submit', 'reset'];

// Enable React Touch Events
React.initializeTouchEvents(true);

React.initializeTouchEvents && React.initializeTouchEvents(true);

/**
* Returns an object with properties that are relevant for the button element.
Expand Down
2 changes: 1 addition & 1 deletion src/components/ComboBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {omit, extend, filterReactChildren, has, isEmpty, find, getArrayForReactC
import style from '../style/combo-box';

// Enable React Touch Events
React.initializeTouchEvents(true);
React.initializeTouchEvents && React.initializeTouchEvents(true);

/**
* Update hover style for the specified styleId.
Expand Down
5 changes: 2 additions & 3 deletions src/components/Rating.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {Component} from 'react';
import { canUseDOM } from 'react/lib/ExecutionEnvironment';
import { canUseDOM } from 'exenv';
import {extend, omit, has} from '../utils/helpers';
import style from '../style/rating.js';
import {injectStyles, removeStyle} from '../utils/inject-style';
Expand All @@ -8,8 +8,7 @@ import config from '../config/rating';
import {requestAnimationFrame, cancelAnimationFrame} from '../utils/animation-frame-management';

// Enable React Touch Events
React.initializeTouchEvents(true);

React.initializeTouchEvents && React.initializeTouchEvents(true);

/**
* sanitize properties for the wrapping div.
Expand Down
4 changes: 2 additions & 2 deletions src/components/Select.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React, {Component, PropTypes} from 'react';
import {omit, extend, filter, filterReactChildren, find, first, flattenReactChildren, isEmpty, findIndex, last, uniqueId, has, some} from '../utils/helpers';
import { canUseDOM } from 'react/lib/ExecutionEnvironment';
import { canUseDOM } from 'exenv';
import unionClassNames from '../utils/union-class-names';
import {injectStyles, removeStyle} from '../utils/inject-style';
import style from '../style/select';
import config from '../config/select';
import isComponentOfType from '../utils/is-component-of-type.js';

// Enable React Touch Events
React.initializeTouchEvents(true);
React.initializeTouchEvents && React.initializeTouchEvents(true);

/**
* Returns true if the provided property is a Placeholder component from Belle.
Expand Down
2 changes: 1 addition & 1 deletion src/components/Toggle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {requestAnimationFrame, cancelAnimationFrame} from '../utils/animation-fr
import unionClassNames from '../utils/union-class-names';

// Enable React Touch Events
React.initializeTouchEvents(true);
React.initializeTouchEvents && React.initializeTouchEvents(true);

function sanitizeChildProps(properties) {
return omit(properties, [
Expand Down
2 changes: 1 addition & 1 deletion src/utils/animation-frame-management.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Inspired by https://gist.github.com/paulirish/1579671

import { canUseDOM } from 'react/lib/ExecutionEnvironment';
import { canUseDOM } from 'exenv';

export let requestAnimationFrame;
export let cancelAnimationFrame;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/calculate-textarea-height.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { canUseDOM } from 'react/lib/ExecutionEnvironment';
import { canUseDOM } from 'exenv';

let hiddenTextarea;
const computedStyleCache = {};
Expand Down
2 changes: 1 addition & 1 deletion src/utils/inject-style.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {flatten, mapObject} from '../utils/helpers';
import CSSPropertyOperations from 'react/lib/CSSPropertyOperations';
import { canUseDOM } from 'react/lib/ExecutionEnvironment';
import { canUseDOM } from 'exenv';
import animations from '../style/animations';

let styleElement;
Expand Down