Skip to content

Commit 88dd22c

Browse files
mournerperliedman
authored andcommitted
upgrade deps, fix indenting (Leaflet#5743)
1 parent 4e8b30a commit 88dd22c

23 files changed

+81
-79
lines changed

build/rollup-config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const banner = `/* @preserve
2828

2929
export default {
3030
format: 'umd',
31-
moduleName: 'L',
31+
name: 'L',
3232
banner: banner,
3333
entry: 'src/Leaflet.js',
3434
dest: 'dist/leaflet-src.js',

build/rollup-watch-config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const banner = `
2222

2323
export default {
2424
format: 'umd',
25-
moduleName: 'L',
25+
name: 'L',
2626
banner,
2727
entry: 'src/Leaflet.js',
2828
dest: 'dist/leaflet-src.js',

package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.2.0",
44
"description": "JavaScript library for mobile-friendly interactive maps",
55
"devDependencies": {
6-
"eslint": "^3.5.0 <3.6.0",
6+
"eslint": "^4.5.0",
77
"eslint-config-mourner": "^2.0.1",
88
"git-rev-sync": "^1.8.0",
99
"happen": "~0.3.1",
@@ -14,13 +14,13 @@
1414
"karma-firefox-launcher": "~1.0.0",
1515
"karma-mocha": "^1.2.0",
1616
"karma-phantomjs-launcher": "^1.0.2",
17-
"karma-rollup-preprocessor": "^4.0.1",
17+
"karma-rollup-preprocessor": "^5.0.1",
1818
"karma-safari-launcher": "~1.0.0",
1919
"leafdoc": "^1.4.1",
2020
"mocha": "^3.1.0",
2121
"phantomjs-prebuilt": "^2.1.12",
2222
"prosthetic-hand": "^1.3.1",
23-
"rollup": "^0.45.2",
23+
"rollup": "^0.49.2",
2424
"rollup-plugin-git-version": "0.2.1",
2525
"rollup-plugin-json": "^2.1.0",
2626
"rollup-watch": "^4.3.1",
@@ -76,7 +76,8 @@
7676
2,
7777
"tab",
7878
{
79-
"VariableDeclarator": 0
79+
"VariableDeclarator": 0,
80+
"flatTernaryExpressions": true
8081
}
8182
],
8283
"curly": 2,

spec/karma.conf.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ module.exports = function (config) {
5252
json()
5353
],
5454
format: 'umd',
55-
moduleName: 'L'
55+
name: 'L'
5656
},
5757

5858
// test results reporter to use

spec/suites/dom/DomEventSpec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ describe('DomEvent', function () {
55
if (document.createEvent) {
66
var e = document.createEvent('MouseEvents');
77
e.initMouseEvent('click', true, true, window,
8-
0, 0, 0, 0, 0, false, false, false, false, 0, null);
8+
0, 0, 0, 0, 0, false, false, false, false, 0, null);
99
return el.dispatchEvent(e);
1010
} else if (el.fireEvent) {
1111
return el.fireEvent('onclick');

spec/suites/geo/ProjectionSpec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ describe("Projection.SphericalMercator", function () {
6868

6969
// from https://github.com/Leaflet/Leaflet/issues/1578
7070
expect(p.project(new L.LatLng(51.9371170300465, 80.11230468750001)))
71-
.near(new L.Point(8918060.96409, 6788763.38325));
71+
.near(new L.Point(8918060.96409, 6788763.38325));
7272
});
7373
});
7474

spec/suites/layer/tile/GridLayerSpec.js

+16-16
Original file line numberDiff line numberDiff line change
@@ -341,12 +341,12 @@ describe('GridLayer', function () {
341341
};
342342

343343
grid.on('tileload tileunload tileerror tileloadstart', function (ev) {
344-
// console.log(ev.type);
344+
// console.log(ev.type);
345345
counts[ev.type]++;
346346
});
347-
// grid.on('tileunload', function (ev) {
348-
// console.log(ev.type, ev.coords, counts);
349-
// });
347+
// grid.on('tileunload', function (ev) {
348+
// console.log(ev.type, ev.coords, counts);
349+
// });
350350

351351
map.options.fadeAnimation = false;
352352
map.options.zoomAnimation = false;
@@ -545,15 +545,15 @@ describe('GridLayer', function () {
545545
// browsers due to CSS animations!
546546
it.skipInPhantom("Loads 32, unloads 16 tiles zooming in 10-11", function (done) {
547547

548-
// grid.on('tileload tileunload tileloadstart load', logTiles);
548+
// grid.on('tileload tileunload tileloadstart load', logTiles);
549549

550550
grid.on('load', function () {
551551
expect(counts.tileloadstart).to.be(16);
552552
expect(counts.tileload).to.be(16);
553553
expect(counts.tileunload).to.be(0);
554554
grid.off('load');
555555

556-
// grid.on('load', logTiles);
556+
// grid.on('load', logTiles);
557557
grid.on('load', function () {
558558

559559
// We're one frame into the zoom animation, there are
@@ -618,19 +618,19 @@ describe('GridLayer', function () {
618618
// browsers due to CSS animations!
619619
it.skipInPhantom("Loads 32, unloads 16 tiles zooming out 11-10", function (done) {
620620

621-
// grid.on('tileload tileunload load', logTiles);
621+
// grid.on('tileload tileunload load', logTiles);
622622

623623
grid.on('load', function () {
624624
expect(counts.tileloadstart).to.be(16);
625625
expect(counts.tileload).to.be(16);
626626
expect(counts.tileunload).to.be(0);
627627
grid.off('load');
628628

629-
// grid.on('load', logTiles);
629+
// grid.on('load', logTiles);
630630
grid.on('load', function () {
631631

632632
grid.off('load');
633-
// grid.on('load', logTiles);
633+
// grid.on('load', logTiles);
634634

635635
// We're one frame into the zoom animation, there are
636636
// 16 tiles for z11 plus 4 tiles for z10 covering the
@@ -717,9 +717,9 @@ describe('GridLayer', function () {
717717

718718
map.flyTo(trd, 12, {animate: true});
719719

720-
// map.on('_frame', function () {
721-
// console.log('frame', counts);
722-
// });
720+
// map.on('_frame', function () {
721+
// console.log('frame', counts);
722+
// });
723723

724724
runFrames(500);
725725
});
@@ -756,12 +756,12 @@ describe('GridLayer', function () {
756756
};
757757

758758
grid.on('tileload tileunload tileerror tileloadstart', function (ev) {
759-
// console.log(ev.type);
759+
// console.log(ev.type);
760760
counts[ev.type]++;
761761
});
762-
// grid.on('tileunload', function (ev) {
763-
// console.log(ev.type, ev.coords, counts);
764-
// });
762+
// grid.on('tileunload', function (ev) {
763+
// console.log(ev.type, ev.coords, counts);
764+
// });
765765

766766
map.options.fadeAnimation = false;
767767
map.options.zoomAnimation = false;

spec/suites/layer/tile/TileLayerSpec.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,12 @@ describe('TileLayer', function () {
214214
};
215215

216216
kittenLayer.on('tileload tileunload tileerror tileloadstart', function (ev) {
217-
// console.log(ev.type);
217+
// console.log(ev.type);
218218
counts[ev.type]++;
219219
});
220-
// grid.on('tileunload', function (ev) {
221-
// console.log(ev.type, ev.coords, counts);
222-
// });
220+
// grid.on('tileunload', function (ev) {
221+
// console.log(ev.type, ev.coords, counts);
222+
// });
223223

224224
map.options.fadeAnimation = false;
225225
map.options.zoomAnimation = false;
@@ -274,9 +274,9 @@ describe('TileLayer', function () {
274274

275275
map.flyTo(trd, 12, {animate: true});
276276

277-
// map.on('_frame', function () {
278-
// console.log('frame', counts);
279-
// });
277+
// map.on('_frame', function () {
278+
// console.log('frame', counts);
279+
// });
280280

281281
runFrames(500);
282282
});

spec/suites/layer/vector/PolylineGeometrySpec.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ describe('PolylineGeometry', function () {
1111
var p1 = map.latLngToLayerPoint(new L.LatLng(55.8, 37.6));
1212
var p2 = map.latLngToLayerPoint(new L.LatLng(57.123076977278, 44.861962891635));
1313
var latlngs = [[56.485503424111, 35.545556640339], [55.972522915346, 36.116845702918], [55.502459116923, 34.930322265253], [55.31534617509, 38.973291015816]]
14-
.map(function (ll) {
15-
return new L.LatLng(ll[0], ll[1]);
16-
});
14+
.map(function (ll) {
15+
return new L.LatLng(ll[0], ll[1]);
16+
});
1717
var polyline = new L.Polyline([], {
1818
'noClip': true
1919
});

spec/suites/map/MapSpec.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ describe("Map", function () {
193193
var container = map.getContainer();
194194
container.style.height = height;
195195
document.body.appendChild(container);
196-
// L.Browser.any3d = true; // L.Browser is frozen since ES6ication
196+
// L.Browser.any3d = true; // L.Browser is frozen since ES6ication
197197
map.options.zoomSnap = 0.5;
198198
expect(map.getBoundsZoom(bounds, false, padding)).to.be.equal(19.5);
199199
map.options.zoomSnap = 0.2;
@@ -787,7 +787,7 @@ describe("Map", function () {
787787
});
788788

789789
it.skipInNonPhantom('zoomIn ignores the zoomDelta option on non-any3d browsers', function (done) {
790-
// L.Browser.any3d = false; // L.Browser is frozen since ES6ication
790+
L.Browser.any3d = false;
791791
map.options.zoomSnap = 0.25;
792792
map.options.zoomDelta = 0.25;
793793
map.once('zoomend', function () {
@@ -799,7 +799,7 @@ describe("Map", function () {
799799
});
800800

801801
it.skipInPhantom('zoomIn respects the zoomDelta option on any3d browsers', function (done) {
802-
// L.Browser.any3d = true; // L.Browser is frozen since ES6ication
802+
L.Browser.any3d = true;
803803
map.options.zoomSnap = 0.25;
804804
map.options.zoomDelta = 0.25;
805805
map.setView(center, 10);
@@ -812,7 +812,7 @@ describe("Map", function () {
812812
});
813813

814814
it.skipInPhantom('zoomOut respects the zoomDelta option on any3d browsers', function (done) {
815-
// L.Browser.any3d = true; // L.Browser is frozen since ES6ication
815+
L.Browser.any3d = true;
816816
map.options.zoomSnap = 0.25;
817817
map.options.zoomDelta = 0.25;
818818
map.setView(center, 10);
@@ -832,7 +832,7 @@ describe("Map", function () {
832832
expect(map.getCenter()).to.eql(center);
833833
done();
834834
});
835-
// L.Browser.any3d = true; // L.Browser is frozen since ES6ication
835+
L.Browser.any3d = true;
836836
map.zoomIn(0.22, {animate: false});
837837
});
838838

@@ -844,7 +844,7 @@ describe("Map", function () {
844844
expect(map.getCenter()).to.eql(center);
845845
done();
846846
});
847-
// L.Browser.any3d = true; // L.Browser is frozen since ES6ication
847+
L.Browser.any3d = true;
848848
map.zoomOut(0.22, {animate: false});
849849
});
850850
});
@@ -888,7 +888,7 @@ describe("Map", function () {
888888

889889
it.skipInPhantom('Snaps zoom to zoomSnap on any3d browsers', function (done) {
890890
map.options.zoomSnap = 0.25;
891-
// L.Browser.any3d = true; // L.Browser is frozen since ES6ication
891+
L.Browser.any3d = true;
892892
map.once('zoomend', function () {
893893
expect(map.getZoom()).to.eql(2.75);
894894
expect(map.getCenter().equals(boundsCenter, 0.05)).to.eql(true);
@@ -899,7 +899,7 @@ describe("Map", function () {
899899

900900
it.skipInNonPhantom('Ignores zoomSnap on non-any3d browsers', function (done) {
901901
map.options.zoomSnap = 0.25;
902-
// L.Browser.any3d = false; // L.Browser is frozen since ES6ication
902+
L.Browser.any3d = false;
903903
map.once('zoomend', function () {
904904
expect(map.getZoom()).to.eql(2);
905905
expect(map.getCenter().equals(boundsCenter, 0.05)).to.eql(true);

spec/suites/map/handler/Map.KeyboardSpec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ describe("Map.Keyboard", function () {
141141
expect(popup.isOpen()).to.be(true);
142142

143143
happen.keydown(document, {keyCode: 27}); // 27 = Esc
144-
// happen.keypress(document, {keyCode: 27});
144+
// happen.keypress(document, {keyCode: 27});
145145
happen.keyup(document, {keyCode: 27});
146146

147147
expect(popup.isOpen()).to.be(false);

src/control/Control.Scale.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ export var Scale = Control.extend({
6969
y = map.getSize().y / 2;
7070

7171
var maxMeters = map.distance(
72-
map.containerPointToLatLng([0, y]),
73-
map.containerPointToLatLng([this.options.maxWidth, y]));
72+
map.containerPointToLatLng([0, y]),
73+
map.containerPointToLatLng([this.options.maxWidth, y]));
7474

7575
this._updateScales(maxMeters);
7676
},

src/core/Util.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export function getParamString(obj, existingUrl, uppercase) {
155155
return ((!existingUrl || existingUrl.indexOf('?') === -1) ? '?' : '&') + params.join('&');
156156
}
157157

158-
var templateRe = /\{ *([\w_\-]+) *\}/g;
158+
var templateRe = /\{ *([\w_-]+) *\}/g;
159159

160160
// @function template(str: String, data: Object): String
161161
// Simple templating facility, accepts a template string of the form `'Hello {a}, {b}'`

src/dom/DomEvent.DoubleTap.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import {_pointersCount} from './DomEvent.Pointer';
55
* Extends the event handling code with double tap support for mobile browsers.
66
*/
77

8-
var _touchstart = Browser.msPointer ? 'MSPointerDown' : Browser.pointer ? 'pointerdown' : 'touchstart',
9-
_touchend = Browser.msPointer ? 'MSPointerUp' : Browser.pointer ? 'pointerup' : 'touchend',
10-
_pre = '_leaflet_';
8+
var _touchstart = Browser.msPointer ? 'MSPointerDown' : Browser.pointer ? 'pointerdown' : 'touchstart';
9+
var _touchend = Browser.msPointer ? 'MSPointerUp' : Browser.pointer ? 'pointerup' : 'touchend';
10+
var _pre = '_leaflet_';
1111

1212
// inspired by Zepto touch code by Thomas Fuchs
1313
export function addDoubleTapListener(obj, handler, id) {

src/dom/DomEvent.Pointer.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import * as Browser from '../core/Browser';
77
*/
88

99

10-
var POINTER_DOWN = Browser.msPointer ? 'MSPointerDown' : 'pointerdown',
11-
POINTER_MOVE = Browser.msPointer ? 'MSPointerMove' : 'pointermove',
12-
POINTER_UP = Browser.msPointer ? 'MSPointerUp' : 'pointerup',
13-
POINTER_CANCEL = Browser.msPointer ? 'MSPointerCancel' : 'pointercancel',
14-
TAG_WHITE_LIST = ['INPUT', 'SELECT', 'OPTION'],
15-
16-
_pointers = {},
17-
_pointerDocListener = false;
10+
var POINTER_DOWN = Browser.msPointer ? 'MSPointerDown' : 'pointerdown';
11+
var POINTER_MOVE = Browser.msPointer ? 'MSPointerMove' : 'pointermove';
12+
var POINTER_UP = Browser.msPointer ? 'MSPointerUp' : 'pointerup';
13+
var POINTER_CANCEL = Browser.msPointer ? 'MSPointerCancel' : 'pointercancel';
14+
var TAG_WHITE_LIST = ['INPUT', 'SELECT', 'OPTION'];
15+
16+
var _pointers = {};
17+
var _pointerDocListener = false;
1818

1919
// DomEvent.DoubleTap needs to know about this
2020
export var _pointersCount = 0;

src/geo/projection/Projection.SphericalMercator.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ export var SphericalMercator = {
2323
sin = Math.sin(lat * d);
2424

2525
return new Point(
26-
this.R * latlng.lng * d,
27-
this.R * Math.log((1 + sin) / (1 - sin)) / 2);
26+
this.R * latlng.lng * d,
27+
this.R * Math.log((1 + sin) / (1 - sin)) / 2);
2828
},
2929

3030
unproject: function (point) {

src/layer/GeoJSON.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ export function coordsToLatLngs(coords, levelsDeep, _coordsToLatLng) {
231231

232232
for (var i = 0, len = coords.length, latlng; i < len; i++) {
233233
latlng = levelsDeep ?
234-
coordsToLatLngs(coords[i], levelsDeep - 1, _coordsToLatLng) :
235-
(_coordsToLatLng || coordsToLatLng)(coords[i]);
234+
coordsToLatLngs(coords[i], levelsDeep - 1, _coordsToLatLng) :
235+
(_coordsToLatLng || coordsToLatLng)(coords[i]);
236236

237237
latlngs.push(latlng);
238238
}
@@ -245,8 +245,8 @@ export function coordsToLatLngs(coords, levelsDeep, _coordsToLatLng) {
245245
export function latLngToCoords(latlng, precision) {
246246
precision = typeof precision === 'number' ? precision : 6;
247247
return latlng.alt !== undefined ?
248-
[Util.formatNum(latlng.lng, precision), Util.formatNum(latlng.lat, precision), Util.formatNum(latlng.alt, precision)] :
249-
[Util.formatNum(latlng.lng, precision), Util.formatNum(latlng.lat, precision)];
248+
[Util.formatNum(latlng.lng, precision), Util.formatNum(latlng.lat, precision), Util.formatNum(latlng.alt, precision)] :
249+
[Util.formatNum(latlng.lng, precision), Util.formatNum(latlng.lat, precision)];
250250
}
251251

252252
// @function latLngsToCoords(latlngs: Array, levelsDeep?: Number, closed?: Boolean): Array
@@ -270,8 +270,8 @@ export function latLngsToCoords(latlngs, levelsDeep, closed, precision) {
270270

271271
export function getFeature(layer, newGeometry) {
272272
return layer.feature ?
273-
Util.extend({}, layer.feature, {geometry: newGeometry}) :
274-
asFeature(newGeometry);
273+
Util.extend({}, layer.feature, {geometry: newGeometry}) :
274+
asFeature(newGeometry);
275275
}
276276

277277
// @function asFeature(geojson: Object): Object

0 commit comments

Comments
 (0)