-
-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove PlowJS & immutable-js #3118
Comments
Seems like immutable js is already gone from the codebase. That'll make things easier :) |
plow js is often used in the hoc |
Bad News: I've just noticed, that Plow is being leaked as API for Inspector Views. Here's an example: https://github.com/neos/neos-ui/blob/8.3/packages/neos-ui-views/src/Data/ColumnView/index.js#L24
We will need to support this use case, but that doesn't require the entirety of Plow. It's probably best to have a utility function native to the UI code base that can replace |
Plugin vendors using esbuild or the alias feature directly can, if they want to bundle plow-js directly (to avoid deprecation warnings), exclude plow-js from the map: const {"plow-js": _, ...extensibilityMap} = require("@neos-project/neos-ui-extensibility/extensibilityMap.json");
build({
alias: extensibilityMap
}) |
Motivation
Once upon a time, I've decided to create PlowJS, a library that would ease the handling of immutable state within the redux reducers of the Neos UI.
It seemed like a good idea at the time, but the JavaScript ecosystem has changed drastically since (and not exactly in favor of such a solution 😅).
There's several reasons why PlowJS has become a liability to the Neos UI code base:
The original purpose of PlowJS was to support the development of redux reducers. We already had a discussion about this a couple of years ago and decided to replace PlowJS with immer. Many (if not most) reducers have already been refactored since.
But PlowJS is being used everywhere because of it's convenient feature to hide the API of immutable-js from us.
The goal of this issue is therefore to remove both PlowJS and immutable-js entirely from the codebase.
Acceptance Criteria
Object.freeze
callsreadonly
-enforced TypingsReferences
The text was updated successfully, but these errors were encountered: