Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
[Chore]: Technical: Isolate processors (#1857)
dariaterekhovaae6c178d77c007
diff --git a/.eslintrc b/.eslintrcindex 272deb658..82ab8999d 100644--- a/.eslintrc+++ b/.eslintrc@@ -39,6 +39,7 @@"no-inline-comments": 0,"no-invalid-this": 0,"no-unused-expressions": 0,+ "no-undef": 0,"camelcase": 0,"consistent-return": 0,"comma-dangle": 1diff --git a/package.json b/package.jsonindex 104d5112b..efa61b4eb 100644--- a/package.json+++ b/package.json@@ -19,7 +19,8 @@"./src/constants","./src/types","./src/deckgl-layers",- "./src/layers"+ "./src/layers",+ "./src/processors"],"repository": {"type": "git",@@ -60,12 +61,12 @@"analyze:bundle": "webpack --config ./webpack/bundle.js --progress --env.prod","check-licence": "uber-licence --dry","add-licence": "uber-licence",- "prepublish": "yarn workspaces run prepublish && uber-licence && yarn build && yarn build:umd && yarn build:types",+ "prepublish": "yarn workspaces run stab && yarn workspaces run prepublish && uber-licence && yarn build && yarn build:umd && yarn build:types","docs": "babel-node ./scripts/documentation.js","typedoc": "typedoc --theme markdown --out typedoc --inputFiles ./src/reducers --inputFiles ./src/actions --excludeExternals --excludeNotExported --excludePrivate","example-version": "babel-node ./scripts/edit-version.js","prettier-all": "prettier --write '{src,examples,test}/**/*.{js,tsx,ts}'",- "lint": "yarn typescript && eslint src/*/src/*.{js,tsx,ts} test webpack examples/*.js examples/**/src/*.{js,tsx,ts} website/*.js website/src --fix",+ "lint": "yarn typescript && eslint src/*/src/*.{js,tsx,ts} test webpack examples/*.js examples/**/src/*.{js,tsx,ts} website/*.js website/src --fix","lint:css": "stylelint './src/**/*.js'","typescript": "tsc --noEmit","web": "(yarn && yarn install:web && yarn start:web)",diff --git a/src/actions/vis-state-actions.ts b/src/actions/vis-state-actions.tsindex 6c0d7dc60..c9f43541e 100644--- a/src/actions/vis-state-actions.ts+++ b/src/actions/vis-state-actions.ts@@ -21,7 +21,7 @@// vis-state-reducerimport {default as ActionTypes} from './action-types';import {AddDataToMapPayload} from '../actions/actions';-import {FileCacheItem} from '../processors/types';+import {FileCacheItem} from '@kepler.gl/processors';import {Layer, LayerBaseConfig} from '@kepler.gl/layers';import {Feature, InteractionConfig} from 'reducers/vis-state-updaters';import {ValueOf, Merge, RGBColor, NestedPartial, LayerVisConfig, ColorUI} from '@kepler.gl/types';diff --git a/src/components/geocoder-panel.tsx b/src/components/geocoder-panel.tsxindex 07ed5c107..63187051f 100644--- a/src/components/geocoder-panel.tsx+++ b/src/components/geocoder-panel.tsx@@ -20,7 +20,7 @@import React, {Component, ComponentType} from 'react';import styled from 'styled-components';-import {processRowObject} from 'processors';+import {processRowObject} from '@kepler.gl/processors';import {FlyToInterpolator} from '@deck.gl/core';import KeplerGlSchema from 'schemas';import {getCenterAndZoomFromBounds} from 'utils/projection-utils';diff --git a/src/constants/package.json b/src/constants/package.jsonindex 9ff8f7093..d1d9f590f 100644--- a/src/constants/package.json+++ b/src/constants/package.json@@ -22,7 +22,8 @@"build": "rm -fr dist && babel src --out-dir dist --source-maps inline --extensions '.ts,.tsx,.js,.jsx' --ignore '**/*.d.ts'","build:umd": "webpack --config ./webpack/umd.js --progress --env.prod","build:types": "tsc --project ./tsconfig.production.json",- "prepublish": "uber-licence && yarn build && yarn build:umd && yarn build:types"+ "prepublish": "uber-licence && yarn build && yarn build:umd && yarn build:types",+ "stab": "mkdir -p dist && touch dist/index.js"},"files": ["dist",diff --git a/src/deckgl-layers/package.json b/src/deckgl-layers/package.jsonindex 5b65ae0d6..1d187dccb 100644--- a/src/deckgl-layers/package.json+++ b/src/deckgl-layers/package.json@@ -22,7 +22,8 @@"build": "rm -fr dist && babel src --out-dir dist --source-maps inline --extensions '.ts,.tsx,.js,.jsx' --ignore '**/*.d.ts'","build:umd": "webpack --config ./webpack/umd.js --progress --env.prod","build:types": "tsc --project ./tsconfig.production.json",- "prepublish": "uber-licence && yarn build && yarn build:types"+ "prepublish": "uber-licence && yarn build && yarn build:types",+ "stab": "mkdir -p dist && touch dist/index.js"},"files": ["dist",diff --git a/src/index.js b/src/index.jsindex bb72caecd..056870374 100644--- a/src/index.js+++ b/src/index.js@@ -31,7 +31,7 @@ export * from './actions';export * from '@kepler.gl/constants';// Processors-export * from './processors';+export * from '@kepler.gl/processors';// Componentsexport * from './components';diff --git a/src/layers/package.json b/src/layers/package.jsonindex c2e380e37..552504647 100644--- a/src/layers/package.json+++ b/src/layers/package.json@@ -22,24 +22,25 @@"build": "rm -fr dist && babel src --out-dir dist --source-maps inline --extensions '.ts,.tsx,.js,.jsx' --ignore '**/*.d.ts'","build:umd": "webpack --config ./webpack/umd.js --progress --env.prod","build:types": "tsc --project ./tsconfig.production.json",- "prepublish": "uber-licence && yarn build && yarn build:types"+ "prepublish": "uber-licence && yarn build && yarn build:types",+ "stab": "mkdir -p dist && touch dist/index.js"},"files": ["dist","umd"],"dependencies": {- "@deck.gl/geo-layers": "8.2.0",- "@deck.gl/core": "8.2.0",- "@deck.gl/extensions": "8.2.0",- "@deck.gl/layers": "8.2.0",- "@deck.gl/mesh-layers": "8.2.0",+ "@deck.gl/core": "^8.4.11",+ "@deck.gl/extensions": "^8.4.11",+ "@deck.gl/geo-layers": "^8.4.11",+ "@deck.gl/layers": "^8.4.11",+ "@deck.gl/mesh-layers": "^8.4.11","@kepler.gl/deckgl-layers": "^2.5.5","@kepler.gl/layers": "^2.5.5","@kepler.gl/constants": "^2.5.5","@kepler.gl/types": "^2.5.5",- "@loaders.gl/core": "^2.3.3",- "@loaders.gl/gltf": "^2.3.3",+ "@loaders.gl/core": "^2.3.12",+ "@loaders.gl/gltf": "^2.3.12","@mapbox/geojson-normalize": "0.0.1","@turf/bbox": "^6.0.1","@types/geojson": "^7946.0.7",diff --git a/src/processors/babel.config.js b/src/processors/babel.config.jsnew file mode 100644index 000000000..7aec54a78--- /dev/null+++ b/src/processors/babel.config.js@@ -0,0 +1,65 @@+// Copyright (c) 2022 Uber Technologies, Inc.+//+// Permission is hereby granted, free of charge, to any person obtaining a copy+// of this software and associated documentation files (the "Software"), to deal+// in the Software without restriction, including without limitation the rights+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+// copies of the Software, and to permit persons to whom the Software is+// furnished to do so, subject to the following conditions:+//+// The above copyright notice and this permission notice shall be included in+// all copies or substantial portions of the Software.+//+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN+// THE SOFTWARE.++const KeplerPackage = require('./package');++const PRESETS = ['@babel/preset-env', '@babel/preset-react', '@babel/preset-typescript'];+const PLUGINS = [+ ['@babel/plugin-transform-typescript', {isTSX: true, allowDeclareFields: true}],+ '@babel/plugin-transform-modules-commonjs',+ '@babel/plugin-proposal-export-namespace-from',+ '@babel/plugin-proposal-optional-chaining',+ [+ '@babel/transform-runtime',+ {+ regenerator: true+ }+ ],+ [+ 'search-and-replace',+ {+ rules: [+ {+ search: '__PACKAGE_VERSION__',+ replace: KeplerPackage.version+ }+ ]+ }+ ]+];+const ENV = {+ test: {+ plugins: ['istanbul']+ },+ debug: {+ sourceMaps: 'inline',+ retainLines: true+ }+};++module.exports = function babel(api) {+ api.cache(true);++ return {+ presets: PRESETS,+ plugins: PLUGINS,+ env: ENV+ };+};diff --git a/src/processors/package.json b/src/processors/package.jsonnew file mode 100644index 000000000..030c8d125--- /dev/null+++ b/src/processors/package.json@@ -0,0 +1,54 @@+{+ "name": "@kepler.gl/processors",+ "author": "Shan He <[email protected]>",+ "version": "2.5.5",+ "description": "kepler.gl constants used by kepler.gl components, actions and reducers",+ "license": "MIT",+ "main": "dist/index.js",+ "types": "dist/processors/src/index.d.ts",+ "keywords": [+ "babel",+ "es6",+ "react",+ "webgl",+ "visualization",+ "deck.gl"+ ],+ "repository": {+ "type": "git",+ "url": "https://github.com/keplergl/kepler.gl.git"+ },+ "scripts": {+ "build": "rm -fr dist && babel src --out-dir dist --source-maps inline --extensions '.ts,.tsx,.js,.jsx' --ignore '**/*.d.ts'",+ "build:umd": "webpack --config ./webpack/umd.js --progress --env.prod",+ "build:types": "tsc --project ./tsconfig.production.json",+ "prepublish": "uber-licence && yarn build && yarn build:types",+ "stab": "mkdir -p dist && touch dist/index.js"+ },+ "files": [+ "dist",+ "umd"+ ],+ "dependencies": {+ "colorbrewer": "^1.5.0",+ "d3-scale": "^3.2.3",+ "global": "^4.3.0",+ "keymirror": "^0.1.1",+ "react-map-gl-draw": "0.14.8"+ },+ "nyc": {+ "sourceMap": false,+ "instrument": false+ },+ "engines": {+ "node": ">=12.0.0"+ },+ "maintainers": [+ "Shan He <[email protected]>",+ "Giuseppe Macri <[email protected]>"+ ],+ "volta": {+ "node": "12.22.0",+ "yarn": "1.22.17"+ }+}diff --git a/src/processors/data-processor.ts b/src/processors/src/data-processor.tssimilarity index 98%rename from src/processors/data-processor.tsrename to src/processors/src/data-processor.tsindex 61bd095c0..5453ad8ec 100644--- a/src/processors/data-processor.ts+++ b/src/processors/src/data-processor.ts@@ -25,12 +25,12 @@ import assert from 'assert';import {Analyzer, DATA_TYPES as AnalyzerDATA_TYPES} from 'type-analyzer';import normalize from '@mapbox/geojson-normalize';import {ALL_FIELD_TYPES, DATASET_FORMATS, GUIDES_FILE_FORMAT_DOC} from '@kepler.gl/constants';-import {notNullorUndefined, parseFieldValue} from 'utils/data-utils';-import KeplerGlSchema, {SavedMap, ParsedDataset} from 'schemas';+import {notNullorUndefined, parseFieldValue} from '../../utils/data-utils';+import KeplerGlSchema, {SavedMap, ParsedDataset} from '../../schemas';import {LoadedMap} from 'schemas/schema-manager';-import {hasOwnProperty, isPlainObject, toArray} from 'utils/utils';-import {Field} from 'utils/table-utils/kepler-table';-import {DataContainerInterface} from 'utils/table-utils/data-container-interface';+import {hasOwnProperty, isPlainObject, toArray} from '../../utils/utils';+import {Field} from '../../utils/table-utils/kepler-table';+import {DataContainerInterface} from '../../utils/table-utils/data-container-interface';import {ProcessorResult, RowData} from './types';import {Feature} from '@nebula.gl/edit-modes';diff --git a/src/processors/file-handler.ts b/src/processors/src/file-handler.tssimilarity index 96%rename from src/processors/file-handler.tsrename to src/processors/src/file-handler.tsindex b2952f583..23df37f2f 100644--- a/src/processors/file-handler.ts+++ b/src/processors/src/file-handler.ts@@ -23,12 +23,12 @@ import {parseInBatches} from '@loaders.gl/core';import {JSONLoader, _JSONPath} from '@loaders.gl/json';import {CSVLoader} from '@loaders.gl/csv';import {processGeojson, processKeplerglJSON, processRowObject} from './data-processor';-import {isPlainObject, generateHashId} from 'utils/utils';+import {isPlainObject, generateHashId} from '../../utils/utils';import {DATASET_FORMATS} from '@kepler.gl/constants';import {LoaderObject} from '@loaders.gl/loader-utils';-import {AddDataToMapPayload} from 'actions/actions';+import {AddDataToMapPayload} from '../../actions/actions';import {FileCacheItem, ValidKeplerGlMap} from './types';-import {Feature} from 'reducers';+import {Feature} from '../../reducers';import {FeatureCollection} from '@turf/helpers';const BATCH_TYPE = {@@ -59,11 +59,11 @@ export function isGeoJson(json: unknown): json is Feature | FeatureCollection {}export function isFeature(json: unknown): json is Feature {- return isPlainObject(json) && json.type === 'Feature' && !!json.geometry;+ return isPlainObject(json) && json.type === 'Feature' && Boolean(json.geometry);}export function isFeatureCollection(json: unknown): json is FeatureCollection {- return isPlainObject(json) && json.type === 'FeatureCollection' && !!json.features;+ return isPlainObject(json) && json.type === 'FeatureCollection' && Boolean(json.features);}export function isRowObject(json: any): boolean {diff --git a/src/processors/index.ts b/src/processors/src/index.tssimilarity index 97%rename from src/processors/index.tsrename to src/processors/src/index.tsindex 00377e2f6..7bf678a72 100644--- a/src/processors/index.ts+++ b/src/processors/src/index.ts@@ -20,3 +20,4 @@export * from './data-processor';export * from './file-handler';+export * from './types';diff --git a/src/processors/src/typedefs/deckgl.d.ts b/src/processors/src/typedefs/deckgl.d.tsnew file mode 100644index 000000000..bdfd40579--- /dev/null+++ b/src/processors/src/typedefs/deckgl.d.ts@@ -0,0 +1,25 @@+// Copyright (c) 2022 Uber Technologies, Inc.+//+// Permission is hereby granted, free of charge, to any person obtaining a copy+// of this software and associated documentation files (the "Software"), to deal+// in the Software without restriction, including without limitation the rights+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+// copies of the Software, and to permit persons to whom the Software is+// furnished to do so, subject to the following conditions:+//+// The above copyright notice and this permission notice shall be included in+// all copies or substantial portions of the Software.+//+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN+// THE SOFTWARE.++import * as DeckTypings from '@danmarshall/deckgl-typings';++declare module 'deck.gl' {+ export namespace DeckTypings {}+}diff --git a/src/processors/types.ts b/src/processors/src/types.tssimilarity index 100%rename from src/processors/types.tsrename to src/processors/src/types.tsdiff --git a/src/processors/tsconfig.production.json b/src/processors/tsconfig.production.jsonnew file mode 100644index 000000000..f7c324cb7--- /dev/null+++ b/src/processors/tsconfig.production.json@@ -0,0 +1,33 @@+{+ "compilerOptions": {+ "target": "es2020",+ "allowJs": false,+ "checkJs": false,+ "jsx": "react",+ "module": "esnext",+ "moduleResolution": "node",+ "declaration":true,+ "emitDeclarationOnly":true,+ "noImplicitAny": false,+ "noImplicitReturns": true,+ "noImplicitThis": true,+ "noUnusedLocals": true,+ "outDir": "dist",+ "sourceMap": true,+ "strictNullChecks": true,+ "suppressImplicitAnyIndexErrors": false,+ "esModuleInterop": true,+ "allowSyntheticDefaultImports": true,+ "skipLibCheck": true,+ "strict": true,+ "resolveJsonModule": true,+ "isolatedModules": true,+ "baseUrl": "../../src", //TODO change once all dependencies are isolated+ "paths": {+ "@kepler.gl/processors": ["processors/src"] //TODO change once all dependencies are isolated+ }+ },+ "include": [+ "src"+ ]+}diff --git a/src/processors/webpack/umd.js b/src/processors/webpack/umd.jsnew file mode 100644index 000000000..3eb025d5e--- /dev/null+++ b/src/processors/webpack/umd.js@@ -0,0 +1,120 @@+// Copyright (c) 2022 Uber Technologies, Inc.+//+// Permission is hereby granted, free of charge, to any person obtaining a copy+// of this software and associated documentation files (the "Software"), to deal+// in the Software without restriction, including without limitation the rights+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+// copies of the Software, and to permit persons to whom the Software is+// furnished to do so, subject to the following conditions:+//+// The above copyright notice and this permission notice shall be included in+// all copies or substantial portions of the Software.+//+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN+// THE SOFTWARE.++const resolve = require('path').resolve;+const join = require('path').join;++// Import package.json to read version+const KeplerPackage = require('../package');++const SRC_DIR = resolve(__dirname, '../src');+const OUTPUT_DIR = resolve(__dirname, '../umd');++const LIBRARY_BUNDLE_CONFIG = env => ({+ entry: {+ KeplerGl: join(SRC_DIR, 'index.ts')+ },++ // Silence warnings about big bundles+ stats: {+ warnings: false+ },++ output: {+ // Generate the bundle in dist folder+ path: OUTPUT_DIR,+ filename: 'keplergl.min.js',+ globalObject: 'this',+ library: '[name]',+ libraryTarget: 'umd'+ },++ // let's put everything in+ externals: {+ react: {+ root: 'React',+ commonjs2: 'react',+ commonjs: 'react',+ amd: 'react',+ umd: 'react'+ },+ 'react-dom': {+ root: 'ReactDOM',+ commonjs2: 'react-dom',+ commonjs: 'react-dom',+ amd: 'react-dom',+ umd: 'react-dom'+ },+ redux: {+ root: 'Redux',+ commonjs2: 'redux',+ commonjs: 'redux',+ amd: 'redux',+ umd: 'redux'+ },+ 'react-redux': {+ root: 'ReactRedux',+ commonjs2: 'react-redux',+ commonjs: 'react-redux',+ amd: 'react-redux',+ umd: 'react-redux'+ },+ 'styled-components': {+ commonjs: 'styled-components',+ commonjs2: 'styled-components',+ amd: 'styled-components',+ root: 'styled'+ }+ },+ resolve: {+ extensions: ['.tsx', '.ts', '.js'],+ modules: ['node_modules', SRC_DIR]+ },+ module: {+ rules: [+ {+ test: /\.(js|ts|tsx)$/,+ loader: 'babel-loader',+ include: [SRC_DIR],+ options: {+ plugins: [+ [+ 'search-and-replace',+ {+ rules: [+ {+ search: '__PACKAGE_VERSION__',+ replace: KeplerPackage.version+ }+ ]+ }+ ]+ ]+ }+ }+ ]+ },++ node: {+ fs: 'empty'+ }+});++module.exports = env => LIBRARY_BUNDLE_CONFIG(env);diff --git a/src/reducers/combined-updaters.ts b/src/reducers/combined-updaters.tsindex 7d8bb3e49..d43d975a8 100644--- a/src/reducers/combined-updaters.ts+++ b/src/reducers/combined-updaters.ts@@ -30,7 +30,7 @@ import {receiveMapConfigUpdater as stateMapConfigUpdater} from './map-state-updaimport {receiveMapConfigUpdater as styleMapConfigUpdater} from './map-style-updaters';import {findMapBounds} from 'utils/data-utils';import {isPlainObject} from 'utils/utils';-import {filesToDataPayload} from 'processors/file-handler';+import {filesToDataPayload} from '@kepler.gl/processors';import {payload_, apply_, with_, if_, compose_, merge_, pick_} from './composer-helpers';import {VisState} from './vis-state-updaters';import {MapState} from './map-state-updaters';@@ -210,7 +210,7 @@ export const loadFilesSuccessUpdater = (const stateWithData = compose_(payloads.map(p => apply_(addDataToMapUpdater, payload_(p))))(nextState);- return stateWithData;+ return stateWithData as KeplerGlState;};export const addDataToMapComposed = addDataToMapUpdater;diff --git a/src/reducers/provider-state-updaters.ts b/src/reducers/provider-state-updaters.tsindex 8fafa21ad..328bdaf8f 100644--- a/src/reducers/provider-state-updaters.ts+++ b/src/reducers/provider-state-updaters.ts@@ -48,7 +48,7 @@ import {} from '@kepler.gl/constants';import {FILE_CONFLICT_MSG} from '../cloud-providers';-import {DATASET_HANDLERS} from '../processors/data-processor';+import {DATASET_HANDLERS} from '@kepler.gl/processors';import * as ProviderActions from '../actions/provider-actions';import {MapListItem} from '../cloud-providers';diff --git a/src/schemas/dataset-schema.ts b/src/schemas/dataset-schema.tsindex db80f06a6..77a29608d 100644--- a/src/schemas/dataset-schema.ts+++ b/src/schemas/dataset-schema.ts@@ -23,7 +23,7 @@ import {console as globalConsole} from 'global/window';import {VERSIONS} from './versions';import Schema from './schema';-import {getFieldsFromData, getSampleForTypeAnalyze} from '../processors/data-processor';+import {getFieldsFromData, getSampleForTypeAnalyze} from '@kepler.gl/processors';// version v0const fieldPropertiesV0 = {diff --git a/src/tasks/tasks.ts b/src/tasks/tasks.tsindex d2e4fdcc2..d8e7cf3e0 100644--- a/src/tasks/tasks.ts+++ b/src/tasks/tasks.ts@@ -20,7 +20,7 @@import Task, {taskCreator} from 'react-palm/tasks';import {json as requestJson} from 'd3-request';-import {readFileInBatches, processFileData} from '../processors/file-handler';+import {readFileInBatches, processFileData} from '@kepler.gl/processors';export const LOAD_FILE_TASK = Task.fromPromise(({file, fileCache, loaders, loadOptions}) =>diff --git a/src/types/package.json b/src/types/package.jsonindex c83a54a22..3b7c93ea2 100644--- a/src/types/package.json+++ b/src/types/package.json@@ -18,7 +18,8 @@"url": "https://github.com/keplergl/kepler.gl.git"},"scripts": {- "prepublish": " "+ "prepublish": " ",+ "stab": " "},"nyc": {"sourceMap": false,diff --git a/src/utils/dataset-utils.ts b/src/utils/dataset-utils.tsindex 9676d86b5..2d36c6eea 100644--- a/src/utils/dataset-utils.ts+++ b/src/utils/dataset-utils.ts@@ -21,7 +21,7 @@import {hexToRgb} from './color-utils';import uniq from 'lodash.uniq';import {ALL_FIELD_TYPES} from '@kepler.gl/constants';-import {validateInputData} from 'processors/data-processor';+import {validateInputData} from '@kepler.gl/processors';import KeplerTable, {Field} from './table-utils/kepler-table';import {Datasets} from '../reducers/vis-state-updaters';diff --git a/src/utils/export-utils.ts b/src/utils/export-utils.tsindex 90f6bdc5e..7a0a01a03 100644--- a/src/utils/export-utils.ts+++ b/src/utils/export-utils.ts@@ -30,7 +30,7 @@ import {OneXResolutionOption} from '@kepler.gl/constants';import {exportMapToHTML} from 'templates/export-map-html';-import {formatCsv} from 'processors/data-processor';+import {formatCsv} from '@kepler.gl/processors';import get from 'lodash.get';import {set, generateHashId} from 'utils/utils';diff --git a/test/browser/file-handler-test.js b/test/browser/file-handler-test.jsindex 8abbba8ac..0dee9afda 100644--- a/test/browser/file-handler-test.js+++ b/test/browser/file-handler-test.js@@ -20,8 +20,7 @@/* eslint-disable max-statements */import test from 'tape';-import {processFileData, readFileInBatches} from 'processors/file-handler';-import {csvWithNull} from '../node/processors/file-handler-fixtures';+import {processFileData, readFileInBatches, csvWithNull} from '@kepler.gl/processors';import {dataWithNulls, testFields, parsedDataWithNulls} from 'test/fixtures/test-csv-data';import geojsonString, {featureString,diff --git a/test/browser/layer-tests/geojson-layer-specs.js b/test/browser/layer-tests/geojson-layer-specs.jsindex d57a46b5e..41446277c 100644--- a/test/browser/layer-tests/geojson-layer-specs.js+++ b/test/browser/layer-tests/geojson-layer-specs.js@@ -41,7 +41,7 @@ import {geoStyleMeta} from 'test/fixtures/geojson';import {createNewDataEntry} from 'utils/dataset-utils';-import {processGeojson} from 'processors/data-processor';+import {processGeojson} from '@kepler.gl/processors';import {copyTableAndUpdate} from 'utils/table-utils/kepler-table';test('#GeojsonLayer -> constructor', t => {diff --git a/test/helpers/layer-utils.js b/test/helpers/layer-utils.jsindex 53ffcef56..df257e452 100644--- a/test/helpers/layer-utils.js+++ b/test/helpers/layer-utils.js@@ -35,7 +35,7 @@ import {colorMaker, layerColors, LayerClasses} from '@kepler.gl/layers';import {getGpuFilterProps} from 'utils/gpu-filter-utils';import {renderDeckGlLayer} from 'utils/layer-utils';import {validateLayerWithData} from 'reducers/vis-state-merger';-import {processCsvData, processGeojson} from 'processors/data-processor';+import {processCsvData, processGeojson} from '@kepler.gl/processors';import {applyActions, InitialState} from 'test/helpers/mock-state';import {visStateReducer, keplerGlReducerCore} from 'reducers';// Fixturesdiff --git a/test/helpers/mock-state.js b/test/helpers/mock-state.jsindex f0966741d..39eab5e50 100644--- a/test/helpers/mock-state.js+++ b/test/helpers/mock-state.js@@ -54,7 +54,7 @@ import {dataId as tripDataId} from 'test/fixtures/test-trip-data';import tripGeojson, {tripDataInfo} from 'test/fixtures/trip-geojson';-import {processCsvData, processGeojson} from 'processors/data-processor';+import {processCsvData, processGeojson} from '@kepler.gl/processors';import {MOCK_MAP_STYLE} from './mock-map-styles';import {getUpdateVisDataPayload} from 'components/geocoder-panel';diff --git a/test/node/processors/file-handler-test.js b/test/node/processors/file-handler-test.jsindex 41e9e5bcf..77fbdfacb 100644--- a/test/node/processors/file-handler-test.js+++ b/test/node/processors/file-handler-test.js@@ -19,7 +19,7 @@// THE SOFTWARE.import test from 'tape';-import {isKeplerGlMap, makeProgressIterator, filesToDataPayload} from 'processors/file-handler';+import {isKeplerGlMap, makeProgressIterator, filesToDataPayload} from '@kepler.gl/processors';import {parsedFields, parsedRows} from 'test/fixtures/row-object';import {savedStateV1InteractionCoordinate as keplerglMap,diff --git a/test/node/reducers/composer-state-test.js b/test/node/reducers/composer-state-test.jsindex 971f4510b..12d2623b8 100644--- a/test/node/reducers/composer-state-test.js+++ b/test/node/reducers/composer-state-test.js@@ -24,7 +24,7 @@ import test from 'tape';import keplerGlReducer from 'reducers';import {addDataToMapUpdater} from 'reducers/combined-updaters';import {registerEntry} from 'actions/identity-actions';-import {processCsvData} from 'processors/data-processor';+import {processCsvData} from '@kepler.gl/processors';import testCsvData, {sampleConfig} from 'test/fixtures/test-csv-data';import testHexIdData, {diff --git a/test/node/reducers/vis-state-merger-test.js b/test/node/reducers/vis-state-merger-test.jsindex 484d21aaa..01ec7fb6b 100644--- a/test/node/reducers/vis-state-merger-test.js+++ b/test/node/reducers/vis-state-merger-test.js@@ -36,7 +36,7 @@ import coreReducer from 'reducers/core';import {updateVisData} from 'actions/vis-state-actions';import {receiveMapConfig, addDataToMap} from 'actions/actions';import {getDefaultInteraction} from 'utils/interaction-utils';-import {processKeplerglJSON} from 'processors/data-processor';+import {processKeplerglJSON} from '@kepler.gl/processors';import {createDataContainer} from 'utils/table-utils';diff --git a/test/node/reducers/vis-state-test.js b/test/node/reducers/vis-state-test.jsindex 1962f78c5..15997a35d 100644--- a/test/node/reducers/vis-state-test.js+++ b/test/node/reducers/vis-state-test.js@@ -36,7 +36,7 @@ import {getDefaultInteraction} from 'utils/interaction-utils';import {getDefaultFilter} from 'utils/filter-utils';import {createNewDataEntry} from 'utils/dataset-utils';import {maybeToDate} from 'utils/data-utils';-import {processCsvData, processGeojson} from 'processors/data-processor';+import {processCsvData, processGeojson} from '@kepler.gl/processors';import {Layer, KeplerGlLayers} from '@kepler.gl/layers';import {ALL_FIELD_TYPES,diff --git a/test/node/utils/data-processor-test.js b/test/node/utils/data-processor-test.jsindex 523915444..77df94ddd 100644--- a/test/node/utils/data-processor-test.js+++ b/test/node/utils/data-processor-test.js@@ -53,7 +53,7 @@ import {processGeojson,processRowObject,validateInputData-} from 'processors/data-processor';+} from '@kepler.gl/processors';import {createDataContainer} from 'utils/table-utils';diff --git a/test/node/utils/dataset-utils-test.js b/test/node/utils/dataset-utils-test.jsindex c7524b137..ed37f6408 100644--- a/test/node/utils/dataset-utils-test.js+++ b/test/node/utils/dataset-utils-test.js@@ -21,7 +21,7 @@import test from 'tape';import {findDefaultColorField, createNewDataEntry} from 'utils/dataset-utils';-import {processCsvData} from 'processors/data-processor';+import {processCsvData} from '@kepler.gl/processors';import csvData from 'test/fixtures/test-layer-data';diff --git a/test/node/utils/kepler-table-test.js b/test/node/utils/kepler-table-test.jsindex 7992b6ed7..c5f2a2ac5 100644--- a/test/node/utils/kepler-table-test.js+++ b/test/node/utils/kepler-table-test.js@@ -26,7 +26,7 @@ import {getFilterFunction} from 'utils/filter-utils';import {preciseRound} from 'utils/data-utils';import {createNewDataEntry} from 'utils/dataset-utils';-import {processCsvData} from 'processors/data-processor';+import {processCsvData} from '@kepler.gl/processors';import {cmpFields} from '../../helpers/comparison-utils';import {FILTER_TYPES} from '@kepler.gl/constants';diff --git a/test/node/utils/layer-utils-test.js b/test/node/utils/layer-utils-test.jsindex c7bf539b2..a8a8297e1 100644--- a/test/node/utils/layer-utils-test.js+++ b/test/node/utils/layer-utils-test.js@@ -23,7 +23,7 @@ import cloneDeep from 'lodash.clonedeep';import {findDefaultLayer, getLayerHoverProp} from 'utils/layer-utils';import {createNewDataEntry} from 'utils/dataset-utils';import KeplerTable, {findPointFieldPairs} from 'utils/table-utils/kepler-table';-import {processCsvData, processGeojson} from 'processors/data-processor';+import {processCsvData, processGeojson} from '@kepler.gl/processors';import {GEOJSON_FIELDS} from '@kepler.gl/constants';import {LayerClasses, KeplerGlLayers} from '@kepler.gl/layers';import {StateWTripGeojson, StateWFiles} from 'test/helpers/mock-state';