@loaders.gl/json 4.0.0-alpha.25 → 4.0.0-alpha.26

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.
package/dist/dist.min.js CHANGED
@@ -410,7 +410,8 @@
410
410
  case "geojson-table":
411
411
  return table.features.length;
412
412
  case "arrow-table":
413
- return table.data.numRows;
413
+ const arrowTable = table.data;
414
+ return arrowTable.numRows;
414
415
  case "columnar-table":
415
416
  for (const column of Object.values(table.data)) {
416
417
  return column.length || 0;
@@ -437,7 +438,8 @@
437
438
  case "columnar-table":
438
439
  return Object.keys(table.data).length;
439
440
  case "arrow-table":
440
- return table.data.numCols;
441
+ const arrowTable = table.data;
442
+ return arrowTable.numCols;
441
443
  default:
442
444
  throw new Error("table");
443
445
  }
@@ -479,9 +481,10 @@
479
481
  return objectRow2;
480
482
  }
481
483
  case "arrow-table":
484
+ const arrowTable = table.data;
482
485
  const objectRow = target || {};
483
- const row = table.data.get(rowIndex);
484
- const schema = table.data.schema;
486
+ const row = arrowTable.get(rowIndex);
487
+ const schema = arrowTable.schema;
485
488
  for (let i = 0; i < schema.fields.length; i++) {
486
489
  objectRow[schema.fields[i].name] = row?.[schema.fields[i].name];
487
490
  }
@@ -529,9 +532,10 @@
529
532
  return arrayRow2;
530
533
  }
531
534
  case "arrow-table":
535
+ const arrowTable = table.data;
532
536
  const arrayRow = target || [];
533
- const row = table.data.get(rowIndex);
534
- const schema = table.data.schema;
537
+ const row = arrowTable.get(rowIndex);
538
+ const schema = arrowTable.schema;
535
539
  for (let i = 0; i < schema.fields.length; i++) {
536
540
  arrayRow[i] = row?.[schema.fields[i].name];
537
541
  }
@@ -16,7 +16,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
16
16
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
17
17
  function _asyncIterator(iterable) { var method, async, sync, retry = 2; for ("undefined" != typeof Symbol && (async = Symbol.asyncIterator, sync = Symbol.iterator); retry--;) { if (async && null != (method = iterable[async])) return method.call(iterable); if (sync && null != (method = iterable[sync])) return new AsyncFromSyncIterator(method.call(iterable)); async = "@@asyncIterator", sync = "@@iterator"; } throw new TypeError("Object is not async iterable"); }
