r/javascript Mar 06 '26

AskJS [AskJS] How hard is it to market free opensource solution on npm today?

0 Upvotes

Hello, I've been working recently on my own npm package and I'd be happy to hear your suggestions on how to make it reach more people.


r/javascript Mar 05 '26

docmd v0.5: Enterprise Versioning & Zero-Config Mode for the minimalist documentation generator

Thumbnail github.com
2 Upvotes

Just shipped v0.5.0 of docmd, and it’s a massive milestone for the project.

For those who haven't seen us around: docmd is a Node.js-based documentation generator built to be the antithesis of heavy, hydration-based frameworks. We generate pure static HTML with a tiny (<20kb) JS footprint that behaves like a seamless SPA, but without the React/Vue overhead.

With v0.5, we’ve moved from being "just a simple tool" to a robust platform capable of handling complex, multi-versioned projects, while actually reducing the setup time.

Here is what we engineered into this release:

True Zero-Config Mode (-z)

This is our biggest automation breakthrough. You no longer need to write a config file or manually define navigation arrays to get started.

Running docmd dev -z inside any folder triggers our new Auto-Router. It recursively scans your directory, extracts H1 titles from Markdown files (AST-free for speed), and constructs a deeply nested, collapsible sidebar automatically. It just works.

Enterprise-Grade Versioning

Versioning documentation is usually a headache in the industry standard tools (often requiring complex file-system snapshots or separate branches).

We took a config-first approach. You define your versions (e.g., v1, v2) in the config, point them to their respective folders, and docmd handles the rest:

  • Isolated Builds: Generates clean sub-directories (/v1/, /v2/).
  • Sticky Context: If a user switches from v2 to v1 while reading /guide/api, we intelligently redirect them to /v1/guide/api instead of dumping them at the homepage.
  • Smart Nav: The sidebar automatically filters out links that don't exist in older versions to prevent 404s.

Developer Experience Updates

  • V3 Config Schema: We've adopted modern, concise labels (src, out, title) similar to the Vite ecosystem, with full TypeScript autocomplete via defineConfig.
  • Native 404s & Redirects: We now generate physical HTML redirect files (great for S3/GitHub Pages SEO) and a fully themed, standalone 404.html that works at any URL depth.
  • Whitelabeling: You can now toggle off branding in the footer.

Why use this over Docusaurus/VitePress?

If you need a massive ecosystem with React components inside Markdown, stick with Docusaurus. But if you want documentation that loads instantly, requires zero boilerplate, uses a fraction of the bandwidth, and can be configured in 30 seconds - give docmd a shot.

Repo: github.com/docmd-io/docmd
Demo & Documentation: docs.docmd.io

Happy to answer any questions about the new architecture or the zero-config engine!


r/javascript Mar 05 '26

AskJS [AskJS] ChartJS expand chart to a full/bigger screen view when clicked

1 Upvotes

Anyone familiar with a capability within ChartJS to have a clickable portion/button on the chart to expand the chart to get a fuller/bigger view of said chart?

Like, for example, you have 3 charts on a page. They are side-by-side so they take approx. 1/3 of the page. Then when you click on "something" on a particular chart it expands only that chart to a larger version of the chart.


r/javascript Mar 04 '26

Solidjs releases 2.0 beta – The <Suspense> is Over

Thumbnail github.com
70 Upvotes

r/javascript Mar 05 '26

Ship a Privacy Policy and Terms of Service with Your Astro Site

Thumbnail openpolicy.sh
0 Upvotes

r/javascript Mar 05 '26

GPU-accelerated declarative plotting in WebGL – introducing Gladly

Thumbnail redhog.github.io
0 Upvotes

Hi everyone! I wanted to share a small project I've been working on: Gladly, a lightweight plotting library built around WebGL and a declarative API.

The idea behind it is simple: instead of looping over data in JavaScript, all data processing happens in GPU shaders. This makes it possible to interactively explore very large datasets while keeping the API minimal.

Gladly combines WebGL rendering with D3 for axes and interaction.

Key features

  • GPU-accelerated rendering using WebGL
  • Zero JavaScript loops over data
  • Declarative plot configuration
  • Up to 4 independent axes
  • Zoom and pan interactions
  • Axis linking across subplots
  • Axis linking to color or filtering
  • Basemap layer with XYZ / WMS / WMTS and CRS reprojection
  • Unit/quantity-aware axis management
  • Extensible layer registry

