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})  

joelanman,
@joelanman@hachyderm.io avatar

@jscholes ah you're right! I was sure it threw an error but recursive: true doesnt, thanks!

joelanman,
@joelanman@hachyderm.io avatar

you can do this, thanks @jscholes

const filepath = 'a/b'  
fs.mkdirSync(filepath, { recursive: true })  
fs.writeFileSync(filepath + '/c.txt', 'hello')  
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

#Kitten #SmallWeb #EvergreenWeb #StreamingHTML #web #dev #NodeJS #JavaScript

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

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 :(

shortdev,
@shortdev@mastodon.social avatar
khalidabuhakmeh,
@khalidabuhakmeh@mastodon.social avatar

@shortdev it’s still a WIP and not a NuGet package. I found it, but it’s not accessible yet without downloading and building it yourself.

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

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.

4censord,
@4censord@unfug.social avatar

@aral can node tar not create an archive in multiple steps?
with normal tar, i'd just create an archive and add the first files, and then just append the other files to the archive with a tar command with different working directory

Direktory like:

.  
├── file1.txt  
├── file2.txt  
└── folder  
 └── file3.txt  

Commands:
tar cf archive.tar file{1,2}.txt
tar rf archive.tar -C folder file3.txt

Creates an archive like:
$ tar tf archive.tar
file1.txt
file2.txt
file3.txt

aral,
@aral@mastodon.ar.al avatar

@4censord It can but I’m not sure how I’d do that and keep a stream open to the browser (I’m streaming the archive to the HTTP response).

(I don’t want to create intermediary files.)

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.

tanepiper,
@tanepiper@tane.codes avatar

Turns out the answer is DOWNLOAD MORE RAM.

Runners were using 8Gb images, so we bumped it up to 16Gb and all of a sudden no problems and it runs faster

ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • rosin
  • thenastyranch
  • Durango
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • cisconetworking
  • Youngstown
  • mdbf
  • slotface
  • osvaldo12
  • GTA5RPClips
  • kavyap
  • megavids
  • InstantRegret
  • everett
  • cubers
  • vwfavf
  • normalnudes
  • tacticalgear
  • tester
  • ethstaker
  • khanakhh
  • modclub
  • Leos
  • anitta
  • JUstTest
  • All magazines