Skip to content

Commit

Permalink
Merge origin/master into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ro-ka committed Feb 10, 2016
2 parents 11c08af + 1283d08 commit 364fdee
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 13 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### 1.16.1 (2016-02-07)

#### Bug Fixes

* Fix module build ([7de677c](7de677c51dcd87b67e371303ae3ee1f2242fa599))

## 1.16.0 (2016-02-05)

#### Bug Fixes
Expand Down
14 changes: 7 additions & 7 deletions dist/react-geosuggest.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ var _filterInputAttributes = require('./filter-input-attributes');

var _filterInputAttributes2 = _interopRequireDefault(_filterInputAttributes);

var _inputJsx = require('./input.jsx');
var _input = require('./input');

var _inputJsx2 = _interopRequireDefault(_inputJsx);
var _input2 = _interopRequireDefault(_input);

var _suggestListJsx = require('./suggest-list.jsx');
var _suggestList = require('./suggest-list');

var _suggestListJsx2 = _interopRequireDefault(_suggestListJsx);
var _suggestList2 = _interopRequireDefault(_suggestList);

// Escapes special characters in user input for regex
function escapeRegExp(str) {
Expand Down Expand Up @@ -439,7 +439,7 @@ var Geosuggest = (function (_React$Component) {
return _react2['default'].createElement(
'div',
{ className: classes },
_react2['default'].createElement(_inputJsx2['default'], _extends({ className: this.props.inputClassName,
_react2['default'].createElement(_input2['default'], _extends({ className: this.props.inputClassName,
value: this.state.userInput,
onChange: this.onInputChange.bind(this),
onFocus: this.onInputFocus.bind(this),
Expand All @@ -455,7 +455,7 @@ var Geosuggest = (function (_React$Component) {
},
onEscape: this.hideSuggests.bind(this)
}, attributes)),
_react2['default'].createElement(_suggestListJsx2['default'], {
_react2['default'].createElement(_suggestList2['default'], {
isHidden: this.state.isSuggestsHidden,
suggests: this.state.suggests,
activeSuggest: this.state.activeSuggest,
Expand All @@ -478,7 +478,7 @@ Geosuggest.defaultProps = _defaults2['default'];
exports['default'] = Geosuggest;
module.exports = exports['default'];

},{"./defaults":3,"./filter-input-attributes":4,"./input.jsx":5,"./suggest-list.jsx":7,"classnames":1}],3:[function(require,module,exports){
},{"./defaults":3,"./filter-input-attributes":4,"./input":5,"./suggest-list":7,"classnames":1}],3:[function(require,module,exports){
/**
* Default values
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/react-geosuggest.min.js

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-geosuggest",
"version": "1.16.0",
"version": "1.16.1",
"description": "A React autosuggest for the Google Maps Places API.",
"main": "module/Geosuggest.js",
"author": "Robert Katzki <katzki@ubilabs.net>",
Expand All @@ -23,21 +23,25 @@
"browserify": "^11.0.0",
"browserify-global-shim": "^1.0.0",
"bumpery": "^1.1.1",
"chai": "^3.5.0",
"classnames": "^2.2.3",
"conventional-changelog-generator": "0.0.3",
"eslint": "^1.5.1",
"eslint-plugin-react": "^3.16.1",
"gh-pages": "^0.9.0",
"light-server": "^1.0.3",
"mocha": "^2.4.5",
"react": "^0.14.0",
"react-dom": "^0.14.0",
"uglifyjs": "^2.4.10"
},
"scripts": {
"prepublish": "npm run build:module",
"lint": "eslint ./src/*.jsx ./example/src",
"test": "npm run lint",
"pretest": "npm run lint",
"test": "npm run unit-test",
"start": "npm run server",
"unit-test": "mocha ./test --recursive",
"server": "npm run prepare:example && light-server -s example/dist -p 8000 -w 'src/*.jsx,example/src/*.js # npm run js:example' -w 'src/*.css,example/src/*.css # npm run css # reloadcss' -w 'example/src/*.html # npm run copy:assets # reload'",
"prepare:example": "rm -rf example/dist && mkdir example/dist && npm run copy:assets && npm run js:example && npm run css",
"copy:assets": "cp example/src/*.html example/dist && cp example/src/*.svg example/dist",
Expand Down
6 changes: 3 additions & 3 deletions src/Geosuggest.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import classnames from 'classnames';
import defaults from './defaults';
import filterInputAttributes from './filter-input-attributes';

import Input from './input.jsx';
import SuggestList from './suggest-list.jsx';
import Input from './input';
import SuggestList from './suggest-list';

// Escapes special characters in user input for regex
function escapeRegExp(str) {
Expand Down Expand Up @@ -155,7 +155,7 @@ class Geosuggest extends React.Component {
this.autocompleteService.getPlacePredictions(
options,
suggestsGoogle => {
this.updateSuggests(suggestsGoogle);
this.updateSuggests(suggestsGoogle || []); // can be null

if (this.props.autoActivateFirstSuggest) {
this.activateSuggest('next');
Expand Down
22 changes: 22 additions & 0 deletions test/build.tests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const expect = require('chai').expect;

const childProcess = require('child_process');
const path = require('path');
const package = require('../package.json');

describe('The module build', function () {
it('creates an importable module', function(done) {
this.timeout(60000);

const rootDir = path.resolve(__dirname, '..');
childProcess
.exec('npm run build:module', { cwd: rootDir })
.on('exit', function (exitCode) {
expect(exitCode).to.equal(0);

const ctor = require(path.resolve(rootDir, package.main));
expect(ctor).to.be.a('function');
done();
});
});
});

0 comments on commit 364fdee

Please sign in to comment.