Convert to esm module syntax (#606)

* switch to esm module

* Update package.json

* change to maplibre package

* fix tests

* eslint

* remove extra package updates

* Delete package-lock.json

* change 'fs' to 'node:fs'

* put back node 10.

without the package updates this still works

* remove trailing commas

* remove unassociated fix / formatting

* remove unassociated fix

* remove eslint from this PR

* remove unassociated fix

* lint

* Merge remote-tracking branch 'upstream/master' into esm_update

* fix mlgl

* update maplibre-native to new version with arm64

* update minor version
This commit is contained in:
Andrew Calcutt
2022-09-28 14:41:55 -04:00
committed by GitHub
parent 7cfcc413c4
commit b2bd5eaa96
16 changed files with 412 additions and 401 deletions

View File

@@ -1,15 +1,15 @@
var testTile = function(prefix, z, x, y, format, status, scale, type) {
const testTile = function(prefix, z, x, y, format, status, scale, type) {
if (scale) y += '@' + scale + 'x';
var path = '/styles/' + prefix + '/' + z + '/' + x + '/' + y + '.' + format;
const path = '/styles/' + prefix + '/' + z + '/' + x + '/' + y + '.' + format;
it(path + ' returns ' + status, function(done) {
var test = supertest(app).get(path);
const test = supertest(app).get(path);
test.expect(status);
if (type) test.expect('Content-Type', type);
test.end(done);
});
};
var prefix = 'test-style';
const prefix = 'test-style';
describe('Raster tiles', function() {
describe('valid requests', function() {
@@ -41,6 +41,6 @@ describe('Raster tiles', function() {
testTile(prefix, 0, 0, 0, 'png', 404, 1);
testTile(prefix, 0, 0, 0, 'png', 404, 5);
//testTile('hybrid', 0, 0, 0, 'png', 404); //TODO: test this
// testTile('hybrid', 0, 0, 0, 'png', 404); //TODO: test this
});
});