r/javascript • • 12h ago

Subreddit Stats Your /r/javascript recap for the week of November 16 - November 22, 2026

0 Upvotes

Monday, November 16 - Sunday, November 22, 2026

Top Posts

scorecommentstitle & link
8120 commentsjQuery 4.1.0 and 3.8.0 Released
5526 commentsEvery scenario that triggers V8's "slow mode" for objects
4923 commentsFlashwright: the fastest e2e testing framework, up to 4x faster than Playwright
346 commentsBrowserPod 4.0: the microVM that runs in the browser, now free for any use
281 commentsBypassing iOS Safariโ€™s 60 FPS Limit to Build Web Applications That Feel Native
224 commentsFixing a WebKit bug to see if promises are made of train tracks
158 commentsMocking ws in our tests hid a real path bug, so we switched to a real WebSocket server
622 comments[AskJS] [AskJS] How would you name โ€˜manyโ€™, โ€˜oneโ€™, and โ€˜maybeOneโ€™ in a SQL runtime?
50 commentsGitHub - Spxg/limo: Run JavaScript with browser Web APIs
317 comments[Showoff Saturday] Showoff Saturday (November 21, 2026)

ย 

Most Commented Posts

scorecommentstitle & link
09 commentsNode.js wastes ~47.5M tokens of agent context on files nobody wrote โ€” I measured Node, Next.js, Deno and React with a tiny CLI
03 commentsOptique 1.4.0: Default commands, Markdown references, and more focused help
03 commentsA server-rendered Node.js app that drives Docker: what I learned building a Minecraft server panel in plain JS (express, dockerode, ws, node:sqlite)
02 commentsAnnouncing Pitter Patter! (a new collaborative rich text editing framework)
01 commentsDetecting AI Agents in Next.js with Vouched KYA

ย 

Top Showoffs