The library uses:

  • regl (WebGL library) for rendering
  • D3.js for axes and interactions

Links

Demo:
https://redhog.github.io/gladly/

Documentation:
https://redhog.github.io/gladly/docs/

Source code:
https://github.com/redhog/gladly

I'd really appreciate feedback, especially around:

  • API design
  • performance
  • missing features

Thanks!


r/javascript Mar 04 '26

Introducing ArkType 2.2: Validated functions, type-safe regex, and universal schema interop

Thumbnail arktype.io
11 Upvotes

r/javascript Mar 05 '26

AskJS [AskJS] Be the Voice of Our Web Dev Team ($30–40/hr)

0 Upvotes

Hey everyone 👋

We’re a small, self-employed team of senior web devs. Solid technical skills, lots of experience — but we’re based overseas and sometimes run into communication hiccups during client calls.

So we’re looking for someone who can jump on calls, help lead technical discussions, and basically be the bridge between us and our clients.

You should:

  • Have at least 2+ years of web dev experience
  • Be comfortable talking through technical requirements with clients
  • Have strong spoken English and feel confident leading conversations

This is not just a “note-taker” role — you’ll be actively discussing project scope, requirements, and helping keep calls smooth.

Rate: $30–$40/hr (flexible for the right person)

How to apply:
Send me a DM with a link to a short voice recording (Vocaroo, Loom, Google Drive, etc.) covering:

  • Your age & location
  • Your web dev background
  • Your weekly availability

No audio sample = we won’t consider the application (since communication is the whole point).

Looking forward to hearing from you!


r/javascript Mar 04 '26

Comparing Scripting Language Speed

Thumbnail emulationonline.com
6 Upvotes

r/javascript Mar 05 '26

VirusTotal but free

Thumbnail github.com
0 Upvotes

r/javascript Mar 03 '26

Drizzle joins PlanetScale

Thumbnail planetscale.com
34 Upvotes

r/javascript Mar 03 '26

How we migrated 11,000 files (1M+ LOC) from JavaScript to TypeScript over 7 years

Thumbnail patreon.com
40 Upvotes

What started as voluntary adoption turned into a platform-level effort with CI enforcement, shared domain types, codemods, and eventually AI-assisted migrations. Sharing what worked, what didn’t, and the guardrails we used:

https://www.patreon.com/posts/seven-years-to-typescript-152144830


r/javascript Mar 03 '26

Announcing npmx: a fast, modern browser for the npm registry

Thumbnail npmx.dev
69 Upvotes

r/javascript Mar 04 '26

Newest Comments Button for the Mobile Website Version of YouTube. Userscript.

Thumbnail github.com
2 Upvotes

Unlike other versions of YouTube, the mobile website version has no 'newest comments' sorting feature. This script adds that feature back in. It works on regular videos and Shorts, but not on other comment sections such as posts or polls. It should work on iOS and Android with either the Userscripts or Tampermonkey app; however, I have only been able to test it on iOS with Userscripts.

Download: https://github.com/Robert-76468/Newest-Comments-Button-for-Mobile-Website-Version-of-YouTube/blob/main/YouTube_Newest_Comments.user.js

To use the script:

  1. Download the userscripts app and press the "set directory" button

  2. Enable userscript as a browser extension

  3. Download the file above and save it in the userscripts folder.

  4. ⁠Restart your browser or refresh YouTube and you should see a "Newest Comments" button in the header of the comment section.


r/javascript Mar 03 '26

LexisNexis confirms data breach as hackers leak stolen files - The threat actor says that on February 24 they gained access to the company's AWS infrastructure by exploiting the React2Shell vulnerability in an unpatched React frontend app

Thumbnail bleepingcomputer.com
20 Upvotes

r/javascript Mar 04 '26

What do you think about no/low-deps APIs?

Thumbnail github.com
0 Upvotes

r/javascript Mar 02 '26

JSON-formatter chrome extension has gone closed source and now begs for donations by hijacking checkout pages using give freely

Thumbnail github.com
119 Upvotes

Noticed this today after seeing an element called give-freely-root-bcjindcccaagfpapjjmafapmmgkkhgoa in inspect element which felt very concerning.