18
18
  function AsyncFromSyncIterator(s) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var done = r.done; return Promise.resolve(r.value).then(function (value) { return { value: value, done: done }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(s) { this.s = s, this.n = s.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, return: function _return(value) { var ret = this.s.return; return void 0 === ret ? Promise.resolve({ value: value, done: !0 }) : AsyncFromSyncIteratorContinuation(ret.apply(this.s, arguments)); }, throw: function _throw(value) { var thr = this.s.return; return void 0 === thr ? Promise.reject(value) : AsyncFromSyncIteratorContinuation(thr.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(s); }
19
- var VERSION = typeof "4.0.0-alpha.25" !== 'undefined' ? "4.0.0-alpha.25" : 'latest';
19
+ var VERSION = typeof "4.0.0-alpha.26" !== 'undefined' ? "4.0.0-alpha.26" : 'latest';
20
20
  var GeoJSONWorkerLoader = {
21
21
  name: 'GeoJSON',
22
22
  id: 'geojson',
@@ -12,7 +12,7 @@ var _parseJson = require("./lib/parsers/parse-json");
12
12
  var _parseJsonInBatches = require("./lib/parsers/parse-json-in-batches");
13
13
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
14
14
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
15
- var VERSION = typeof "4.0.0-alpha.25" !== 'undefined' ? "4.0.0-alpha.25" : 'latest';
15
+ var VERSION = typeof "4.0.0-alpha.26" !== 'undefined' ? "4.0.0-alpha.26" : 'latest';
16
16
  var DEFAULT_JSON_LOADER_OPTIONS = {
17
17
  json: {
18
18
  shape: 'object-row-table',
@@ -9,7 +9,7 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
9
9
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
10
  var _parseNdjson = require("./lib/parsers/parse-ndjson");
11
11
  var _parseNdjsonInBatches = require("./lib/parsers/parse-ndjson-in-batches");
12
- var VERSION = typeof "4.0.0-alpha.25" !== 'undefined' ? "4.0.0-alpha.25" : 'latest';
12
+ var VERSION = typeof "4.0.0-alpha.26" !== 'undefined' ? "4.0.0-alpha.26" : 'latest';
13
13
  var NDJSONLoader = {
14
14
  name: 'NDJSON',
15
15
  id: 'ndjson',
@@ -9,7 +9,7 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
9
9
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
10
  var _parseNdjson = require("./lib/parsers/parse-ndjson");
11
11
  var _parseNdjsonInBatches = require("./lib/parsers/parse-ndjson-in-batches");
12
- var VERSION = typeof "4.0.0-alpha.25" !== 'undefined' ? "4.0.0-alpha.25" : 'latest';
12
+ var VERSION = typeof "4.0.0-alpha.26" !== 'undefined' ? "4.0.0-alpha.26" : 'latest';
13
13
  var NDJSONLoader = {
14
14
  name: 'NDJSON',
15
15
  id: 'ndjson',
@@ -1,6 +1,6 @@
1
1
  import { geojsonToBinary } from '@loaders.gl/gis';
2
2
  import { parseJSONInBatches } from './lib/parsers/parse-json-in-batches';
3
- const VERSION = typeof "4.0.0-alpha.25" !== 'undefined' ? "4.0.0-alpha.25" : 'latest';
3
+ const VERSION = typeof "4.0.0-alpha.26" !== 'undefined' ? "4.0.0-alpha.26" : 'latest';
4
4
  export const GeoJSONWorkerLoader = {
5
5
  name: 'GeoJSON',
6
6
  id: 'geojson',
@@ -1,6 +1,6 @@
1
1
  import { parseJSONSync } from './lib/parsers/parse-json';
2
2
  import { parseJSONInBatches } from './lib/parsers/parse-json-in-batches';
3
- const VERSION = typeof "4.0.0-alpha.25" !== 'undefined' ? "4.0.0-alpha.25" : 'latest';
3
+ const VERSION = typeof "4.0.0-alpha.26" !== 'undefined' ? "4.0.0-alpha.26" : 'latest';
4
4
  const DEFAULT_JSON_LOADER_OPTIONS = {
5
5
  json: {
6
6
  shape: 'object-row-table',
@@ -1,6 +1,6 @@
1
1
  import { parseNDJSONSync } from './lib/parsers/parse-ndjson';
2
2
  import { parseNDJSONInBatches } from './lib/parsers/parse-ndjson-in-batches';
3
- const VERSION = typeof "4.0.0-alpha.25" !== 'undefined' ? "4.0.0-alpha.25" : 'latest';
3
+ const VERSION = typeof "4.0.0-alpha.26" !== 'undefined' ? "4.0.0-alpha.26" : 'latest';
4
4
  export const NDJSONLoader = {
5
5
  name: 'NDJSON',
6
6
  id: 'ndjson',
@@ -1,6 +1,6 @@
1
1
  import { parseNDJSONSync } from './lib/parsers/parse-ndjson';
2
2
  import { parseNDJSONInBatches } from './lib/parsers/parse-ndjson-in-batches';
3
- const VERSION = typeof "4.0.0-alpha.25" !== 'undefined' ? "4.0.0-alpha.25" : 'latest';
3
+ const VERSION = typeof "4.0.0-alpha.26" !== 'undefined' ? "4.0.0-alpha.26" : 'latest';
4
4
  export const NDJSONLoader = {
5
5
  name: 'NDJSON',
6
6
  id: 'ndjson',
@@ -2254,7 +2254,7 @@ Char: ${this.c}`;
2254
2254
  }
2255
2255
 
2256
2256
  // src/geojson-loader.ts
2257
- var VERSION = true ? "4.0.0-alpha.25" : "latest";
2257
+ var VERSION = true ? "4.0.0-alpha.26" : "latest";
2258
2258
  var GeoJSONWorkerLoader = {
2259
2259
  name: "GeoJSON",
2260
2260
  id: "geojson",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/json",
3
- "version": "4.0.0-alpha.25",
3
+ "version": "4.0.0-alpha.26",
4
4
  "description": "Framework-independent loader for JSON and streaming JSON formats",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -35,9 +35,9 @@
35
35
  "build-worker": "esbuild src/workers/geojson-worker.ts --bundle --outfile=dist/geojson-worker.js --define:__VERSION__=\\\"$npm_package_version\\\""
36
36
  },
37
37
  "dependencies": {
38
- "@loaders.gl/gis": "4.0.0-alpha.25",
39
- "@loaders.gl/loader-utils": "4.0.0-alpha.25",
40
- "@loaders.gl/schema": "4.0.0-alpha.25"
38
+ "@loaders.gl/gis": "4.0.0-alpha.26",
39
+ "@loaders.gl/loader-utils": "4.0.0-alpha.26",
40
+ "@loaders.gl/schema": "4.0.0-alpha.26"
41
41
  },
42
- "gitHead": "40135f391b869388dbbcd615bbe51178d0c370be"
42
+ "gitHead": "91adce71f74dacc7c8bfc379f0d122f2beae70d9"
43
43
  }