SocketSecurity, to programming
@SocketSecurity@fosstodon.org avatar

LDAPjs, an LDAP client and server API for Node.js, was decommissioned after its maintainer received an abusive email from a user, raising concerns about this form of abuse as a potential attack vector. https://socket.dev/blog/ldapjs-open-source-project-decommissioned-after-maintainer-receives-abusive-email

joelanman, to programming
@joelanman@hachyderm.io avatar

missing from native Node - write a file and create any necessary folders in the path

fs.writeFileSync('a/b/c.txt','hello', {recursive:true})  

nurkiewicz, to AWS
@nurkiewicz@fosstodon.org avatar
thisismissem, to programming
@thisismissem@hachyderm.io avatar

It's fascinating how much things have changed in the node.js ecosystem over the years: How to set up a Node server with TypeScript in 2024

https://www.learnwithjason.dev/blog/modern-node-server-typescript-2024/

#nodejs

ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar

Node.js and its many, many new features with Matteo Collina [89-min. video]
@mcollina @jlengstorf
https://www.youtube.com/watch?v=evCnOaVaOTo

ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar
aral, to SmallWeb
@aral@mastodon.ar.al avatar

The Evergreen Web section in Kitten’s¹ settings now has its own page too (and uses Kitten’s new Streaming HTML² workflow).

If you have the previous version of your site up somewhere, you can use the 404-to-307 technique³ to forward missing pages to your old site so as not to break the Web.

I’ll add local static archive support later.

¹ https://codeberg.org/kitten/app
² https://ar.al/2024/03/08/streaming-html/
³ https://4042307.org

leanpub, to devops
@leanpub@mastodon.social avatar

Learn Kubernetes & Docker - .NET Core, Java, Node.JS, PHP or Python by Arnaud Weil is free with a Leanpub Reader membership! Or you can buy it for $11.99! http://leanpub.com/k8s

cuchaz, to random
@cuchaz@gladtech.social avatar

Once again I get foiled by switching languages. :blobcatfacepalm2:

In Javascript, you have to compare strings with ===, not ==, or else you'll run into type coercion problems, because Javascript thinks 1 == "1" is a totally fine thing to be true. (it's not)

But in Kotlin, === compares identity not equality for strings. But in the JVM, string values are aggressively cached, so === actually does what you want most of the time. Unless your strings come from weird places, like JNI code. Then you get awful non-deterministic behavior that's incredibly hard to debug, but it totally goes away when you use the correct comparison operator == for strings.

sigh I'm not really as good at this whole programming thing as I should be by now.

happyborg,
@happyborg@fosstodon.org avatar

@cuchaz
Programming is hard.

A skill is choosing systems and tools that make it easier and making meta choices to enable you to maximise your agency in those choices.

I remember the pain I endured learning #nodeJS a decade ago, then looking at #Angular [shudder] and #React hmm.

Then the pleasure that followed learning to use #Svelte and #Rust. You'd have a hard time getting me to use anything else now. Not happening.

My debut Rust project is now part of debian / Ubuntu.

"===" 🤣
#RustLang

khalidabuhakmeh, to dotnet
@khalidabuhakmeh@mastodon.social avatar

