Skip to content

Commit 7c010c6

Browse files
chore(packages): Update all dependencies, which changes the external api
BREAKING CHANGE: focusLatLng renamed to focusPoint
1 parent a9a9c9f commit 7c010c6

4 files changed

Lines changed: 6182 additions & 15 deletions

File tree

example.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import {render} from 'react-dom'
33

44
import Geocoder from './index'
55

6-
import './node_modules/react-select/dist/react-select.css'
7-
86
const div = document.createElement('div')
97
document.body.appendChild(div)
108

index.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import {search as mapzenSearch} from 'isomorphic-mapzen-search'
2+
import throttle from 'lodash.throttle'
23
import React, {PropTypes} from 'react'
34
import {PureComponent, shallowEqual} from 'react-pure-render'
45
import Select from 'react-select'
5-
import throttle from 'throttleit'
66

77
class Geocoder extends PureComponent {
88
static propTypes = {
99
apiKey: PropTypes.string.isRequired,
1010
boundary: PropTypes.object,
1111
featureToLabel: PropTypes.func,
1212
featureToValue: PropTypes.func,
13-
focusLatlng: PropTypes.any,
13+
focusPoint: PropTypes.any,
1414
onChange: PropTypes.func,
1515
rateLimit: PropTypes.number,
1616
search: PropTypes.func,
@@ -63,10 +63,12 @@ class Geocoder extends PureComponent {
6363
}
6464

6565
loadOptions = (input) => {
66-
const {apiKey, focusLatlng, boundary, search} = this.props
67-
return search(apiKey, input, {
66+
const {apiKey, boundary, focusPoint, search} = this.props
67+
return search({
68+
apiKey,
6869
boundary,
69-
focusLatlng
70+
focusPoint,
71+
text: input
7072
}).then((geojson) => {
7173
const options = geojson && geojson.features
7274
? geojson.features.map(this.featureToOption)

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"npm": ">=3"
88
},
99
"scripts": {
10-
"prepublish": "mastarm prepublish index.js",
10+
"prepublish": "mastarm prepublish index.js:build/index.js",
1111
"test": "mastarm lint",
1212
"start": "mastarm build --serve example.js",
1313
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
@@ -28,18 +28,18 @@
2828
},
2929
"homepage": "https://github.com/conveyal/react-select-geocoder",
3030
"devDependencies": {
31-
"mastarm": "^0.10.0",
32-
"semantic-release": "^4.3.5"
31+
"mastarm": "^3.3.0",
32+
"semantic-release": "^6.3.2"
3333
},
3434
"dependencies": {
35-
"isomorphic-mapzen-search": "^0.0.4",
35+
"isomorphic-mapzen-search": "^1.0.0",
36+
"lodash.throttle": "^4.1.1",
3637
"react-pure-render": "^1.0.2",
37-
"react-select": "^1.0.0-rc.1",
38-
"throttleit": "^1.0.0"
38+
"react-select": "^1.0.0-rc.3"
3939
},
4040
"peerDependencies": {
41-
"react": "^15.3.1",
42-
"react-dom": "^15.3.1"
41+
"react": "^15.4.2",
42+
"react-dom": "^15.4.2"
4343
},
4444
"standard": {
4545
"parser": "babel-eslint"

0 commit comments

Comments
 (0)