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

🎉 New Kitten feature: Markdown pages

You can now create .page.md files and use front matter to specify a layout template as well as any other props you want to pass to your layout.

(I’m working on the Kitten web site with docs, etc., so I thought I’d bite the bullet and add this feature this morning to make my life easier. Should make it easier to make this sort of site with Kitten in the future for everyone.)

https://codeberg.org/kitten/app

:kitten: 💕

stefan, to genart
@stefan@stefanbohacek.online avatar

Over the weekend I've updated my award-winning (no joke!) Creative Bots @glitchdotcom starter project to focus on Mastodon bots.

https://stefanbohacek.com/projects/creative-bots

Visit https://botwiki.org/bots/fediverse-bots/ for some inspiration, and then give it a try!

#CreativeBots #CreativeCoding #nodejs #MadeWithGlitch

stefan,
@stefan@stefanbohacek.online avatar

I haven't really touched Twitter's API for over a year now, so it made little sense for me to offer the previous version of the project that also supported Twitter and Tumblr.

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

w00t! 🎉 #Kitten now has a shiny new…

kitten shell

…command you can use to connect to your Kitten daemon in production to debug it, etc.

Also, I don’t know if I missed something simple but I had a hard time handling Node’s #REPL preview completions over a socket connection. Couldn’t find any docs. Managed to fix it by implementing a control channel to communicate the remote client’s terminal size. Wrote it up here, in case it helps anyone else:

https://codeberg.org/aral/gists/src/branch/main/node-js-repl-over-socket-with-preview-completions.md

:kitten:💕

#NodeJS

kubikpixel, to javascript German
@kubikpixel@chaos.social avatar

Es scheint so, als müsste ich mich bei der TypeScript Entwicklung auf @deno_land konzentrieren. Sicherlich, noch mit JSR genutzt, mittlerweile ein Ersatz für @nodejs professionell.

»Deno 1.44 lernt den Umgang mit privaten npm-Registries:
Das Minor Release kann mit privaten npm-Registries sowie gRPC-Verbindungen umgehen und erhöht nochmals die Kompatibilität mit Node.js.«

📰 https://www.heise.de/news/Deno-1-44-lernt-den-Umgang-mit-privaten-npm-Registries-9742970.html
🦕 https://deno.com


#javascript #typescript #denojs #nodejs #webdev #jsr #grpc #dev #npm

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

I do love that buffer.subarray() returns a – checks notes – Buffer instance, not an array, in Node.js. 👀

voxpelli, to programming
@voxpelli@mastodon.social avatar
voxpelli,
@voxpelli@mastodon.social avatar

Turns out that this release of was pretty much exactly one year after I posted about releasing a bunch of modules: https://mastodon.social/@voxpelli/110458882837558787

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

So Kitten’s build process (i.e., the time it takes to build Kitten itself) takes ~0.7 seconds on my ~1 year old desktop (Ryzen 7 5700G 3.8Ghz) vs ~1.4 seconds on my ~3-year-old Starlabs LabTop (renamed to the Starbook thanks to a suggestion by yours truly but sadly, not quickly enough).

So, in summary, it’s bloody fast for something that results in a ~9MB bundle.

(And that’s all thanks to esbuild.)

https://codeberg.org/kitten/app

ryanprior,
@ryanprior@mastodon.social avatar

@aral where does the 9MB live? What's the payload size delivered to the client?

aral,
@aral@mastodon.ar.al avatar

@ryanprior Nope, that’s the app server. It lives on your server.

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

A little detail in the latest :

I find deprecation warnings hit the sweet spot between jarring enough to be annoying and not informative enough to be useful.

So, in Kitten, the first time you hit a deprecation warning, you get a message telling you there are deprecation warnings.

If you care, you can open the interactive shell and view the kitten.deprecationWarnings list, which will show you full details including the stack trace.

:kitten:💕

thylacoleo,
@thylacoleo@mas.to avatar

@aral

Apologies. I let out my inner redditor for a moment.

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

:kitten: 💕

New Kitten update!

Mostly housekeeping:

• Runtime is now Node 22 (22.1.0 as 22.2.0 has a bug that can crash on deprecation warnings). This might be a breaking change for your code (e.g., import…assert is now import…with, etc.) Remember, Kitten is pre-release/not API-versioned yet.

• Applied all semver-compatible dependency version upgrades.

• Fixed tests & coverage. Tests are still woefully inadequate but will improve.

https://codeberg.org/kitten/app

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

gjergjiramku, to programming
@gjergjiramku@mastodon.social avatar

The reason I dislike node/npm

Just cloned three year old project and build fails. Just three years.

Probably a skill issue but how can I make sure that #nodejs projects can withstand time a bit better?

gjergjiramku,
@gjergjiramku@mastodon.social avatar

@davesh could be the solution

But I think the tooling should have more sensible defaults to ensure this.

davesh,
@davesh@hachyderm.io avatar

@gjergjiramku you would think the lock file would pin all the versions of your deps. Either way I agree the ecosystem is a mess.

joelanman, to webdev
@joelanman@hachyderm.io avatar

Got a Playwright question - in my tests I'm clicking a button which in the backend sends an email. I tried to use Jest to mock that function in the backend so it doesn't send an email, but that doesn't seem to work. Should it?

I could check for NODE_ENV in the backend and not send an email, but I'd like access to the email contents in my playwright test, but without actually sending an email.

Am I thinking about this all wrong?

#webdev #nodeJS #playwright

joelanman,
@joelanman@hachyderm.io avatar

I'm thinking maybe if NODE_ENV is test, save emails to a folder instead of actually sending them. Then you can access them from tests

rogerlipscombe,
@rogerlipscombe@hachyderm.io avatar

@joelanman I've done that in the past, yeah.

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

So! Many! Kittens!

(Going to record a demo of the new interactive shell – REPL to some – and multi-page Settings this afternoon, just planning it out now.)

Oh and is that me creating and calling web routes interactively in the REPL on a live server? Why yes, yes it is.

:kitten:💕

#Kitten #SmallWeb #web #dev #HTML #CSS #JavaScript #NodeJS

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

:kitten: Kitten’s interactive shell (REPL) now saves session history scoped to your app so it will still be there when you next serve the same app.

https://codeberg.org/kitten/app#kitten-s-interactive-shell

I think I’m done with the REPL feature now.

Going to take a little break, step away from the computer, and make a plan for the next week of work on Kitten and Domain¹.

¹ https://codeberg.org/domain/app

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

Small update on Kitten’s new interactive shell (REPL). You can now access Kitten’s router via:

kitten.app.router

Also updated the section in the tutorial to fix typos in some of the code examples and use the new router key path:

https://codeberg.org/kitten/app#kitten-s-interactive-shell

:kitten:💕

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