Skip to content

Commit

Permalink
Upgrade several dependencies, bump minimum node version to 12
Browse files Browse the repository at this point in the history
- country-coder (closes #249)
- location-conflation (closes #248)
- osm-community-index (closes #250)
- name-suggestion-index
  • Loading branch information
bhousel committed Jun 25, 2021
1 parent 4f67355 commit 19552fc
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 16.x]
node-version: [12.x, 14.x, 16.x]

steps:
- uses: actions/checkout@v2
Expand Down
6 changes: 3 additions & 3 deletions modules/core/file_fetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ export function coreFileFetcher() {
'keepRight': 'data/keepRight.min.json',
'languages': 'data/languages.min.json',
'locales': 'locales/index.min.json',
'oci_defaults': 'https://cdn.jsdelivr.net/npm/osm-community-index@4/dist/defaults.min.json',
'oci_features': 'https://cdn.jsdelivr.net/npm/osm-community-index@4/dist/featureCollection.min.json',
'oci_resources': 'https://cdn.jsdelivr.net/npm/osm-community-index@4/dist/resources.min.json',
'oci_defaults': 'https://cdn.jsdelivr.net/npm/osm-community-index@5.0/dist/defaults.min.json',
'oci_features': 'https://cdn.jsdelivr.net/npm/osm-community-index@5.0/dist/featureCollection.min.json',
'oci_resources': 'https://cdn.jsdelivr.net/npm/osm-community-index@5.0/dist/resources.min.json',
'preset_categories': 'https://cdn.jsdelivr.net/npm/@openstreetmap/id-tagging-schema@3/dist/preset_categories.min.json',
'preset_defaults': 'https://cdn.jsdelivr.net/npm/@openstreetmap/id-tagging-schema@3/dist/preset_defaults.min.json',
'preset_fields': 'https://cdn.jsdelivr.net/npm/@openstreetmap/id-tagging-schema@3/dist/fields.min.json',
Expand Down
18 changes: 9 additions & 9 deletions modules/services/nsi.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { matcher as Matcher } from 'name-suggestion-index';
import { Matcher } from 'name-suggestion-index';

import { fileFetcher, locationManager } from '../core';
import { presetManager } from '../presets';
Expand Down Expand Up @@ -40,13 +40,13 @@ const notBranches = /(coop|express|wireless|factory|outlet)/i;
//
function setNsiSources() {
const sources = {
'nsi_data': 'https://cdn.jsdelivr.net/npm/name-suggestion-index@5.0/dist/nsi.min.json',
'nsi_dissolved': 'https://cdn.jsdelivr.net/npm/name-suggestion-index@5.0/dist/dissolved.min.json',
'nsi_features': 'https://cdn.jsdelivr.net/npm/name-suggestion-index@5.0/dist/featureCollection.min.json',
'nsi_generics': 'https://cdn.jsdelivr.net/npm/name-suggestion-index@5.0/dist/genericWords.min.json',
'nsi_presets': 'https://cdn.jsdelivr.net/npm/name-suggestion-index@5.0/dist/presets/nsi-id-presets.min.json',
'nsi_replacements': 'https://cdn.jsdelivr.net/npm/name-suggestion-index@5.0/dist/replacements.min.json',
'nsi_trees': 'https://cdn.jsdelivr.net/npm/name-suggestion-index@5.0/dist/trees.min.json'
'nsi_data': 'https://cdn.jsdelivr.net/npm/name-suggestion-index@6.0/dist/nsi.min.json',
'nsi_dissolved': 'https://cdn.jsdelivr.net/npm/name-suggestion-index@6.0/dist/dissolved.min.json',
'nsi_features': 'https://cdn.jsdelivr.net/npm/name-suggestion-index@6.0/dist/featureCollection.min.json',
'nsi_generics': 'https://cdn.jsdelivr.net/npm/name-suggestion-index@6.0/dist/genericWords.min.json',
'nsi_presets': 'https://cdn.jsdelivr.net/npm/name-suggestion-index@6.0/dist/presets/nsi-id-presets.min.json',
'nsi_replacements': 'https://cdn.jsdelivr.net/npm/name-suggestion-index@6.0/dist/replacements.min.json',
'nsi_trees': 'https://cdn.jsdelivr.net/npm/name-suggestion-index@6.0/dist/trees.min.json'
};

let fileMap = fileFetcher.fileMap();
Expand Down Expand Up @@ -101,7 +101,7 @@ function loadNsiData() {
ids: new Map() // Map (id -> NSI item)
};

_nsi.matcher = Matcher();
_nsi.matcher = new Matcher();
_nsi.matcher.buildMatchIndex(_nsi.data);
_nsi.matcher.buildLocationIndex(_nsi.data, locationManager.loco());

Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
},
"dependencies": {
"@id-sdk/math": "~3.0.0-pre.5",
"@ideditor/country-coder": "^4.1.0",
"@ideditor/location-conflation": "~0.9.0",
"@ideditor/country-coder": "~5.0.3",
"@ideditor/location-conflation": "~1.0.2",
"@mapbox/geojson-area": "^0.2.2",
"@mapbox/geojson-rewind": "^0.5.0",
"@mapbox/sexagesimal": "1.2.0",
Expand Down Expand Up @@ -107,11 +107,11 @@
"mapillary-js": "4.0.0",
"minimist": "^1.2.3",
"mocha": "^9.0.0",
"name-suggestion-index": "~5.0",
"name-suggestion-index": "~6.0",
"node-fetch": "^2.6.1",
"npm-run-all": "^4.0.0",
"object-inspect": "1.10.3",
"osm-community-index": "~4.0.2",
"osm-community-index": "~5.0.1",
"phantomjs-prebuilt": "~2.1.16",
"postcss": "^8.1.1",
"postcss-selector-prepend": "^0.5.0",
Expand All @@ -129,7 +129,7 @@
"uglify-js": "~3.13.0"
},
"engines": {
"node": ">=10"
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"browserslist": [
"> 0.2%, last 6 major versions, Firefox ESR, IE 11, maintained node versions"
Expand Down

0 comments on commit 19552fc

Please sign in to comment.