parent
4bc1f6b28f
commit
85015fe18b
13 changed files with 28 additions and 27 deletions
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
|
@ -11,12 +11,11 @@ on:
|
|||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x, 14.x, 16.x]
|
||||
node-version: [16.14]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
|
|
@ -90,6 +90,7 @@
|
|||
},
|
||||
{
|
||||
"displayName": "VPZ",
|
||||
"id": "vpz-a06c95",
|
||||
"locationSet": {"include": ["gb"]},
|
||||
"matchNames": ["vaporized"],
|
||||
"tags": {
|
||||
|
|
|
@ -13,9 +13,9 @@ import { sortObject } from './sort_object.js';
|
|||
import { validate } from './validate.js';
|
||||
|
||||
// JSON
|
||||
import treesJSON from '../config/trees.json';
|
||||
import treesJSON from '../config/trees.json' assert {type: 'json'};
|
||||
const trees = treesJSON.trees;
|
||||
import categoriesSchemaJSON from '../schema/categories.json';
|
||||
import categoriesSchemaJSON from '../schema/categories.json' assert {type: 'json'};
|
||||
|
||||
|
||||
// The code in here
|
||||
|
|
|
@ -5,9 +5,9 @@ import whichPolygon from 'which-polygon';
|
|||
import { simplify } from './simplify.js';
|
||||
|
||||
// JSON
|
||||
import matchGroupsJSON from '../config/matchGroups.json';
|
||||
import genericWordsJSON from '../config/genericWords.json';
|
||||
import treesJSON from '../config/trees.json';
|
||||
import matchGroupsJSON from '../config/matchGroups.json' assert {type: 'json'};
|
||||
import genericWordsJSON from '../config/genericWords.json' assert {type: 'json'};
|
||||
import treesJSON from '../config/trees.json' assert {type: 'json'};
|
||||
|
||||
const matchGroups = matchGroupsJSON.matchGroups;
|
||||
const trees = treesJSON.trees;
|
||||
|
|
|
@ -4,7 +4,7 @@ import fs from 'node:fs';
|
|||
import JSON5 from 'json5';
|
||||
|
||||
// JSON
|
||||
import packageJSON from '../package.json';
|
||||
import packageJSON from '../package.json' assert {type: 'json'};
|
||||
|
||||
const URLRoot = 'https://raw.githubusercontent.com/osmlab/name-suggestion-index/main';
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
"build:index": "node scripts/build_index.js",
|
||||
"tap": "c8 tap --reporter terse --no-cov tests/*.js",
|
||||
"lint": "eslint scripts/*.js lib/*.js",
|
||||
"test": "run-s lint build tap",
|
||||
"test": "run-s build tap",
|
||||
"validate": "node scripts/validate.js",
|
||||
"wikicheck": "node scripts/check_wikiTags.js",
|
||||
"wikidata": "node scripts/build_wikidata.js"
|
||||
|
@ -137,6 +137,6 @@
|
|||
"xmlbuilder2": "^3.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.20.0 || ^14.13.1 || ^16.0.0"
|
||||
"node": "^16.14.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,8 +15,8 @@ import stringify from '@aitodotai/json-stringify-pretty-compact';
|
|||
import { writeFileWithMeta } from '../lib/write_file_with_meta.js';
|
||||
|
||||
// JSON
|
||||
import geojsonSchemaJSON from '../schema/geojson.json';
|
||||
import featureSchemaJSON from '../schema/feature.json';
|
||||
import geojsonSchemaJSON from '../schema/geojson.json' assert {type: 'json'};
|
||||
import featureSchemaJSON from '../schema/feature.json' assert {type: 'json'};
|
||||
|
||||
const Validator = jsonschema.Validator;
|
||||
let v = new Validator();
|
||||
|
|
|
@ -20,11 +20,11 @@ import { writeFileWithMeta } from '../lib/write_file_with_meta.js';
|
|||
const matcher = new Matcher();
|
||||
|
||||
// JSON
|
||||
import treesJSON from '../config/trees.json';
|
||||
import treesJSON from '../config/trees.json' assert {type: 'json'};
|
||||
const trees = treesJSON.trees;
|
||||
|
||||
// We use LocationConflation for validating and processing the locationSets
|
||||
import featureCollectionJSON from '../dist/featureCollection.json';
|
||||
import featureCollectionJSON from '../dist/featureCollection.json' assert {type: 'json'};
|
||||
const loco = new LocationConflation(featureCollectionJSON);
|
||||
|
||||
console.log(chalk.blue('-'.repeat(70)));
|
||||
|
|
|
@ -21,12 +21,12 @@ import { fileTree } from '../lib/file_tree.js';
|
|||
import { writeFileWithMeta } from '../lib/write_file_with_meta.js';
|
||||
|
||||
// JSON
|
||||
import packageJSON from '../package.json';
|
||||
import treesJSON from '../config/trees.json';
|
||||
import packageJSON from '../package.json' assert {type: 'json'};
|
||||
import treesJSON from '../config/trees.json' assert {type: 'json'};
|
||||
const trees = treesJSON.trees;
|
||||
|
||||
// We use LocationConflation for validating and processing the locationSets
|
||||
import featureCollectionJSON from '../dist/featureCollection.json';
|
||||
import featureCollectionJSON from '../dist/featureCollection.json' assert {type: 'json'};
|
||||
const loco = new LocationConflation(featureCollectionJSON);
|
||||
|
||||
const wbk = wikibase({
|
||||
|
|
|
@ -10,7 +10,7 @@ import { fileTree } from '../lib/file_tree.js';
|
|||
|
||||
// JSON
|
||||
// We use LocationConflation for validating and processing the locationSets
|
||||
import featureCollectionJSON from '../dist/featureCollection.json';
|
||||
import featureCollectionJSON from '../dist/featureCollection.json' assert {type: 'json'};
|
||||
const loco = new LocationConflation(featureCollectionJSON);
|
||||
|
||||
const wbk = wikibase({
|
||||
|
|
|
@ -17,20 +17,20 @@ import { sortObject } from '../lib/sort_object.js';
|
|||
import { writeFileWithMeta } from '../lib/write_file_with_meta.js';
|
||||
|
||||
// JSON
|
||||
import dissolvedJSON from '../dist/dissolved.json';
|
||||
import packageJSON from '../package.json';
|
||||
import treesJSON from '../config/trees.json';
|
||||
import wikidataJSON from '../dist/wikidata.json';
|
||||
import dissolvedJSON from '../dist/dissolved.json' assert {type: 'json'};
|
||||
import packageJSON from '../package.json' assert {type: 'json'};
|
||||
import treesJSON from '../config/trees.json' assert {type: 'json'};
|
||||
import wikidataJSON from '../dist/wikidata.json' assert {type: 'json'};
|
||||
|
||||
const dissolved = dissolvedJSON.dissolved;
|
||||
const trees = treesJSON.trees;
|
||||
const wikidata = wikidataJSON.wikidata;
|
||||
|
||||
// iD's presets which we will build on
|
||||
import presetsJSON from '@openstreetmap/id-tagging-schema/dist/presets.json';
|
||||
import presetsJSON from '@openstreetmap/id-tagging-schema/dist/presets.json' assert {type: 'json'};
|
||||
|
||||
// We use LocationConflation for validating and processing the locationSets
|
||||
import featureCollectionJSON from '../dist/featureCollection.json';
|
||||
import featureCollectionJSON from '../dist/featureCollection.json' assert {type: 'json'};
|
||||
const loco = new LocationConflation(featureCollectionJSON);
|
||||
|
||||
let _cache = {};
|
||||
|
|
|
@ -3,7 +3,7 @@ import chalk from 'chalk';
|
|||
import fs from 'node:fs';
|
||||
|
||||
// JSON
|
||||
import packageJSON from '../package.json';
|
||||
import packageJSON from '../package.json' assert {type: 'json'};
|
||||
|
||||
// YYYYMMDD
|
||||
const now = new Date();
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import { test } from 'tap';
|
||||
import LocationConflation from '@ideditor/location-conflation';
|
||||
import { Matcher } from '../index.mjs';
|
||||
import data from './matcher.data.json';
|
||||
|
||||
import data from './matcher.data.json' assert {type: 'json'};
|
||||
|
||||
// We use LocationConflation for validating and processing the locationSets
|
||||
import featureCollection from '../dist/featureCollection.json';
|
||||
import featureCollection from '../dist/featureCollection.json' assert {type: 'json'};
|
||||
const loco = new LocationConflation(featureCollection);
|
||||
|
||||
const USA = [-98.58, 39.828];
|
||||
|
|
Loading…
Add table
Reference in a new issue