chore: remove react-palm, replace with built-in task runtime in @kepler.gl/tasks - #3592
Open
igorDykhta wants to merge 9 commits into
Open
chore: remove react-palm, replace with built-in task runtime in @kepler.gl/tasks#3592igorDykhta wants to merge 9 commits into
igorDykhta wants to merge 9 commits into
Conversation
Signed-off-by: Ihor Dykhta <ihordykhta@Ihors-MacBook-Pro.local>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the external react-palm dependency and migrates kepler.gl’s async side-effect “task” system to a built-in runtime under @kepler.gl/tasks, updating imports, docs, and package dependencies across the repo.
Changes:
- Introduces a new internal task runtime (
src/tasks/src/task-runtime.ts) and re-exports task APIs from@kepler.gl/tasks. - Migrates reducers, tests, examples, and table utilities from
react-palm/tasksto@kepler.gl/tasks. - Updates docs/upgrade guides and removes
react-palmfrom package dependencies.
Reviewed changes
Copilot reviewed 36 out of 36 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| website/src/reducers/index.js | Updates website store setup to stop using react-palm task middleware. |
| website/package.json | Removes react-palm dependency from the website app. |
| UPGRADE-GUIDE.md | Documents react-palm removal and the new task middleware import path. |
| test/node/reducers/vis-state-test.js | Switches test utilities import to @kepler.gl/tasks. |
| test/node/reducers/vis-state-merger-test.js | Switches Task/withTask/test helpers import to @kepler.gl/tasks. |
| test/node/reducers/provider-state-test.js | Switches test utilities import to @kepler.gl/tasks. |
| test/node/reducers/map-style-test.js | Switches test utilities import to @kepler.gl/tasks. |
| test/node/reducers/composer-state-test.js | Switches test utilities import to @kepler.gl/tasks. |
| test/helpers/mock-state-utils.js | Switches test utilities import to @kepler.gl/tasks. |
| test/browser/components/kepler-gl-test.js | Switches test utilities import to @kepler.gl/tasks. |
| src/tasks/src/task-runtime.ts | Adds the new framework-neutral task runtime + middleware + test utilities. |
| src/tasks/src/index.ts | Re-exports task runtime APIs from @kepler.gl/tasks and defines built-in tasks. |
| src/tasks/package.json | Removes react-palm dependency from @kepler.gl/tasks. |
| src/table/src/dataset-utils.ts | Switches Task import to @kepler.gl/tasks. |
| src/table/package.json | Adds @kepler.gl/tasks dependency and removes react-palm. |
| src/reducers/src/vis-state-updaters.ts | Switches Task helpers import to @kepler.gl/tasks and updates comment. |
| src/reducers/src/root.ts | Updates public JSDoc examples away from react-palm/tasks. |
| src/reducers/src/provider-state-updaters.ts | Switches Task helpers import to @kepler.gl/tasks. |
| src/reducers/src/middleware.ts | Updates enhanceReduxMiddleware to use @kepler.gl/tasks middleware. |
| src/reducers/src/merger-handler.ts | Switches global task queue import to @kepler.gl/tasks. |
| src/reducers/src/map-style-updaters.ts | Switches Task helpers import to @kepler.gl/tasks. |
| src/reducers/package.json | Removes react-palm dependency from reducers package. |
| src/actions/src/action-types.ts | Updates public JSDoc examples away from react-palm/tasks. |
| src/actions/package.json | Removes react-palm dependency from actions package. |
| README.md | Updates store setup documentation to built-in task middleware and new helper import. |
| examples/replace-component/package.json | Removes react-palm from example dependencies. |
| examples/open-modal/package.json | Removes react-palm from example dependencies. |
| examples/node-app/package.json | Removes react-palm from example dependencies. |
| examples/demo-app/src/reducers/index.js | Switches Task helpers import to @kepler.gl/tasks. |
| examples/custom-theme/package.json | Removes react-palm from example dependencies. |
| examples/custom-reducer/package.json | Removes react-palm from example dependencies. |
| examples/custom-map-style/package.json | Removes react-palm from example dependencies. |
| docs/upgrade-guide-v3.3.md | Adds explicit migration guidance for the new built-in task runtime. |
| docs/api-reference/reducers/reducers.md | Updates reducer setup docs to import middleware from @kepler.gl/tasks. |
| docs/api-reference/get-started.md | Updates “get started” docs to use enhanceReduxMiddleware. |
| docs/api-reference/actions/actions.md | Updates action docs to import middleware from @kepler.gl/tasks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Ihor Dykhta <ihordykhta@Ihors-MacBook-Pro.local>
taskMiddleware is exported from @kepler.gl/tasks, not @kepler.gl/reducers. @kepler.gl/reducers only exports enhanceReduxMiddleware. Update JSDoc examples in root.ts and action-types.ts, website store setup, and UPGRADE-GUIDE.md highlight bullet. Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Ihor Dykhta <ihordykhta@Ihors-MacBook-Pro.local>
Signed-off-by: Ihor Dykhta <ihordykhta@Ihors-MacBook-Pro.local>
Signed-off-by: Ihor Dykhta <ihordykhta@Ihors-MacBook-Pro.local>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes the
react-palmdependency and replaces it with a lightweight built-in task runtime.What changed
@kepler.gl/tasks-core— new zero-dependency package containing the full task runtime:Task.fromPromise,Task.fromCallback,withTask,withTasks,taskMiddleware,getGlobalTaskQueue,disableStackCapturing, and all test helpers (drainTasksForTesting,succeedTaskInTest,errorTaskInTest,succeedTaskWithValues,simulateTask)@kepler.gl/tasks-coreis a separate package to break a circular dependency that would otherwise occur:@kepler.gl/tasks→@kepler.gl/processors→@kepler.gl/table→@kepler.gl/tasks@kepler.gl/tasksre-exports everything from@kepler.gl/tasks-core— no API change for any existing consumer@kepler.gl/tableimportsTask.fromPromisedirectly from@kepler.gl/tasks-coreto defineCREATE_TABLE_TASK/UPDATE_TABLE_TASK@kepler.gl/tasks,@kepler.gl/reducers,@kepler.gl/table,@kepler.gl/actions, examples, website) no longer depend onreact-palmcreateNewDataEntryreturn type: was incorrectly typed asDatasets | null; it always returnsTaskDescriptor | null— this type bug was previously hidden byreact-palm's looseanytypingUPGRADE-GUIDE.md,docs/upgrade-guide-v3.3.md), and API reference exampleswebsite/yarn.lockandexamples/demo-app/yarn.lockto remove stalereact-palmlockfile entriesMigration
Apps using
enhanceReduxMiddlewarefrom@kepler.gl/reducers— no changes needed.Apps importing
taskMiddlewaredirectly:Apps using
Task,withTask, or test helpers:Test plan
Manual / smoke tests against the demo-app (or Netlify preview). Each scenario below exercises a specific task path.
Store / middleware bootstrap
enhanceReduxMiddleware(demo-app) and via directtaskMiddleware(website)File upload (
LOAD_FILE_TASK,PROCESS_FILE_DATA,UNWRAP_TASK,DELAY_TASK,CREATE_TABLE_TASK)UPDATE_TABLE_TASKpath updates the table without duplicating the datasetAdd data to map (
Task.allSettled+CREATE_TABLE_TASK+ACTION_TASK)allSettled)Map styles (
LOAD_MAP_STYLE_TASK,Task.all,ACTION_TASK)Task.all) without hangingCloud save / load (
EXPORT_FILE_TO_CLOUD_TASK,LOAD_CLOUD_MAP_TASK,ACTION_TASK,DELAY_TASK)ACTION_TASKDELAY_TASK)Notifications & deferred actions (
ACTION_TASK,DELAY_TASK)Config / state merge (
getGlobalTaskQueue)Demo-app remote resource load (custom
Task.fromPromise+withTask)Regression / edge cases
yarn cover(or at least reducer + mock-state tests) pass — these exercisedrainTasksForTesting/succeedTaskWithValues/Task.allSettledsync paths