Only a few years ago, there was a considerable effort in to make interoperability with a thing... now it seems like all those projects are gone or woefully behind. Bummer :(

ehmicky, to programming
@ehmicky@fosstodon.org avatar

We just released Execa 9, which is our biggest release so far.

If you're currently using Execa, you should check out the new features! Also, if you're currently using zx or Bun shell, you might be interesting in this alternative.

https://medium.com/@ehmicky/execa-9-release-d0d5daaa097f

#nodejs #node #javascript #js #cli #terminal #console #bash #shell

pawelgrzybek, to programming
@pawelgrzybek@mastodon.social avatar

Node.js 20.13 brought great improvements. My highlights:

► Watch mode is considered stable now
► The util.styleText now accepts an array of modifiers

Of course, I have articles about both of those features! I just updated both of them to reflect new announcements.

“TIL — Node v18.11.0 comes with a watch mode, so you might not need nodemon”
https://pawelgrzybek.com/til-node-v18-11-0-comes-with-a-watch-mode-so-you-might-not-need-nodemon/

“Node.js added utility for text formatting — you may not need chalk anymore”
https://pawelgrzybek.com/node-js-added-utility-for-text-formatting-you-may-not-need-chalk-anymore/

aral, (edited ) to programming
@aral@mastodon.ar.al avatar

This is a niche one but it might help someone in the future:

How to include multiple directories from different places in the file system hierarchy in an archive without including the whole directory structure for any of them.

https://codeberg.org/aral/gists/src/branch/main/how-to-include-multiple-directories-from-different-places-in-the-file-system-hierarchy-in-an-archive-without-including-the-whole-directory-structure-for-any-of-them.md

TL; DR: use symlinks.

aral, to javascript
@aral@mastodon.ar.al avatar

Just published a minor update (version 5.1.1) to JavaScript Database (JSDB) that optimises the custom data type¹ serialisation code by removing a redundant return statement:

https://www.npmjs.com/package/@small-tech/jsdb

This change is backwards compatible and shouldn’t require and updates to your projects, including the ones you have in Kitten (which uses JSDB internally).

¹ https://codeberg.org/small-tech/jsdb#custom-data-types
² https://codeberg.org/kitten/app

tanepiper, to programming
@tanepiper@tane.codes avatar

Anyone else seeing more segfaults with #nodejs 22 and #npm

Going to have to go back to LTS as pipeline keep failing now when installing dependencies when using caching.

ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar
joelanman, to programming
@joelanman@hachyderm.io avatar

any opinions on Node.js logging libraries like Winston or Pino? Or do you just write your own logging functions?

#nodeJS

aral, to javascript
@aral@mastodon.ar.al avatar
stvfrnzl, to Astro
@stvfrnzl@mastodon.online avatar

Inspired by @matthiasott great newsletter: has anyone experience implementing #webmentions with @astro?

Here's his article: https://buttondown.email/ownyourweb/archive/issue-14/

And here's what I found but couldn't test yet: https://kld.dev/adding-webmentions/

#ssr #StaticSiteGenerator #astro #html #css #JavaScript #WebDev #Frontend #IndieWeb

stvfrnzl,
@stvfrnzl@mastodon.online avatar

Hey @marcuslindblom, do you have by any chance documented how to make work with ?

I'm no and wizard so I'm currently stuck. Plenty of tutorials out there, but they're not helping me haha

casraf, to typescript
@casraf@fosstodon.org avatar
leanpub, to programming
@leanpub@mastodon.social avatar

P4NR - IoT Programmer https://leanpub.com/b/p4nr-iotprogrammer by Klaus Landsdorf (Iniationware, P4NR), Joel Krec, and Maryam Jalil is the featured bundle on the Leanpub homepage! https://leanpub.com

aral, to programming
@aral@mastodon.ar.al avatar

JSDB 5.0.0 published 🎉

• Custom classes must have a constructor that accepts a parameter object as its only argument. Constructors are run during deserialisation.

• Custom classes can now safely extend other classes (e.g., EventEmitter).

• Properties that begin with an underscore (_) are treated as private and ignored.

• Objects with null prototypes are supported. i.e., objects created with Object.create(null, …).

Full details: https://codeberg.org/small-tech/jsdb#migrating-from-earlier-versions-of-jsdf

aral,
@aral@mastodon.ar.al avatar

JSDB 5.0.1 published 🎉

• Fixes #14: Crash if DataProxy getHandler() called on object with null prototype. (https://codeberg.org/small-tech/jsdb/issues/14)

To install update:

npm install @small/jsdb@5.0.1

Learn more about JSDB:

https://codeberg.org/small-tech/jsdb#javascript-database-jsdb

#JavaScriptDatabase #JavaScript #database JSDB #JSDB5 #NodeJS #SmallTech #SmallWeb #web #dev

aral,
@aral@mastodon.ar.al avatar

JSDB 5.1.0 published¹ 🎉

• Forgetting to pass a custom class that’s persisted in your database in your JSDB.open() call now throws instead of corrupting your database by falling back to using an untyped object.

• Added JSDF ver. 2 to 3 database migration script (i.e., JSDB version 2-4 to 5)²

To install update:

npm install @small/jsdb@5.1.0

¹ https://codeberg.org/small-tech/jsdb/releases

² https://codeberg.org/small-tech/jsdb#version-2-to-3

#JavaScriptDatabase #JavaScript #database JSDB #JSDB5 #NodeJS #SmallTech #SmallWeb #web #dev

andros, to emacs
@andros@hostux.social avatar

I publish a new article: «Creating desktop applications using the Emacs core»
https://programadorwebvalencia.com/creating-desktop-applications-using-the-emacs-core/

In summary, I can use Emacs to create GUIs with an Elisp backend.

mjgardner,
@mjgardner@social.sdf.org avatar

@andros @marcolas The point is your architecture is the same as , replacing embedded and running with embedded running .

So every app using it has all of ’s disadvantages:
• lowest-common-denominator obviously foreign to the host OS
• non-portable shims to integrate with host OS features
• an individually bespoke runtime consuming storage, memory, and compute as if it were a separate virtual machine

mjgardner,
@mjgardner@social.sdf.org avatar

@boo_ @andros I didn’t foresee anyone turning Google’s browser engine V8 (2008) into the server (, 2009) and desktop (, 2013) runtimes that ate the world, but here we are.

And Electron was originally developed for ’s text editor (2008) before they were acquired by in 2018, subsequently discontinued in favor of in 2022.

Don’t tell me what you can’t see happening if you don’t remember what already did

  • All
  • Subscribed
  • Moderated
  • Favorites
  • normalnudes
  • rosin
  • ngwrru68w68
  • GTA5RPClips
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • thenastyranch
  • Youngstown
  • Durango
  • slotface
  • everett
  • vwfavf
  • kavyap
  • megavids
  • Leos
  • khanakhh
  • cisconetworking
  • cubers
  • InstantRegret
  • ethstaker
  • osvaldo12
  • modclub
  • anitta
  • provamag3
  • tacticalgear
  • tester
  • JUstTest
  • All magazines