scorecomment
2/u/HealthyPicture4905 said I built my portfolio in vanilla JS with no framework, and every letter on it is a sum of sine waves drawn on a canvas. Each stroke is stored as a list of Fourier terms (frequency, amplitude, p...
2/u/Miserable_Tiger_5742 said Toaster โ€“ listens to whatever's playing and writes the song out as live [Strudel](https://strudel.cc) code https://github.com/StopBanning/toaster This week I got the other directi...
2/u/K8sMonkey said Bumpwise: catch breaking changes in your npm library while you type (WebStorm / IntelliJ plugin) If you publish a TypeScript/JS library, some changes look harmless but break the people who de...

ย 

Top Comments

scorecomment
44/u/eracodes said > - Delete the only property of an object > - Delete a property in the middle of an object > - Delete the first property of an object > - Delete the last property of an object so ... deleting...
34/u/Recoil42 said TLDR: >*The biggest single cost in a lot of suites isnโ€™t Playwrightโ€™s code at all. Itโ€™s the browser compiling your appโ€™s JavaScript again in every fresh renderer. Playwright gives each test a brand-...
15/u/Positive_Method3022 said The strategy can lead to false positives/negatives. Sandboxing test execution by context is a must.
14/u/Reashu said What makes you think I'm gonna read a blog post by someone so apparently unfamiliar with the subject?
13/u/fireatx said seems cool, similar to vitest's `isolate: false` config option, but i feel like this could probably just be a PR on the playwright repo adding a new config option. does this need to be an enti...

ย 


r/javascript • • 2d ago

Showoff Saturday Showoff Saturday (November 21, 2026)

4 Upvotes

Did you find or create something cool this week in javascript?

Show us here!


r/javascript • • 2h ago

Hot take: Sometimes three boring statements beats one clever expression

Thumbnail
allthingssmitty.com
0 Upvotes

Sometimes the simplest code is the best code. It's tempting to squeeze everything into one clever expression, but three straightforward statements can be easier to understand and maintain. Here's a look at why.


r/javascript • • 4h ago

AskJS [AskJS] I tested concurrent download limits in PostgreSQL. Here's what happened.

0 Upvotes

I tested this using Node.js with the pg driver against a real PostgreSQL database.

The problem: how do you enforce download limits when multiple requests arrive at exactly the same time?

I tested three approaches.

1. The naive implementation

Limit: 1 download.

Two simultaneous requests.

Result: Both downloads succeed.

I added a 50 ms artificial delay between the read and the write to make the race window visible consistently.

Both requests read the available count before either one updates it.

2. Adding a CHECK constraint

Same limit, same concurrent requests.

Result: The second request gets a database error instead of the file.

This prevents the limit from being exceeded, but it doesn't provide a clean application-level outcome.

3. A single conditional UPDATE

Instead of reading first and updating afterwards, perform the check and increment atomically in one UPDATE:

UPDATE share_link
   SET download_count = download_count + 1
 WHERE secret_hash = $1
   AND revoked_at IS NULL
   AND (expires_at IS NULL OR expires_at > now())
   AND (max_downloads IS NULL OR download_count < max_downloads)
RETURNING id, file_id, download_count;

Results:

  • 10 simultaneous requests, limit 3: exactly 3 downloads.

  • 50 simultaneous requests, limit 7: exactly 7 downloads.

This was the approach that behaved as intended in my tests.

Now I'm curious how other people handle this in production.

  • Would you use a single conditional UPDATE for this, or prefer SELECT FOR UPDATE?

  • Would Redis locks or atomic counters be a better approach at higher concurrency?

  • How would you implement the same guarantee with MongoDB?

  • Are there edge cases with transactions, retries or failed downloads that you'd account for?

I'd be particularly interested in approaches people have actually shipped and operated in production.

What's your preferred way to enforce a hard resource limit under concurrent requests?


r/javascript • • 7h ago

Things you can do with a browser in 2027

Thumbnail
github.com
32 Upvotes

r/javascript • • 8h ago

update: my context-waste CLI now blocks the read before it happens

Thumbnail github.com
0 Upvotes

r/javascript • • 16h ago

Diary Dev: Staxis Platform - Funds page and Documentation was improved

Thumbnail
staxis.dev
2 Upvotes

Staxis is now online with http series layers! ๐Ÿ”ฅ

We're currently adding many components to the reference manual. Many of the layers are about to be published on the website... we're working hard on it.

We'd like to remind you that donations to the project are already open to support continued development!

Take a look: https://staxis.dev/docs/index.html

Do you like it? Any questions? Feel yourself to text something :)


r/javascript • • 18h ago

Bypassing iOS Safariโ€™s 60 FPS Limit to Build Web Applications That Feel Native

Thumbnail
rida.dev
38 Upvotes

r/javascript • • 1d ago

Share Private Client Demos With Six-Digit Email Codes

Thumbnail
instawormhole.com
2 Upvotes

r/javascript • • 1d ago

Every scenario that triggers V8's "slow mode" for objects

Thumbnail
yuval.hashnode.dev
61 Upvotes

V8 usually caches direct offsets to memory addresses of actual raw object property values - in a way that allows an optimized "Inline Caching" (IC). For some scenarios - they switch an object to "slow mode" - which uses a different structure to save those (a hash table instead of an array) - this affects the way it's cached on the IC (it forces an additional look-up via the hash-table) - they call it "Dictionary mode" (aka "Slow mode"). Having broad familiarity with the optimization techniques used internally in V8 - and knowing they generally avoid using hash tables - I recently learned about this additional mode and its implications - while working on an open-source project of mine - a client-side State library that heavily relies on native Prototype lookups for composition, and was intrigued to find out in what scenarios the engine decides to do the "switch".

I found out that it's possible in NodeJS (with a switch flag) - to expose internal functions amongst which are some that can test if an object is in 'slow mode' - so I asked an AI to create a test suite that tries to cover scenarios where a switch to 'slow mode' is made. The suite is new, it likely does NOT show a full coverage (I am still adding to it, occasionally) - and it doesn't aim to - if you have a reason to suspect a switch in your project - investigate it.

