Skip to content
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

Update Node-Red-Standalone to 3.0.2-18 #693

Merged
merged 2 commits into from
Jul 19, 2023
Merged

Conversation

oren-z0
Copy link
Contributor

@oren-z0 oren-z0 commented Jul 15, 2023

NodeJS 14 is deprecated. This version uses NodeJS 18 instead.

Tested on Raspberry Pi.

@IMPranshu
Copy link
Contributor

Appreciate the PR @oren-z0. Node 14 might be deprecated but the docker images built are still functioning and supported. Updating it might be not necessary at this point unless you have faced any issues while running the app which is specific to node version 14 requiring this update. Do share a screenshot of the issue faced, will help better understand.

Screenshot 2023-07-16 at 8 50 26 PM

Both Images are being maintained similarly.

Screenshot 2023-07-16 at 8 50 08 PM

@oren-z0
Copy link
Contributor Author

oren-z0 commented Jul 17, 2023

Thanks @IMPranshu I wanted to use @nostr-dev-kit/ndk which depends on @noble/hashes, which requires the engine to be >= 16:

https://github.com/paulmillr/noble-hashes/blob/54c3197fc53bbfa4521b6883eed0e7bd1430beab/package.json#L44

@nmfretz
Copy link
Contributor

nmfretz commented Jul 18, 2023

Oh, good call @oren-z0. Looks like 16.x is recommended by Node-Red https://nodered.org/docs/faq/node-versions anyways. You okay going with 16 or would you rather see the bump all the way to 18?

Also, how are you finding ndk? I'm currently using nostr-tools and curious to here about experience with other tools.

@oren-z0
Copy link
Contributor Author

oren-z0 commented Jul 18, 2023

Thanks @nmfretz ,
I don't see a reason not to upgrade directly to Node.JS 18 - it's stable, and Node.JS 16 will become deprecated too this year: https://endoflife.date/nodejs .

NDK is cool, does a lot of work for you, like all the multi-step procedure for creating a "zap" (a single event.zap(...) call will do all the zap-request, http call to the lnurlp etc. and give you the invoice).
But it has this annoying feature that automatically adds e and p tags referencing events that are mentioned in your event content (before signing an event, it will parse it's content).
nostr-dev-kit/ndk#53
Sometimes you don't want to add p and e tags to events that you mention, because it will make your event appear as a reply to the mentioned events in some clients - and may also break the nip-57 and create a zap request with more than one p tag.
I ended up not using the Node-RED functionally directly, I just created the code in one .js file and a .sh script to execute it, and use Node-RED to re-run the .sh script if it crashes.
But it was useful to have a docker environment with Node.JS installed and a /data folder to put the files and install dependencies.

Check out this bot: http://damus.io/npub1qm05ghrt2xuc970rxpsuchs504ah4rllxsgevdyjc0v5uha77m6qujz78x

NodeJS 14 is deprecated. This version uses
NodeJS 18 instead.
@nmfretz
Copy link
Contributor

nmfretz commented Jul 19, 2023

I don't see a reason not to upgrade directly to Node.JS 18 - it's stable, and Node.JS 16 will become deprecated too this year.

Sound good to me @oren-z0, thanks for keeping on top of this. I have tested on arm64 and amd64 and we are good to go live. FYI, I tweaked the release notes and pushed to your fork, just so you're aware for potential future merge conflicts.

Check out this bot: http://damus.io/npub1qm05ghrt2xuc970rxpsuchs504ah4rllxsgevdyjc0v5uha77m6qujz78x

I just tested this. You are the king of bots!

But it has this annoying feature that automatically adds e and p tags referencing events that are mentioned ...

Ah I see, ya thanks for the breakdown. It's such early days with these tools that it's often hard to use them out-of-the-box without modifying for your specific use case. I have found similar quirks when using nostr-tools.

@nmfretz nmfretz merged commit 21a9203 into getumbrel:master Jul 19, 2023
@nmfretz nmfretz mentioned this pull request Dec 7, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants