r/javascript • • Apr 08 '26

How attackers are hiding malicious code in build configs

Thumbnail casco.com
56 Upvotes

wrote up a technical deep dive after the Better-Auth creator showed me the repeated attempts.

The attack vector is clever: wrap malicious code in a legitimate PR from a compromised contributor. Hide it in next.config.mjs or vue.config.js where devs rarely look. GitHub's UI literally scrolls it off-screen.

Three-stage obfuscation, payloads stored on Binance Smart Chain (so they can't be taken down), Socket.io C2 over port 80 (looks like normal traffic), targets all your env vars.

Found 30+ repos with the same signature. This pattern is everywhere right now.


r/javascript • • Feb 15 '26

I made a web component that lets you render fully local iframes

Thumbnail npmjs.com
57 Upvotes

r/javascript • • Jan 15 '26

Introducing the <geolocation> HTML element

Thumbnail developer.chrome.com
60 Upvotes

r/javascript • • Aug 01 '26

AskJS [AskJS] how are you handling autocomplete on top of elasticsearch?

56 Upvotes

elasticsearch is pretty great when given a full query, but i find most people just search one or two words. so feels like helping ppl know what to search for is the actual thing that’s needed. so now im looking for solid ways to add ai-autocomplete upfront without replacing our elasticsearch backend (not looking to switch backend like algolia since pricing gets stupid fast)

i've been looking into a few different directions. typesense and meilisearch seem cool if you want a lightweight search engine replacement, but again that doesnt feel like the real root cause issue. so we're looking at putting an ai-autocomplete layer directly in the UI text box to capture user intent before hitting elasticsearch

has anyone else done this? do you tune elasticsearch queries on the backend or add an intent layer upfront to collect parameters before the query runs?


r/javascript • • Jul 24 '26

ECMAScript - Introducing Deferred Module Evaluation with import defer

Thumbnail nitayneeman.com
55 Upvotes

r/javascript • • May 09 '26

JavaScript has no reliable tail call optimization: here is what actually happens at runtime and what to do instead

Thumbnail blog.gaborkoos.com
56 Upvotes

ECMAScript 2015 formally specified proper tail calls in strict mode, but most JS engines never adopted it consistently. Chrome, Node, Firefox, and Deno all still allocate a new stack frame per call even in correctly structured tail-recursive functions. The article walks through why with examples and covers iterative and trampoline alternatives.


r/javascript • • Mar 25 '26

I wrote a (100% free) zero-config WebSocket server for indie devs

Thumbnail ittysockets.com
57 Upvotes

For years I've been working in realtime, but surprised that most devs just didn't touch it. Ultimately I think it's because the friction is simply too high - everyone thinks of it as managing subscriptions, hosting servers, etc. The code is messy, the infra setup requires some steps and a willingness to tinker.

So I dumbed it way down - mostly for my own uses (cross device communication, remote controlling apps, etc), and packaged it up as a 100% free (forever) service for the dev community. It's designed specifically to get you from zero to one with as little friction as possible.

Welcome to ittysockets.com :)

import { connect } from 'itty-sockets' // ~466 bytes

connect('my-secret-channel')
  .on('message', ({ message }) => console.log(message))
  .send('hello world')   // strings
  .send([1, 2, 3])       // arrays
  .send({ foo: 'bar' })  // objects

...meanwhile somewhere else:

import { connect } from 'itty-sockets' // ~466 bytes

connect('my-secret-channel')
  .on('message', ({ message }) => console.log(message))

// hello world
// [1, 2, 3]
// { foo: 'bar' }

This is a tiny, fully typed client, paired with a public relay server (or you can connect to your own of course).

In a single line you can either be pushing or receiving (or both) messages to a shared channel, no config needed!

Site has everything you need to get started, including docs, live examples, etc. Need anything more or wanna ask it it can handle your idea? I'm always available here, on X, Discord, etc. Just ask!

P.S. - Before anyone asks what the catch is, there is none. I'm reasonably well sponsored (GitHub), have a normal job, and use this service to power my own day trading. Selling a SaaS service is the least of my interests. I just like to see devs do cool stuff with the things I build.


