Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswhong committed Nov 9, 2023
1 parent 0d06fdb commit 20d1386
Show file tree
Hide file tree
Showing 14 changed files with 6,328 additions and 2,999 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.nyc_output
geojsonhint.js
node_modules/
.tap/
8,526 changes: 5,925 additions & 2,601 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
"lib"
],
"dependencies": {
"@gerhobbelt/nomnom": "github:gerhobbelt/nomnom",
"concat-stream": "^1.6.1",
"jsonlint-lines": "1.7.1",
"jsonlint-lines": "^1.7.1",
"minimist": "^1.2.8",
"vfile": "^4.0.0",
"vfile-reporter": "^5.1.1"
Expand All @@ -27,7 +28,7 @@
"eslint": "^5.15.3",
"fuzzer": "~0.2.0",
"glob": "^7.1.2",
"tap": "^12.6.1"
"tap": "^18"
},
"directories": {
"test": "test"
Expand All @@ -43,7 +44,10 @@
"url": "git://github.com/mapbox/geojsonhint.git"
},
"scripts": {
"test": "eslint . && tap test/*.js --coverage",
"test": "eslint . && tap test/*.js --coverage-report=text",
"prepublish": "browserify . --standalone geojsonhint > geojsonhint.js"
},
"overrides": {
"underscore": "^1.13.0"
}
}
10 changes: 5 additions & 5 deletions test/data/bad/bad-duplicate-properties.cli-output-pretty
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
1:1 error "geometry" member required
1:1 error "properties" member required
1:1 error An object contained duplicate members, making parsing ambigous: type
1:1 error Feature object cannot contain a "features" member
1:1 error "geometry" member required
1:1 error "properties" member required
1:1 error An object contained duplicate members, making parsing ambigous: type
1:1 error Feature object cannot contain a "features" member

4 errors
✖ 4 errors
4 changes: 2 additions & 2 deletions test/data/bad/bad-featurelist.cli-output-pretty
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
3:1 error a number was found where a coordinate array should have been found: this needs to be nested more deeply
3:1 error a number was found where a coordinate array should have been found: this needs to be nested more deeply

1 error
✖ 1 error
4 changes: 2 additions & 2 deletions test/data/bad/bad-json.cli-output-pretty
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
1:1 error Parse error on line 2:
1:1 error Parse error on line 2:
...": "MultiPoint" "coordinates": [["fo
----------------------^
Expecting 'EOF', '}', ':', ',', ']', got 'STRING'

1 error
✖ 1 error
4 changes: 2 additions & 2 deletions test/data/bad/bad-object-type.cli-output-pretty
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
1:1 error "type" member should be string, but is an object instead
1:1 error "type" member should be string, but is an object instead

1 error
✖ 1 error
4 changes: 2 additions & 2 deletions test/data/bad/bad-polygon-interiorring-rhr.cli-output-pretty
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
1:1 warning Polygons and MultiPolygons should follow the right-hand rule
1:1 warning Polygons and MultiPolygons should follow the right-hand rule

1 warning
⚠ 1 warning
724 changes: 362 additions & 362 deletions test/data/bad/bad-polygonloop.cli-output-pretty

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions test/data/bad/bad-properties-as-array.cli-output-pretty
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
1:1 error "properties" member should be object, but is an Array instead
1:1 error "properties" member should be object, but is an Array instead

1 error
✖ 1 error
4 changes: 2 additions & 2 deletions test/data/bad/badcoord.cli-output-pretty
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
3:1 error each element in a position must be a number
3:1 error each element in a position must be a number

1 error
✖ 1 error
4 changes: 2 additions & 2 deletions test/data/bad/badcoordtype.cli-output-pretty
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
9:1 error a number was found where a coordinate array should have been found: this needs to be nested more deeply
9:1 error a number was found where a coordinate array should have been found: this needs to be nested more deeply

1 error
✖ 1 error
4 changes: 2 additions & 2 deletions test/data/bad/badfeature.cli-output-pretty
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
1:1 error Every feature must be an object
1:1 error Every feature must be an object

