1
1
2
2
3
9
4
3
5
2
6
8
7
3
submitted 1 week ago* (last edited 1 week ago) by xoron@programming.dev to c/javascript@programming.dev

IMPORTANT DISCLAIMER: This is my own project. Im am using AI. Its important to get that out of the way... because its the key reason for why YOU SHOULD NOT USE IT. Im not trying to promote "yet another ui framework", this is an investigation to see what is possible. Its unreviewed, unaudited and far from finished. Nobody else should be using this. This framework is intended for myself on my own projects. It is provided open-source for transparency, testing and demo purposes only.

I was investigating an idea i had about JSX-like syntax for webcomponents after some experience with Lit. I am sharing this here because it might be interesting/educational.

Lit is a nice lightweight UI framework, but i didnt like that it was using class-based components. It can support React with a wrapper, buts React is fundamentally an abstraction away from the DOM.

Vue has a nice approach but i prefer working with the syntax that React uses. I find it more intuitive for debugging and deterministic rendering. I wondered if with webcomponents, i could create a UI framework that didnt need to be transpiled.

My intentions with this framework is to get to a reasonable level of stability, to then replace React on some of my existing projects. I made a start by creating some basic reusable ui components components to be built with the js framework. Aiming for something like Material UI.

I can then compound that slop down into some basic UI demos:

To better demonstrate the pure-javascript and no-transpilation approach, i created an example repo of using a minimal amount of tooling for a PWA. The aim here is to keep the application logic in readable js and abstract the framework logic away from the developer.

To simplify things for myself, i added something similar to module-federation where i can fetch the dim/core dependencies as remote statics from github-pages instead of publishing to npm. The approach has tradoffs worth considering and is still a work-in-progress.

The disclaimer above is always worth repeating. Im aiming for a post like this to be like "building in public". If interesting to anyone, i hope its inviting to take a look. It's hard to determine if / when its a good time to share, so best to get it out there sooner for any outstanding issues i may have overlooked.

8
5
Your JS Error Is Lying to You (blog.gaborkoos.com)
9
10
10
3

Binance error -1021 looks like one problem, but it comes in two messages that need different fixes:

  • "Timestamp for this request was 1000ms ahead of the server's time."
  • "Timestamp for this request is outside of the recvWindow."

Binance accepts a signed request only if timestamp < serverTime + 1000 and serverTime - timestamp <= recvWindow. So there is a fixed one-second tolerance for clocks that run fast, and a configurable window (5000 ms by default, 60000 ms at most) for requests that arrive late.

"1000ms ahead" is a clock problem. Increasing recvWindow does nothing for it. Sync the machine's clock with NTP (on Linux, check timedatectl; on Windows, resync the time service), then try again.

"Outside of the recvWindow" means the request took too long between signing and arriving, or your clock runs slow. Fix the clock first. Only then consider a slightly larger recvWindow, and keep it small, because Binance recommends 5000 ms or less.

Two common bugs cause both messages in Node.js:

  • Sending seconds instead of milliseconds. Use Date.now(), not Math.floor(Date.now() / 1000).
  • Building the timestamp once and reusing it for later requests. Create it for each request.

If you use the binance npm package (an open-source SDK we maintain, from the same maintainers as the bybit-api and okx-api JavaScript SDKs, with over 4.5 million npm downloads across 10+ SDKs), it adds the timestamp and signature for you, with recvWindow set to 5000 by default. You can change it per client:

import { MainClient } from 'binance';

const client = new MainClient({
  api_key: process.env.BINANCE_API_KEY,
  api_secret: process.env.BINANCE_API_SECRET,
  recvWindow: 5000, // the default; raise it only for a genuinely slow link
});

const account = await client.getAccountInformation();
console.log(account.balances.length);

The SDK also has an optional time-sync mechanism (disableTimeSync: false), but it is off by default and we don't recommend it. A correct system clock is the real fix.

More detail:

Disclosure: we maintain the binance SDK.

11
3
12
8

Oxlint's JavaScript plugin support hit alpha in March 2026, and the Oxc team's claim is that roughly 80% of ESLint users can switch and have it "just work." The interesting part is how they got there: an ESLint-compatible plugin API running beside the native Rust rules, so you keep your rules and only pay JavaScript prices for the rules that actually need JavaScript.

13
8
14
1
15
1
16
7
17
23
18
5

It turns out, JavaScript provides a method of "trapping" nearly any operation on an object - property access, assignment, enumeration, and even property deletion. How? Via a Proxy. Think of a Proxy as a "hook" or "middleware" that can be used to gaslight the caller into seeing the proxied object any way you want them to see it. When you wrap an object in a Proxy, you can do almost anything you imagine - hide properties like I did with goodbye above, invent new "virtual" properties, or even make operations on properties "cursed":

19
2
20
27

Deno team is joining Cloudflare and will soon stop working on the Deno runtime and Deno Deploy

21
4
22
5
23
2
24
1
Ember 7.3 Released (blog.emberjs.com)
25
6

I made a small rate limiter for JS. It's about 1 KB, has no dependencies and runs on Node, Bun, Deno and Cloudflare Workers.

It uses GCRA, so each key is just one timestamp instead of a counter plus a timer. Nothing runs in the background. Keys you've already seen don't allocate either, since the timestamps live in a Float64Array.

import { limito } from 'limito'

const rl = limito({ limit: 100, window: '1m' })
const wait = rl('user:42') // 0 if allowed, otherwise ms to wait

There's also a Redis version for when you have multiple servers, and small middlewares for Express and Hono.

MIT licensed, still early (0.5). Feedback and bug reports welcome.

view more: next ›

JavaScript

2876 readers
1 users here now

founded 3 years ago
MODERATORS