naturalatlas / tilestrata

Compare 0eacf8c ... +0 ... a3362ec

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.


@@ -32,7 +32,7 @@
Loading
32 32
	};
33 33
34 34
	if (/format=json/.test(req.url)) {
35 -
		var buffer = new Buffer(JSON.stringify(data), 'utf8');
35 +
		var buffer = Buffer.from(JSON.stringify(data), 'utf8');
36 36
		res.writeHead(200, {'Content-Length': buffer.length, 'Content-Type': 'application/json; charset=utf-8'});
37 37
		res.write(buffer);
38 38
		res.end();
@@ -114,7 +114,7 @@
Loading
114 114
				html.push('</table>');
115 115
			});
116 116
117 -
			var buffer = new Buffer(html.join(''), 'utf8');
117 +
			var buffer = Buffer.from(html.join(''), 'utf8');
118 118
			res.writeHead(200, {'Content-Length': buffer.length, 'Content-Type': 'text/html; charset=utf-8'});
119 119
			res.write(buffer);
120 120
			res.end();

@@ -2,7 +2,7 @@
Loading
2 2
var async = require('async');
3 3
var log = require('npmlog');
4 4
var normalizeHeaders = require('./utils/normalize-headers.js');
5 -
var BUFFER_NOPROVIDER = new Buffer('No provider configured for layer', 'utf8');
5 +
var BUFFER_NOPROVIDER = Buffer.from('No provider configured for layer', 'utf8');
6 6
7 7
var TileRequestHandler = module.exports = function(options) {
8 8
	options = options || {};
@@ -223,7 +223,7 @@
Loading
223 223
			self.provider.plugin.serve(server, req, function(err, buffer, headers) {
224 224
				if (err) {
225 225
					__profile(err);
226 -
					return done(err.statusCode || 500, new Buffer(err.message || err, 'utf8'), {});
226 +
					return done(err.statusCode || 500, Buffer.from(err.message || err, 'utf8'), {});
227 227
				}
228 228
229 229
				renderedHeaders = headers || {};
@@ -249,7 +249,7 @@
Loading
249 249
					callback();
250 250
				});
251 251
			}, function(err) {
252 -
				if (err) return done(500, new Buffer(err.message || err, 'utf8'), {});
252 +
				if (err) return done(500, Buffer.from(err.message || err, 'utf8'), {});
253 253
				callback();
254 254
			});
255 255
		},

@@ -1,7 +1,7 @@
Loading
1 -
var BUFFER_ROBOTSTXT = new Buffer('User-agent: *\nDisallow: /\n', 'utf8');
1 +
var BUFFER_ROBOTSTXT = Buffer.from('User-agent: *\nDisallow: /\n', 'utf8');
2 2
3 3
module.exports = function(req, res, server) {
4 4
	res.writeHead(200, {'Content-Length': BUFFER_ROBOTSTXT.length, 'Content-Type': 'text/plain'});
5 5
	res.write(BUFFER_ROBOTSTXT);
6 6
	res.end();
7 -
};

@@ -18,8 +18,8 @@
Loading
18 18
19 19
var PROFILING_ENABLED = !process.env.TILESTRATA_NOPROFILE;
20 20
var HEADER_XPOWEREDBY = 'TileStrata/' + version;
21 -
var BUFFER_NOTFOUND = new Buffer('Not found', 'utf8');
22 -
var BUFFER_NOTIMPLEMENTED = new Buffer('Not implemented', 'utf8');
21 +
var BUFFER_NOTFOUND = Buffer.from('Not found', 'utf8');
22 +
var BUFFER_NOTIMPLEMENTED = Buffer.from('Not implemented', 'utf8');
23 23
24 24
log.heading = 'tilestrata';
25 25
log.prefixStyle = {fg: 'grey'}
@@ -249,13 +249,13 @@
Loading
249 249
			normalizeHeaders(result.headers, headerKeysBefore);
250 250
251 251
			// head request support
252 -
			if (req.method === 'HEAD') result.buffer = new Buffer([]);
252 +
			if (req.method === 'HEAD') result.buffer = Buffer.from('', 'utf8');
253 253
254 254
			callback();
255 255
		}
256 256
	], function(err) {
257 257
		if (err) {
258 -
			var buffer = new Buffer(String(err.message || err), 'utf8');
258 +
			var buffer = Buffer.from(String(err.message || err), 'utf8');
259 259
			log.error(null, 'Failed to serve ' + req.filename + ' for "' + req.layer + '" layer {x:' + req.x + ',y:' + req.y + ',z:' + req.z + '}');
260 260
			log.error(null, err);
261 261
			callback(500, buffer, {

@@ -40,7 +40,7 @@
Loading
40 40
			data.message = String(err.message || err);
41 41
		}
42 42
43 -
		var resbuffer = new Buffer(JSON.stringify(data), 'utf8');
43 +
		var resbuffer = Buffer.from(JSON.stringify(data), 'utf8');
44 44
		res.writeHead(status, {'Content-Length': resbuffer.length, 'Content-Type': 'application/json'});
45 45
		res.write(resbuffer);
46 46
		res.end();

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
lib 98.13%
index.js 87.18%
Project Totals (9 files) 97.54%
Loading