1 error
✖ 1 error
24 changes: 12 additions & 12 deletions test/hint.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ function filejs(x) {
test('geojsonhint', function(t) {
glob.sync('test/data/good/*.geojson').forEach(function(f) {
var gj = file(f);
t.deepEqual(geojsonhint.hint(gj), [], f);
t.same(geojsonhint.hint(gj), [], f);
});
t.deepEqual(geojsonhint.hint(undefined), [{
t.same(geojsonhint.hint(undefined), [{
message: 'Expected string or object as input',
line: 0
}], 'expected string input');
t.deepEqual(geojsonhint.hint('{}'), [{
t.same(geojsonhint.hint('{}'), [{
message: '"type" member required',
line: 1
}], 'just an object');
Expand All @@ -33,7 +33,7 @@ test('geojsonhint', function(t) {
if (process.env.UPDATE) {
fs.writeFileSync(f.replace('geojson', 'result'), JSON.stringify(geojsonhint.hint(gj), null, 2));
}
t.deepEqual(geojsonhint.hint(gj), filejs(f.replace('geojson', 'result')), f);
t.same(geojsonhint.hint(gj), filejs(f.replace('geojson', 'result')), f);
});
t.end();
});
Expand Down Expand Up @@ -94,18 +94,18 @@ test('geojsonhint', function(t) {
if (process.env.UPDATE) {
fs.writeFileSync(f.replace('geojson', 'result-object'), JSON.stringify(geojsonhint.hint(gj), null, 2));
}
t.deepEqual(geojsonhint.hint(gj), filejs(f.replace('geojson', 'result-object')), f);
t.same(geojsonhint.hint(gj), filejs(f.replace('geojson', 'result-object')), f);
});
t.end();
});
test('noDuplicateMembers option=false', function(t) {
t.deepEqual(geojsonhint.hint('{"type":"invalid","type":"Feature","properties":{},"geometry":null}', {
t.same(geojsonhint.hint('{"type":"invalid","type":"Feature","properties":{},"geometry":null}', {
noDuplicateMembers: false
}), [], 'sketchy object permitted');
t.end();
});
test('noDuplicateMembers option=true', function(t) {
t.deepEqual(geojsonhint.hint('{"type":"invalid","type":"Feature","properties":{},"geometry":null}', {
t.same(geojsonhint.hint('{"type":"invalid","type":"Feature","properties":{},"geometry":null}', {
noDuplicateMembers: true
}), [{
line: 1,
Expand All @@ -114,7 +114,7 @@ test('geojsonhint', function(t) {
t.end();
});
test('noDuplicateMembers option=true', function(t) {
t.deepEqual(geojsonhint.hint('{ "type": "Point", "coordinates": [100.0000000001, 5.0000000001] }', {
t.same(geojsonhint.hint('{ "type": "Point", "coordinates": [100.0000000001, 5.0000000001] }', {
precisionWarning: true
}), [{
line: 1,
Expand Down Expand Up @@ -148,7 +148,7 @@ test('geojsonhint', function(t) {
precisionWarning: true
})
t.equal(truncated.length, 11);
t.deepEqual(truncated[10], {
t.same(truncated[10], {
line: 63,
level: 'message',
message: 'truncated warnings: we\'ve encountered coordinate precision warning 10 times, '
Expand Down Expand Up @@ -190,15 +190,15 @@ test('geojsonhint', function(t) {
t.end();
});
test('invalid roots', function(t) {
t.deepEqual(geojsonhint.hint('null'), [{
t.same(geojsonhint.hint('null'), [{
message: 'The root of a GeoJSON object must be an object.',
line: 0
}], 'non-object root');
t.deepEqual(geojsonhint.hint('1'), [{
t.same(geojsonhint.hint('1'), [{
message: 'The root of a GeoJSON object must be an object.',
line: 0
}], 'number root');
t.deepEqual(geojsonhint.hint('"string"'), [{
t.same(geojsonhint.hint('"string"'), [{
message: 'The root of a GeoJSON object must be an object.',
line: 0
}], 'string root');
Expand Down

0 comments on commit 20d1386

Please sign in to comment.