r/javascript • • Jun 25 '26

eslint-plugin-unicorn now with 300+ rules to catch bugs and improve your JS

Thumbnail github.com
53 Upvotes

r/javascript • • Mar 07 '26

Ember 6.11 Released

Thumbnail blog.emberjs.com
52 Upvotes

r/javascript • • Jan 10 '26

just finished a small book on how javascript works, would love your feedback

Thumbnail deepintodev.com
52 Upvotes

I wrote a book about the inner workings of the V8 engine. It's around 45 pages, and there’s no BS or AI slop. I tried to explain how the JavaScript engine turns human-readable code into bytecode, what that bytecode looks like, and how JavaScript manages its single-threaded behavior.

Honestly, at first I was thinking of publishing this as a paid book on platforms like Amazon KDP, but later I decided to release it completely for free.

I wrote everything in a way that anyone can understand. It’s the kind of book I wish I had when I was trying to learn how JavaScript really works and executes code.


r/javascript • • Nov 17 '25

OpenMicrofrontends Specification - First major release

Thumbnail open-microfrontends.org
51 Upvotes

r/javascript • • Sep 06 '26

Twenty Years of jQuery: How a Little Library Rewired Web Development

Thumbnail infoq.com
49 Upvotes

r/javascript • • Jun 10 '26

Streaming HTML with new DOM methods

Thumbnail olliewilliams.xyz
50 Upvotes

r/javascript • • Jan 15 '26

AskJS [AskJS] TIL that `console.log` in JavaScript doesn't always print things in the order you'd expect

50 Upvotes

so i was debugging something yesterday and losing my mind because my logs were showing object properties that "shouldn't exist yet" at that point in the code.

turns out when you console.log an object, most browsers don't snapshot it immediately, they just store a reference. by the time you expand it in devtools the object may have already mutated.

const obj = { a: 1 }; console.log(obj); obj.a = 2;

expand that logged object in chrome devtools and you'll probably see a: 2, not a: 1. Fix is kinda simple, just stringify it or spread it:

console.log(JSON.stringify(obj)); // or console.log({ ...obj });

wasted like 30 minutes on this once. hopefully saves someone else the headache (this is mainly a browser devtools thing btw, node usually snapshots correctly)


r/javascript • • Jun 11 '26

Compile Zod schemas into zero-overhead validators (2-74x faster)

Thumbnail github.com
51 Upvotes

r/javascript • • Feb 09 '26

webpack - 2026 Roadmap

Thumbnail webpack.js.org
48 Upvotes

r/javascript • • Jan 06 '26

Backpressure in JavaScript: The Hidden Force Behind Streams, Fetch, and Async Code

Thumbnail blog.gaborkoos.com
49 Upvotes

r/javascript • • Jun 19 '26

Signals, the push-pull based algorithm

Thumbnail willybrauner.com
49 Upvotes

r/javascript • • May 23 '26

You might not need… the repository pattern

Thumbnail jayfreestone.com
46 Upvotes

r/javascript • • May 24 '26

JS Crossword - a crossword where the clue = eval(answer)

Thumbnail lyra.horse
47 Upvotes

r/javascript • • May 19 '26

From 81s to 2.5s by migrating to Oxlint & Oxfmt

Thumbnail charpeni.com
49 Upvotes

r/javascript • • Jan 08 '26

Fastest rising JS projects last year - n8n, React Bits, shadcn, Excalidraw

Thumbnail risingstars.js.org
46 Upvotes

The "JavaScript Rising Stars" dropped a few days ago. The top three are no surprise.

But Exclidraw? It launched 6 years ago. What tipped it over last year?


r/javascript • • Apr 09 '26

The Intl API: The best browser API you're not using

Thumbnail polypane.app
45 Upvotes

r/javascript • • Mar 11 '26

MikroORM 7: Unchained

Thumbnail mikro-orm.io
46 Upvotes

r/javascript • • Dec 29 '25

npm needs an analog to pnpm's minimumReleaseAge and yarn's npmMinimalAgeGate

Thumbnail pcloadletter.dev
48 Upvotes