Stop using legacy URL api
This commit is contained in:
parent
575fe8e350
commit
3bc3d19f40
@ -3,7 +3,7 @@
|
||||
var assert = require('../../support/assert');
|
||||
var step = require('step');
|
||||
|
||||
var url = require('url');
|
||||
const { URL } = require('url');
|
||||
var queue = require('queue-async');
|
||||
|
||||
var helper = require('../../support/test-helper');
|
||||
@ -189,7 +189,7 @@ describe('named-maps widgets', function () {
|
||||
var widgetsPaths = layergroup.metadata.layers.reduce(function (paths, layer) {
|
||||
var widgets = layer.widgets || {};
|
||||
Object.keys(widgets).forEach(function (widget) {
|
||||
paths.push(url.parse(widgets[widget].url.http).path);
|
||||
paths.push(new URL(widgets[widget].url.http).pathname);
|
||||
});
|
||||
|
||||
return paths;
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
var qs = require('querystring');
|
||||
var step = require('step');
|
||||
var urlParser = require('url');
|
||||
const { URL } = require('url');
|
||||
var PSQL = require('cartodb-psql');
|
||||
var _ = require('underscore');
|
||||
var mapnik = require('windshaft').mapnik;
|
||||
@ -1170,7 +1170,7 @@ TestClient.prototype.getNodeStatus = function (nodeName, callback) {
|
||||
self.keysToDelete['map_cfg|' + LayergroupToken.parse(layergroupId).token] = 0;
|
||||
self.keysToDelete['user:localhost:mapviews:global'] = 5;
|
||||
|
||||
url = urlParser.parse(nodes[nodeName]).path;
|
||||
url = new URL(nodes[nodeName]).pathname;
|
||||
|
||||
if (self.apiKey) {
|
||||
url += '?' + qs.stringify({ api_key: self.apiKey });
|
||||
|
Loading…
Reference in New Issue
Block a user