Skip to content

Commit

Permalink
Merge pull request #1 from mstock/feature/dependency-updates-and-rela…
Browse files Browse the repository at this point in the history
…ted-fixes

Update some dependencies and fix related issues
  • Loading branch information
datendelphin authored Aug 15, 2023
2 parents 44ef8a2 + 0fc69fe commit e81ad70
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 22 deletions.
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"test": "eslint src/*.js i18n/*.js",
"replace": "node ./scripts/replace.js",
"compile": "browserify -d src/index.js -s osrm > bundle.raw.js && uglifyjs bundle.raw.js -c -m --source-map=bundle.js.map -o bundle.js",
"compile": "browserify -d src/index.js -s osrm > bundle.raw.js && uglifyjs bundle.raw.js -c -m --source-map filename=bundle.js.map -o bundle.js",
"build": "npm run replace && npm run compile && cp node_modules/leaflet/dist/leaflet.css css/leaflet.css",
"start-index": "budo src/index.js --serve=bundle.js --live -d | bistre",
"start": "npm run build && npm run start-index",
Expand All @@ -27,20 +27,20 @@
"license": "ISC",
"devDependencies": {
"bistre": "^1.0.1",
"browserify": "^14.3.0",
"budo": "^9.4.0",
"uglify-js": "^2.8.0"
"browserify": "^17.0.0",
"budo": "^11.8.4",
"uglify-js": "^3.17.4"
},
"dependencies": {
"@mapbox/corslite": "0.0.7",
"file-saver": "^1.3.8",
"file-saver": "^2.0.5",
"jsonp": "^0.2.0",
"jxon": "^2.0.0-beta.5",
"leaflet": "~0.7.7",
"leaflet-control-geocoder": "~1.2.1",
"leaflet": "~1.9.4",
"leaflet-control-geocoder": "~2.4.0",
"leaflet-routing-machine": "git+https://github.com/sosm/leaflet-routing-machine#8e4b8b5f1f5932b63f36c49b198e9a5a4ba735ce",
"leaflet.locatecontrol": "~0.44.0",
"local-storage": "^1.4.2",
"leaflet.locatecontrol": "~0.79.0",
"local-storage": "^2.0.0",
"osrm-text-instructions": "~0.11.0",
"qs": "^6.1.0"
}
Expand Down
10 changes: 4 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var mergedOptions = L.extend(leafletOptions.defaultState, parsedOptions);
var local = localization.get(mergedOptions.language);

// load only after language was chosen
var itineraryBuilder = require('./itinerary_builder')(mergedOptions.language);
var ItineraryBuilder = require('./itinerary_builder')(mergedOptions.language);

var mapLayer = leafletOptions.layer;
var overlay = leafletOptions.overlay;
Expand Down Expand Up @@ -92,9 +92,8 @@ function makeIcon(i, n) {
});
}
}

var plan = new ReversablePlan([], {
geocoder: Geocoder.nominatim(),
geocoder: L.Control.Geocoder.nominatim(),
routeWhileDragging: true,
createMarker: function(i, wp, n) {
var options = {
Expand Down Expand Up @@ -129,8 +128,6 @@ var plan = new ReversablePlan([], {
}
});

L.extend(L.Routing, itineraryBuilder);

// add marker labels
var controlOptions = {
plan: plan,
Expand All @@ -149,7 +146,8 @@ var controlOptions = {
services: leafletOptions.services,
useZoomParameter: options.lrm.useZoomParameter,
routeDragInterval: options.lrm.routeDragInterval,
collapsible: options.lrm.collapsible
collapsible: options.lrm.collapsible,
itineraryBuilder: new ItineraryBuilder(),
};
// translate profile names
for (var profile = 0, len = controlOptions.services.length; profile < len; profile++)
Expand Down
8 changes: 2 additions & 6 deletions src/itinerary_builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,7 @@ module.exports = function (language) {
});
}

L.Routing = L.Routing || {};

L.Routing.ItineraryBuilder = L.Class.extend({
return L.Class.extend({
options: {
containerClassName: ''
},
Expand Down Expand Up @@ -159,6 +157,4 @@ module.exports = function (language) {
return row;
}
});

return L.Routing;
}
};
2 changes: 1 addition & 1 deletion src/shortlink.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var corslite = require('corslite');
var corslite = require('@mapbox/corslite');

module.exports = {
osmli: function(url, callback) {
Expand Down

0 comments on commit e81ad70

Please sign in to comment.