@loaders.gl/json 4.0.0-alpha.21 → 4.0.0-alpha.22

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.
@@ -17,7 +17,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
17
17
  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; }
18
18
  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"); }
19
19
  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); }
20
- var VERSION = typeof "4.0.0-alpha.21" !== 'undefined' ? "4.0.0-alpha.21" : 'latest';
20
+ var VERSION = typeof "4.0.0-alpha.22" !== 'undefined' ? "4.0.0-alpha.22" : 'latest';
21
21
  var GeoJSONWorkerLoader = {
22
22
  name: 'GeoJSON',
23
23
  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.21" !== 'undefined' ? "4.0.0-alpha.21" : 'latest';
15
+ var VERSION = typeof "4.0.0-alpha.22" !== 'undefined' ? "4.0.0-alpha.22" : 'latest';
16
16
  var DEFAULT_JSON_LOADER_OPTIONS = {
17
17
  json: {
18
18
  shape: '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.21" !== 'undefined' ? "4.0.0-alpha.21" : 'latest';
12
+ var VERSION = typeof "4.0.0-alpha.22" !== 'undefined' ? "4.0.0-alpha.22" : '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.21" !== 'undefined' ? "4.0.0-alpha.21" : 'latest';
12
+ var VERSION = typeof "4.0.0-alpha.22" !== 'undefined' ? "4.0.0-alpha.22" : 'latest';
13
13
  var NDJSONLoader = {
14
14
  name: 'NDJSON',
15
15
  id: 'ndjson',
@@ -1,7 +1,7 @@
1
1
  import { geojsonToBinary } from '@loaders.gl/gis';
2
2
  import { parseJSONSync } from './lib/parsers/parse-json';
3
3
  import { parseJSONInBatches } from './lib/parsers/parse-json-in-batches';
4
- const VERSION = typeof "4.0.0-alpha.21" !== 'undefined' ? "4.0.0-alpha.21" : 'latest';
4
+ const VERSION = typeof "4.0.0-alpha.22" !== 'undefined' ? "4.0.0-alpha.22" : 'latest';
5
5
  export const GeoJSONWorkerLoader = {
6
6
  name: 'GeoJSON',
7
7
  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.21" !== 'undefined' ? "4.0.0-alpha.21" : 'latest';
3
+ const VERSION = typeof "4.0.0-alpha.22" !== 'undefined' ? "4.0.0-alpha.22" : 'latest';
4
4
  const DEFAULT_JSON_LOADER_OPTIONS = {
5
5
  json: {
6
6
  shape: '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.21" !== 'undefined' ? "4.0.0-alpha.21" : 'latest';
3
+ const VERSION = typeof "4.0.0-alpha.22" !== 'undefined' ? "4.0.0-alpha.22" : '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.21" !== 'undefined' ? "4.0.0-alpha.21" : 'latest';
3
+ const VERSION = typeof "4.0.0-alpha.22" !== 'undefined' ? "4.0.0-alpha.22" : 'latest';
4
4
  export const NDJSONLoader = {
5
5
  name: 'NDJSON',
6
6
  id: 'ndjson',
@@ -125,7 +125,7 @@
125
125
  options,
126
126
  context: {
127
127
  ...context,
128
- parse: parseOnMainThread
128
+ _parse: parseOnMainThread
129
129
  }
130
130
  });
131
131
  WorkerBody.postMessage("done", { result });
@@ -138,7 +138,7 @@
138
138
  }
139
139
  };
140
140
  }
141
- function parseOnMainThread(arrayBuffer, options) {
141
+ function parseOnMainThread(arrayBuffer, loader, options, context) {
142
142
  return new Promise((resolve, reject) => {
143
143
  const id = requestId++;
144
144
  const onMessage = (type, payload2) => {
@@ -162,7 +162,12 @@
162
162
  WorkerBody.postMessage("process", payload);
163
163
  });
164
164
  }
165
- async function parseData({ loader, arrayBuffer, options, context }) {
165
+ async function parseData({
166
+ loader,
167
+ arrayBuffer,
168
+ options,
169
+ context
170
+ }) {
166
171
  let data;
167
172
  let parser;
168
173
  if (loader.parseSync || loader.parse) {
@@ -2427,7 +2432,7 @@ Char: ${this.c}`;
2427
2432
  }
2428
2433
 
2429
2434
  // src/geojson-loader.ts
2430
- var VERSION = true ? "4.0.0-alpha.21" : "latest";
2435
+ var VERSION = true ? "4.0.0-alpha.22" : "latest";
2431
2436
  var GeoJSONWorkerLoader = {
2432
2437
  name: "GeoJSON",
2433
2438
  id: "geojson",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/json",
3
- "version": "4.0.0-alpha.21",
3
+ "version": "4.0.0-alpha.22",
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.21",
39
- "@loaders.gl/loader-utils": "4.0.0-alpha.21",
40
- "@loaders.gl/schema": "4.0.0-alpha.21"
38
+ "@loaders.gl/gis": "4.0.0-alpha.22",
39
+ "@loaders.gl/loader-utils": "4.0.0-alpha.22",
40
+ "@loaders.gl/schema": "4.0.0-alpha.22"
41
41
  },
42
- "gitHead": "df5d670b136192b26941396e944f9c46be788e83"
42
+ "gitHead": "0da838c506d1275383f2fd3d244d9c72b25397d2"
43
43
  }