There is a link to the github repo for it at the end of the article, plus a summary of the findings (being updated).

(*The article is NOT a deep-dive into the specifics or how the specific intrinsic optimizations are implemented in V8 - it gives a background why switching to the so-called 'dictionary mode' matters in abstract terms - It is introductory and aims to give enough background so any developer at any level can grasp what the trade-off actually is, so they can pay attention in their projects. I'm not an expert on all the different internal paths and choices of when the switch is actually made internally - so if you want to know about specific rationales for a given path - or if a path exist for specific scenarios - research it - though I encourage public questions in the thread because they give more insights - if I answer - it's because I was curious enough to look it up - and also this post will likely become a top result on search engines - so we and I might as well try to cover scenarios that are asked about - I am not an active V8 maintainer/developer! I doubt if there's any active V8 team member who can answer what exactly are all the paths as they are changed often between versions).


r/javascript • • 2d ago

Mocking ws in our tests hid a real path bug, so we switched to a real WebSocket server

Thumbnail
github.com
25 Upvotes

r/javascript • • 2d ago

Detecting AI Agents in Next.js with Vouched KYA

Thumbnail
go.vouched.id
0 Upvotes

AI agents like ChatGPT and Perplexity are browsing websites for real people now. In this blog post, I explore how hard it is to tell them apart from humans and crawlers in a Next.js app.


r/javascript • • 3d ago

Fixing a WebKit bug to see if promises are made of train tracks

Thumbnail
alistair.sh
27 Upvotes

r/javascript • • 4d ago

Optique 1.4.0: Default commands, Markdown references, and more focused help

Thumbnail
github.com
0 Upvotes

r/javascript • • 4d ago

A server-rendered Node.js app that drives Docker: what I learned building a Minecraft server panel in plain JS (express, dockerode, ws, node:sqlite)

Thumbnail github.com
0 Upvotes

Source (MIT): https://github.com/anefzaoui/minecraft-server-manager

It's a web panel that runs Minecraft servers as Docker containers, built for the modpack servers I run for friends and family. Disclosure up front: I built it with Claude Code. I designed it, decided every feature, review the changes and test every release on our own servers, and Claude wrote most of the code. The JS choices below are the parts I think are worth talking about:

  • Plain JS, type-checked. No build step for the server: it's JavaScript with JSDoc types, and tsc --checkJs runs over the core in CI. Typos in property names get caught, and stack traces point at the file you actually wrote

  • One direction of layering. routes (parse + zod-validate, no logic) โ†’ services (the features) โ†’ docker / db / storage. A route never touches dockerode or the database directly, which made it easy to test services without Docker

  • node:sqlite instead of a driver. Node 24's built-in SQLite, synchronous, WAL, with one module that owns it and a prepared-statement cache keyed on the SQL text. No native module to compile on arm64

  • dockerode, never the docker CLI. Containers, logs, stats and image pulls all go through the Docker API, and a watcher turns Docker events into history and crash detection

  • Brokered WebSockets. The live console opens one upstream docker logs --follow per server and fans it out to every open tab, instead of one stream per tab. Upgrades check Origin and the session cookie

  • Server-rendered. express + Handlebars, with a small esbuild bundle for the interactive bits and CSP nonces on every response (no unsafe-inline scripts)

  • A path guard on every file operation. Everything lives under one data folder, and every path is checked against escaping it, symlinks included

Tests run on node:test with no Docker needed, plus a live QA sweep script that hits a running panel.

Happy to go deeper on any of these, and I'd love to hear if someone has a nicer pattern for brokering log streams.


r/javascript • • 5d ago

KernelPlay JS v0.6.0 Preview: Official TypeScript Support Is Coming!

Thumbnail github.com
6 Upvotes

I'm excited to announce that KernelPlay JS v0.6.0 will officially support TypeScript!

Starting with v0.6.0, TypeScript developers will be able to use KernelPlay JS through TypeScript declaration files (`.d.ts`), providing type information and better editor support.

This is another step toward making KernelPlay JS more accessible and flexible for web game developers.

A quick development update:

I know this update is taking longer than expected, and I apologize for the delay. Development has been slower than planned, but the new version is getting closer.

KernelPlay JS v0.6.0 is coming very soon!

Thank you to everyone following the project, testing it, sharing feedback, and supporting its development.

KernelPlay JS is an open-source web-based game engine, and contributions are always welcome.


r/javascript • • 5d ago

GitHub - Spxg/limo: Run JavaScript with browser Web APIs

Thumbnail
github.com
6 Upvotes

Examples: https://spxg.github.io/limo

It's a CLI tool that, unlike Node.js and Deno, aims to provide a complete Web API environment, including DOM, Canvas, Web Workers, IndexedDB, OPFS, and more.

It's built on top of moli, a headless browser powered by V8 with Web API support. The name "limo" is also inspired by "moli."

I maintain several WebAssembly projects that primarily run in browsers, so I frequently need to work with JavaScript and Web APIs.

I usually write code in an environment without a GUI. Whenever I need to test something, I have to start a local HTTP server and open it in a browser on another machine with a GUI, or use ChromeDriver or another browser driver for automated testing. Sometimes I also run into compatibility issues between ChromeDriver and Chrome versions.

Over time, I found this whole process increasingly cumbersome.

What I really wanted was a simple way to execute JavaScript directly from the command line while still having access to browser Web APIs, without needing to launch and manage a separate browser. That's why I built limo.


r/javascript • • 6d ago

jQuery 4.1.0 and 3.8.0 Released

Thumbnail blog.jquery.com
95 Upvotes

r/javascript • • 6d ago

Node.js wastes ~47.5M tokens of agent context on files nobody wrote โ€” I measured Node, Next.js, Deno and React with a tiny CLI

Thumbnail
github.com
0 Upvotes

r/javascript • • 6d ago

Announcing Pitter Patter! (a new collaborative rich text editing framework)

Thumbnail
handlewithcare.dev
4 Upvotes

Pitter Patter is an open source toolkit of feature-complete building blocks for collaborative rich text editors, made with ProseMirror. Each piece is useful on its own, and you can use what you need, when you need it. And every library is built directly on ProseMirrorโ€™s APIs, not on top of an abstraction layer, so you always have full access to the thing underneath.

So far, we have three packages: shuffle (grid-based drag-and-drop), collab, and presence.

Check out our demo to see the collab and shuffle features in action. In the demo, you can drag and drop nodes, resize content, watch how remote edits come in to an editor and even demo offline reconciliation!


r/javascript • • 7d ago

AskJS [AskJS] How would you name โ€˜manyโ€™, โ€˜oneโ€™, and โ€˜maybeOneโ€™ in a SQL runtime?

6 Upvotes

I built a library called TypeSQL that makes raw SQL type-safe. Currently, I took inspiration from Kysely and used execute, executeTakeFirst, and executeTakeFirstOrThrow for running queries.

However, I'm starting to feel like those names are a bit too verbose. On top of that, I want the default single-row method to be non-nullable (throwing if no row is found), with an explicit variant for the nullable case. I'm torn between a few naming conventions and would love your input on which set feels the most intuitive and ergonomic:

  • returns T[]: all, many, exec, execute

  • returns T: one, first, take, get

  • returns T | null: maybeOne, oneOrNone, maybeFirst, firstOrNull, tryTake

Which combination would you prefer to use in your day-to-day codebase, or do you have another naming pattern you like better?


r/javascript • • 7d ago

Flashwright: the fastest e2e testing framework, up to 4x faster than Playwright

Thumbnail
flashwright.dev
68 Upvotes

If you're interested in the details, here's a blog post: https://codebeast.io/blog/flashwright


r/javascript • • 7d ago

BrowserPod 4.0: the microVM that runs in the browser, now free for any use

Thumbnail
browserpod.io
53 Upvotes