pelias-openstreetmap 8.5.2 → 9.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@ jobs:
7
7
  matrix:
8
8
  os:
9
9
  - ubuntu-24.04
10
- node-version: [ 20.x, 22.x, 24.x, 26.x ]
10
+ node-version: [ 22.x, 24.x, 26.x ]
11
11
  steps:
12
12
  - uses: actions/checkout@v6
13
13
  - name: 'Install node.js ${{ matrix.node-version }}'
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "pelias-openstreetmap",
3
- "version": "8.5.2",
3
+ "version": "9.1.0",
4
4
  "engines": {
5
- "node": ">=10.0.0"
5
+ "node": ">=22.0.0"
6
6
  },
7
7
  "author": "pelias",
8
8
  "description": "Pelias openstreetmap utilities",
@@ -44,13 +44,13 @@
44
44
  "iso-639-3": "^1.0.0",
45
45
  "joi": "^14.0.0",
46
46
  "lodash": "^4.17.4",
47
- "pbf2json": "^6.9.0",
48
- "pelias-blacklist-stream": "^1.3.0",
49
- "pelias-config": "^6.0.0",
50
- "pelias-dbclient": "^3.1.0",
51
- "pelias-logger": "^1.6.0",
52
- "pelias-model": "^10.6.0",
53
- "pelias-wof-admin-lookup": "^7.19.0",
47
+ "pbf2json": "^7.0.0",
48
+ "pelias-blacklist-stream": "^2.0.0",
49
+ "pelias-config": "^7.0.0",
50
+ "pelias-dbclient": "^4.0.0",
51
+ "pelias-logger": "^2.0.0",
52
+ "pelias-model": "^11.0.0",
53
+ "pelias-wof-admin-lookup": "^8.0.0",
54
54
  "through2": "^3.0.0",
55
55
  "through2-sink": "^1.0.0"
56
56
  },
@@ -60,7 +60,7 @@
60
60
  "istanbul": "^0.4.3",
61
61
  "jshint": "^2.10.3",
62
62
  "naivedb": "^1.0.7",
63
- "pelias-mock-logger": "^1.0.1",
63
+ "pelias-mock-logger": "^2.0.0",
64
64
  "precommit-hook": "^3.0.0",
65
65
  "proxyquire": "^2.0.0",
66
66
  "stream-mock": "^2.0.3",
@@ -121,8 +121,13 @@ const addrProps = [ 'name', 'number', 'street', 'zip' ];
121
121
  // call document setters and ignore non-fatal errors
122
122
  function setProperties( record, doc ){
123
123
  addrProps.forEach( function ( prop ){
124
+ const value = doc.getAddress( prop );
125
+
126
+ // skip properties the setter rejects, it throws for absent or blank values
127
+ if( 'string' !== typeof value || !value.trim().length ){ return; }
128
+
124
129
  try {
125
- record.setAddress( prop, doc.getAddress( prop ) );
130
+ record.setAddress( prop, value );
126
131
  } catch ( ex ) {}
127
132
  });
128
133
  }