brucou / kingly

Zero-cost state-machine library for robust, testable and portable user interfaces (most machines compile ~1-2KB)

Home Page:https://brucou.github.io/documentation/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

As year of 2020, suggest to upgrade kingly dependency from node version '6.3.0' only to compatible higher version.

leopku opened this issue · comments

Thanks for this awesome lib.
I was in trouble while I trying kingly.

❯❯❯ yarn add react-state-driven
...
error kingly@0.18.2: The engine "node" is incompatible with this module. Expected version "6.3.0". Got "12.8.0"
error Found incompatible module.

Can I suggest to upgrade node dependency version to some like "node": ">= 6.3.0" or else?

Thanks again.

Thanks for the notification, I will have a look. Kingly is now v0.28. I have to update react-state-driven with the new changes. I will have a look at the node version too.

@leopku You can always experiment with the codesandbox playground. This one working example that you can fork: https://codesandbox.io/s/ym8vpqm7m9?file=/src/index.js

Also, in codesandbox, you have a File -> Export to zip option that packages the sandbox configuration so you can run it locally. You may be more lucky this way. I am continunig to investigate

@brucou Thanks for reply so quickly.

I still can't add react-state-driven to my project.

yarn add

❯❯❯ yarn add react-state-driven                                                          ✘ 1 master ✱ ◼
yarn add v1.17.3
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
error kingly@0.18.2: The engine "node" is incompatible with this module. Expected version "6.3.0". Got "12.8.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

manually add to package.json "react-state-driven": "0.8.0", then run yarn install

yarn install                                                                             master ✱ ◼
yarn install v1.17.3
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
error state-transducer-testing@0.11.3: The engine "node" is incompatible with this module. Expected version "6.3.0". Got "12.8.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Ok I see the issue is probably with the package.json of Kingly. It has this content:

{
...
  "engines": {
    "node": "6.3.0"
  },
...
}

I will try to see what is the best way to proceed tomorrow. Maybe I can publish a new minor version of Kingly with "node": ">= 6.3.0" and then anotehr minor version of react-state-driven. The other alternative is to do the same but also update directly react-state-driven to the latest version of kingly but that may take one more day.

Thanks for your patience

@leopku
Alright, can you try this: https://codesandbox.io/s/ym8vpqm7m9?file=/src/helpers.js
This has the latest Kingly and the latest <Machine/> component from react-state-driven with the node configuration removed so there should not be any node error in principle.

You can also trace the state machine if you install the devtool (called courtesan, cf. instructions here https://brucou.github.io/documentation/v1/tooling/devtool.html). Let me know if something is not clear or you could not make it work. The extension should work on any chromium-based browser.

Let me know if it works on your side.

I refactored the codesandbox so it is more React-like and uses JSX. That should help if you are not used to react-hyperscript. Also refactored the screen and error management. i will soon simplify the API in 0.11 by removing one or two parameters

Thanks for your kindness.

react-state-driven still depend on state-transducer-testing which also be limited with node 6.3.0.

I made a PR to fixed it.

PR accepted. Let me know if any questions on the library or further issues. It is very interesting for me to get feedback. I will review the Machine tests tomorrow. It should be based on an older version of the library so that has to be updated too.

Thanks a lot, @brucou

But it failed again because of graph-adt@0.7.0 expect version 6.3.0.

It's need to update graph-adt.

Just did it and update react-state-driven to 0.10.7. Can you please try again? hopefully this time it works. I will need to revisit all the build configuration over the week-end... sorry for the inconvenience.

Hi @brucou ,

Did react-state-driven@0.10.7 dependent state-transducer-testing@0.11.4 or state-transducer-testing@0.11.3?

The master branch was 0.10.6 and "state-transducer-testing": "^0.11.3" was stay the place of dependency.

It should be upgrade state-transducer-testing to ^0.11.4 and publishing version 0.11.4 of state-transducer-testing should be also desired.

Hi @brucou ,

The package state-transducer which also dependent by state-transducer-testing locked the node version too.

The repo of state-transducer had been moved to kingly. It should also be upgraded to make all of this work.

I rmoved the dependency on state-transducer-testing and graph-adt. can you try again with 0.10.8 of react-state-driven? you won't be able to run tests, which is fine because tests are still depending on older versions of the library and I have to fix that this week-end.

Hi brucou,

0.10.8 can been added successfully. I would test it functionally.

Thanks very very much and sorry for wasting your weekend time.

You are not wasting anything at all, it is my responsability to provide software that works and can be used. You reporting your issues is helpful for all those who have encountered the same errors than you and now no longer will have your issues thanks to you. So please continue to report any issue you find, and questions you have.

I'l lleave this open for a few days before closing it in case there is anything else occuring.

0.10.8 can been added successfully. I would test it functionally.
@leopku How did that go? Anything I can help with?

Sorry for leaving this temporary because of other works.

Dependency issue was fixed now.

But react example was broken because of changes like state-transducer was deprecated. I'm still struggling with it.

Here is the react example with dependencies updated to Kingly: https://codesandbox.io/s/flickr-search-app-with-kingly-qivl3.

I am rewriting the README, and updating the doc. for react-state-driven in the main document site. That should be done by tomorrow. I invite to have a look then.

It works. Thank yout, @brucou .

@leopku readme for react-state-driven has been updated to reflect the changes in the new version. The main documentation site has also been updated: https://brucou.github.io/documentation/v1/int-react/index.html

https://brucou.github.io/documentation/v1/int-react/index.html

Big thanks for so nice and detailed document.