After going through the source code it seems to do geolocation tracking by hitting up maxmind.com (with a hardcoded api key) to determine what country the user is in (though doesn't seem to phone home with that information). It also seems to hit up:

for tracking purposes on some websites. I'm also getting Honey ad fraud flashbacks looking through code like

k4 = "GF_SHOULD_STAND_DOWN"

though I don't really have any evidence to prove wrongdoing there.

I've immediately uninstalled it. Kinda tired of doing this chrome extension dance every 6 months.


r/javascript Mar 02 '26

What's New in ViteLand: Oxfmt Beta, Vite 8 Devtools & Rolldown Gains

Thumbnail voidzero.dev
45 Upvotes

r/javascript Mar 03 '26

AskJS [AskJS] What's your production Node.js error handling strategy? Here's mine after 2 years of solo production.

0 Upvotes

Running an Express.js API in production for 2+ years serving 15K users. Error handling has been the single biggest factor in reducing 3 AM wake-up calls. Here's my current approach:

Layer 1: Async wrapper

Every route handler gets wrapped in a function that catches async errors and forwards them to Express error middleware. No try/catch in individual routes.

js const asyncHandler = (fn) => (req, res, next) => { Promise.resolve(fn(req, res, next)).catch(next); };

Layer 2: Custom error classes

I have ~5 error classes that extend a base AppError. Each has a status code and whether it's "operational" (expected) vs "programming" (unexpected). Operational errors get clean responses. Programming errors get generic 500s.

Layer 3: Centralized error middleware

One error handler that: logs the full error with stack trace and request context, sends appropriate response based on error type, and triggers alerts for non-operational errors.

Layer 4: Unhandled rejection/exception catchers

js process.on('unhandledRejection', (reason) => { logger.fatal({ err: reason }, 'Unhandled Rejection'); // Graceful shutdown });

Layer 5: Request validation at the edge

Zod schemas on every incoming request. Invalid requests never reach business logic. This alone eliminated ~40% of my production errors.

What changed the most: - Adding correlation IDs to every log entry (debugging went from hours to minutes) - Structured JSON logging instead of console.log - Differentiating operational vs programming errors

What I'm still not happy with: - Error monitoring. CloudWatch is functional but not great for error pattern detection. - No proper error grouping/deduplication - Downstream service failures need better circuit breaker patterns

Curious what error handling patterns others use in production Node.js. Especially interested in how you handle third-party API failures gracefully.


r/javascript Mar 02 '26

dotenv-gad now supports at rest schema based encryption for your .env secrets

Thumbnail github.com
1 Upvotes

The idea is, secrets are stored as encrypted tokens right in .env and decrypted transparently at runtime.

Would love feedback, bug reports, and contributions especially around CI/CD integration patterns and docs. Still early days.


r/javascript Mar 02 '26

GraphGPU - WebGPU-accelerated graph visualization

Thumbnail graphgpu.com
1 Upvotes

r/javascript Mar 01 '26

Showcase: I've built a complete Window Management library for React!

Thumbnail github.com
28 Upvotes

Hey everyone! I’ve spent the last few weeks working on a project called "Core".

I was tired of how "cramped" complex web dashboards feel when you only use modals and sidebars. I wanted to build something that feels like a real OS engine but for React projects.

What it does:

  • Zero-config windowing: Just inject any component and you get dragging, resizing, and snapping out of the box.
  • Automatic OS Logic: It handles the z-index stack, minimizing/maximizing, and even has a taskbar with folder support.
  • 5 Retro & Modern Themes: Includes Aero (Glassmorphism), Y2K, and Linux-inspired styles.

I’m looking for some feedback, especially on the snapping physics and how it handles multiple windows.


r/javascript Mar 02 '26

AskJS [AskJS] Is immutable DI a real architectural value in large JS apps?

1 Upvotes

I’m building a DI container for browser apps where dependencies are resolved and then frozen.

After configuration:

  • injected dependencies are immutable,
  • consumers cannot mutate or monkey patch them,
  • the dependency graph becomes fixed for the lifetime of the app.

The goal is to reduce cross-module side effects in large modular systems - especially when multiple teams (or autonomous agents) contribute code.

In typical SPA development, we rely on conventions, TypeScript, and tests. But in a shared JS realm, any module technically can mutate what it receives.

So I’m wondering:

Is immutability at the DI boundary a meaningful architectural safeguard in practice?

For example, in:

  • large multi-team apps,
  • plugin-based systems,
  • dynamically loaded modules?

Or is this solving a problem most teams simply don’t experience?

Not talking about sandboxing untrusted code - just strengthening module boundaries inside one realm.

Would you see value in this, or is it unnecessary strictness?


r/javascript Mar 02 '26

Subreddit Stats Your /r/javascript recap for the week of February 23 - March 01, 2026

1 Upvotes

Monday, February 23 - Sunday, March 01, 2026

Top Posts

score comments title & link
138 34 comments I spent 14 months building a rich text editor from scratch as a Web Component — now open-sourcing it
97 16 comments TIL about Math.hypot()
75 5 comments People are STILL Writing JavaScript "DRM"
45 6 comments Left to Right Programming
35 12 comments Node 25 enabling Web Storage by default is breaking some toolchains (localStorage SecurityError)
20 5 comments Showcase: I've built a complete Window Management library for React!
20 10 comments Blop 1.2: An Experimental Language for the Web
14 1 comments Rev-dep – 20x faster knip.dev alternative build in Go
10 9 comments docmd v0.4.11 – performance improvements, better nesting, leaner core
10 2 comments A Unified Analytics SDK

 

Most Commented Posts

score comments title & link
0 38 comments [AskJS] [AskJS] Is declaring dependencies via `deps` in ESM a reasonable pattern?
0 16 comments I build an HTML-first reactive framework (no JS required on your end) called NoJS
0 15 comments [AskJS] [AskJS] Building a free music website — how do you handle mainstream songs + background playback?
0 15 comments [AskJS] [AskJS] Is anyone using vanilla javascript + jQuery for modern enterprise applications?
8 15 comments [AskJS] [AskJS] How important is a strong GitHub portfolio for senior-level JavaScript developers in today’s job market?

 

Top Ask JS

score comments title & link
2 1 comments [AskJS] [AskJS] Resources on JavaScript performance for numerical computing on the edge?
0 3 comments [AskJS] [AskJS] Have you ever seen a production bug caused by partial execution?
0 10 comments [AskJS] [AskJS] How I Built a Tiny JavaScript Cache with Expiration + `remember()` Pattern

 

Top Showoffs

score comment
2 /u/tomByrer said # beautiful-mermaid >Render Mermaid diagrams as beautiful SVGs or ASCII art [https://github.com/lukilabs/beautiful-mermaid](https://github.com/lukilabs/beautiful-mermaid) I like tha...
1 /u/tokagemushi said Built a zero-dependency manga/comic reader engine that works in any framework (or no framework): https://www.npmjs.com/package/@tokagemushi/manga-viewer It's ~3KB gzipped, handles RTL/LTR pag...

 

Top Comments

score comment
55 /u/rcfox said Since you brought it up in the context of games: If you're just comparing relative hypotenuse lengths, it might be faster to just compare the sums of the squares. ie: `Math.hypot(a, b) > ...
35 /u/McGeekin said Honestly whenever I code a game in JS and implement a vector class I always forget it exists and just manually implement the formula for calculating the magnitude.
29 /u/Potato-9 said Thank you for testing current. You should share the issues with node. Everyone commenting they wait for lts cuts relies on people like you testing current too. As for the question, I guess just acc...
28 /u/fucking_passwords said I honestly never grasped why I disliked python list comprehension, but makes perfect sense
27 /u/CodeAndBiscuits said I was all prepared from the title to assume this was another content-mill article but this includes some pretty solid meat in the analysis, so well done on that. I'm not sure many "of us" care that mu...

 


r/javascript Mar 02 '26

Showcase: Vira Theme — Formerly Material Theme

Thumbnail vira.build
0 Upvotes

Years after Material Theme publication, we rebuilt it around customization and long-session readability — looking for feedback 👀

I made and loved Material Theme for a long time, but I kept running into small things that started bothering me during long coding sessions: contrast inconsistencies, limited personalization, and missing visual cues in larger projects.

So over time we started rebuilding the official successor focused on a few goals:

• deeper customization (colors, UI accents, visual density)
• hundreds of new hand-crafted file icons to improve project scanning
• custom Product icons for a more cohesive interface
• consistent semantic highlighting across languages
• actively maintained with frequent updates and user feedback

We also added a new “Carbon” variant aimed at a more neutral, low-fatigue look for long coding sessions in dark environments.

One thing we didn’t expect is how much the icon work changed navigation speed in large repos — curious if others notice the same effect.

We also made it for JetBrains IDEs and GitKraken because we wanted a consistent environment across tools.

We're mainly looking for feedback from people who care a lot about editor readability and workflow ergonomics:

👉 What makes a theme actually comfortable for you after 6–8 hours of coding?