r/npm • u/PuzzleheadedDust3218 • 15h ago
Self Promotion Typed-xlsx, a TypeScript library for generating Excel reports from a typed schema, v5 just shipped
r/npm • u/PuzzleheadedDust3218 • 15h ago
r/npm • u/Lopsided_Sign1696 • 1d ago
r/npm • u/Accurate-Screen8774 • 2d ago
Im working on a project for myself. Its an unreviewed, unaudited and far from finished. It started of as a person curiosity and evolved from there. Its shaping up well enough to publish and share.
If i publish something on NPM, there are strict controls around versioning for which i havent burdened myself on my own projects (but clearly important when making something for a wider community). I also wonder if im overlooking any other details.
I wonder what best practices there are for something like this. Should i be publishing new versions with CI/CD? Are there any tips or advice for doing this in the modern js ecosystem?
r/npm • u/Worried-Barracuda845 • 2d ago
I've been experimenting with OpenAPI-to-MCP converters, and one thing kept bothering me: most of them turn every API endpoint into a separate MCP tool.
That works fine for small APIs. But point one at GitHub or Stripe, and suddenly your agent has hundreds of tools to choose from, eating up context and making tool selection harder.
Also, do you really want your agent to have access to every DELETE endpoint by default?
So I built getmcp-cli, an open-source CLI that generates smaller, safer MCP servers from OpenAPI specs.
Try it:
npx getmcp-cli https://petstore3.swagger.io/api/v3/openapi.jsonWhat it does:
Automatically filters potentially risky operations (destructive actions, payments, admin routes, credentials, etc.).
Ranks the remaining endpoints and selects 25 by default, balanced across resources.
Generates a runnable stdio MCP server.
Creates a REPORT.md explaining exactly which endpoints were excluded and why.
Some results:
| API | Original operations | Selected | Estimated tool tokens |
|---|---|---|---|
| GitHub REST | 1,280 | 25 | ~263k → ~6k |
| Stripe | 612 | 25 | ~176k → ~10k |
Token counts are rough estimates based on characters / 4, not actual tokenizer measurements.
No LLM calls, no API keys for generation, no database. Everything runs offline and deterministically.
You can also customize the selection:
--only issues,pulls,search to prioritize specific resources.
--allow to include otherwise filtered categories.
--dry-run to preview the report without generating files.
Current limitations:
The ranking is based on API structure, not your specific use case, so the default 25 tools won't always be ideal. Classification is keyword-based and conservative. It currently supports stdio, local $refs, and token-based API authentication, but not OAuth flows.
GitHub: GetMCP
I'd really appreciate feedback on two things:
Would you actually prefer an automatically selected, safer subset of tools, or would you rather manually choose endpoints?
If you try it with an API you know well, which important endpoints does it miss?
I'm especially interested in real-world cases where the automatic ranking gets things wrong.
r/npm • u/Maxim-MM • 2d ago
I'm the author of umbot, an open-source TypeScript framework for messaging bots and voice assistants. (Disclaimer: I am obviously biased, so take my benchmarks with a grain of salt. To keep it fair, I included a single-dispatcher control for grammY to show it's not just a framework issue, but an architectural one). While benchmarking it against grammY and Telegraf, I got a much bigger gap than I expected. My first thought was that I'd messed up the benchmark, so I started looking at what actually happens before a handler runs.
The most useful finding was how much work happens before the selected handler runs.
TL;DR: In one warmed-up routing probe with 1,000 rules, umbot created 2 Promise resources, grammY with individual listeners created 6,014, and Telegraf created 8,013. A single synchronous dispatcher inside grammY brought its count to 16. That control is the point of this post: how dispatch is organized changes the amount of work per update. For reference, per-update latency in the same warmed-up setup kept the same ordering: at 1,000 rules, umbot was ~1.3 µs, the single-dispatcher grammY control ~8 µs, and individual-listener chains ~300 µs. Latency numbers vary by machine; the counts remain the subject of this post. These counts don't measure end-to-end latency or allocated bytes.
The workload
The benchmark feeds Telegram update objects into each framework's update-processing entry point. Network calls and database operations are excluded. For grammY and Telegraf, bot information is supplied explicitly so initialization doesn't call Telegram's `getMe` API.
The competitors register individual `hears` handlers. String slots in umbot use substring matching, so the corresponding competitor triggers use escaped regular expressions with the same substring behavior. Matching rules are placed halfway through the registered list.
For this post, I narrowed the question to the Promise resources created while processing one warmed-up update. I'm leaving throughput rankings out and including a single-dispatcher control within grammY.
Why the architecture matters
In this setup, grammY and Telegraf compose the registered listeners as middleware. Reaching a rule halfway through a large list means passing through the earlier listeners. Those transitions have a cost beyond checking a string or a regular expression.
umbot uses a different internal search structure:
Exact lookup: a hash map handles eligible exact matches.
Substring lookup: larger literal rule sets use an Aho–Corasick index, so each phrase doesn't require its own middleware traversal. The trie is stored in flat typed arrays; edge lookup uses binary search.
Regex prefiltering: when a required literal can be safely extracted from a regex, its absence rules that expression out. A positive prefilter result still needs the real regex check. Expressions without a usable literal remain candidates.
Reusable search buffers: candidate positions and matched-literal IDs use preallocated buffers rather than fresh per-rule async closures.
I also checked the worst case for these structures: 1,000 anchored patterns with no safely extractable literal, so prefiltering rejects nothing and routing degrades to a linear candidate scan. Even there the scan stayed about 10× cheaper per update than the middleware chain, because testing candidates without per-listener composition is cheaper.
The internals also avoid unnecessary async wrappers and initialize things such as buttons, cards, NLU and regex match results lazily. The public update-processing method still returns a Promise; this isn't a claim of zero allocations per update.
There's a cost on the other side: indexes take time and memory to build. Tiny rule sets use simpler paths, and registration/startup should be measured separately from warmed-up routing. Concretely, on this machine registering 1,000 regex rules takes umbot ~9 ms versus ~1.4 ms in grammY — the cost of ReDoS validation and prefilter construction. String-slot registration is at parity. Both run once at startup, not per update.
Counting the Promise resources
To check the middleware explanation directly, I used `async_hooks` to count `PROMISE` initialization events around one warmed-up exact match in the middle of the list:
| Configuration | 6 rules | 1,000 rules |
|---|---|---|
| umbot | 2 | 2 |
| grammY, individual hears handlers | 50 | 6014 |
| Telegraf, individual hears handlers | 61 | 8013 |
| grammY, one text handler with a synchronous substring loop | 16 | 16 |
This diagnostic ran on Node 24.21.0, V8 13.6, Windows x64, with grammY 1.46.0 and Telegraf 4.16.3. Counts include the probe's own `await`. Hooks add overhead, so I didn't use this instrumented run to measure latency. These are resource-initialization counts, not allocated bytes or simultaneously live objects.
The last row is important. You can change how routing is organized inside grammY too. A single handler doing synchronous dispatch doesn't pay the same per-listener Promise cost. A follow-up latency run on the same machine, with handler outcomes verified by counters, still put the control well above umbot: roughly 2.5–11× slower at 1,000 rules depending on match type, and near-parity at 6 rules. That is expected — a linear `includes` scan over 1,000 slots is still more work than an indexed lookup.
That is the architectural comparison I find interesting: an indexed command router versus a long chain of independently composed listeners. It also suggests a useful control for future comparisons: keep the framework, change only the dispatch structure.
Under concurrency, more transient objects can increase GC pressure. That is a plausible contributor to the larger gaps in stress runs, but assigning a specific fraction of the speedup to GC or to an individual optimization needs a separate measurement.
What I would and wouldn't conclude
The counts support a substantial difference in Promise creation for these routing configurations. They don't establish the best possible performance of every application built with the other frameworks, or tell us exactly how much time each optimization saves. A bot with six commands, external API calls and database work has a different cost profile.
With real I/O, network waiting can dominate response time while routing still consumes CPU. Reducing that work and transient allocations can matter even when users see little change in latency. These Promise counts alone don't quantify the CPU or memory savings of a complete application.
A separate experiment I'd run is a local HTTP server returning delayed responses, rate-limit errors and timeouts. That would let me check pending-request memory, queues and recovery under controlled conditions. Live API checks would cover compatibility; the local server would cover repeatable load. Those experiments haven't been performed here.
I also found things to improve in my stress harness: its advertised regex traffic wasn't actually registering separate regex rules, and timer-based heap sampling could collect zero samples during a continuously replenished microtask workload. I'm leaving the stress RPS and memory charts out of this post until those measurements are tightened up.
Reproduce and inspect
The benchmark sources are in the repository:
git clone https://github.com/max36895/umbot.git
cd umbot
npm install
npm run build
npm install --prefix benchmark/comparison
npm run compareRecord the commit, Node version and installed dependency versions when comparing runs. Results will vary by machine and revision; a development working tree also needs its actual changes recorded.
npm install umbotLink:
Benchmark setup: https://github.com/max36895/umbot/blob/main/benchmark/comparison/
I've kept the links minimal in the main post to avoid triggering Reddit's spam filters. I'll drop the direct file links in the comments below.
The diagnostic below can be saved as `redit/promise-probe.cjs` inside the checkout and run with node redit/promise-probe.cjs. It counts one request after warm-up, including a single-handler grammY control.
If you maintain a high-throughput Node.js router, I'd be interested in which control you'd add next: the same indexed dispatcher inside each framework, randomized matching positions, or a more representative set of real conversation rules?
Promise-count diagnostic
// Diagnostic Promise counting; do not use the timings from this run as a benchmark.
const path = require('path');
const { createHook } = require('async_hooks');
const bench = path.resolve(__dirname, '../benchmark/comparison');
const { buildBenchOptions } = require(path.join(bench, 'telegram.js'));
const { umbotParticipant } = require(path.join(bench, 'runner.js'));
(async () => {
const results = [];
for (const count of [6, 1000]) {
const opts = buildBenchOptions();
const scenario = { cmds: count, kind: 'text', hit: 'exact' };
const participants = [umbotParticipant(opts), ...opts.competitors];
// The same gram, but one routing point with the usual synchronous enumeration.
const grammy = opts.competitors.find((fw) => fw.name === 'grammy');
participants.push({
name: 'grammy-single-router',
make: grammy.make,
setup: (bot) => {
const slots = Array.from({ length: count }, (_, i) => `cmd_${i}_`);
bot.on('message:text', (ctx) => {
for (const slot of slots) {
if (ctx.message.text.includes(slot)) return;
}
});
},
run: grammy.run,
});
for (const fw of participants) {
const instance = fw.make();
fw.setup(instance, scenario);
await new Promise((resolve) => setTimeout(resolve, 100));
const text = `cmd_${Math.floor(count / 2)}_`;
for (let i = 0; i < 100; i++) await fw.run(instance, text, i);
let promises = 0;
const hook = createHook({
init(_id, type) {
if (type === 'PROMISE') promises++;
},
});
hook.enable();
await fw.run(instance, text, 1001);
hook.disable();
results.push({
participant: fw.name,
commands: count,
promiseInitsIncludingProbeAwait: promises,
});
}
}
console.log(JSON.stringify(results, null, 2));
})().catch((error) => {
console.error(error);
process.exitCode = 1;
});r/npm • u/Ok_Emergency4944 • 3d ago
`ngx-callout` gives you info, warning, error, success, tip and important callouts in one line of HTML.
Angular component for coloured notice boxes: an icon, a heading, a sub-heading and any content you put inside.
✅ Six types: info, warning, error, success, tip, important
✅ Responsive, dark-mode ready, themeable with CSS variables
✅ Collapsible content, outline and rounded styles
✅ Zero dependencies besides Angular
🔗 Live demo: https://vishaalsharmaa.github.io/ngx-callout/
📦 npm: https://www.npmjs.com/package/ngx-callout
⭐ GitHub: https://github.com/vishaalsharmaa/ngx-callout
Feedback and stars are welcome!
r/npm • u/4tomicDuck • 3d ago

Eu precisava automatizar algumas coisas nas minhas contas do Instagram e queria resultados e erros com tipos reais, então escrevi o igflare. Ele se comunica com o Instagram da mesma forma que o aplicativo Android.
No que eu me concentrei:
Um login que se sustenta. Eu segui o fluxo de login do aplicativo atual, incluindo desafios de autenticação em duas etapas e de email. A sessão é salva, então você faz login uma vez e continua funcionando por semanas.
Tipos em que posso confiar. Cada resposta é verificada em tempo de execução, e cada falha é uma classe de erro própria, então posso separar um limite de taxa de um desafio.
A maior parte do aplicativo. Cobre perfis, seguidores, feeds, comentários, postagem de fotos, vídeos, reels e stories, mensagens diretas e insights.
Mantendo-se atual. Eu peguei o fluxo de login e as consultas do aplicativo oficial e escrevi um script que mostra o que muda quando uma nova versão do aplicativo é lançada.
Documentação: https://matheusoliveira-dev.github.io/igflare/
Código: https://github.com/MatheusOliveira-dev/igflare
O projeto ainda está no início. Ideias de recursos, problemas e PRs são todos bem-vindos, e se alguma dessas ideias parecer útil, eu ficaria feliz se você desse uma olhada.
3 years ago I posted this: https://www.reddit.com/r/node/comments/16zrn21/my_first_node_package_efficient_language_detector/
My first Node Package: Efficient Language Detector
ELD is a fast and accurate natural language detector, written 100% in Javascript, no dependencies. I believe it is the fastest non compiled detector, at its level of accuracy.
https://github.com/nitotm/efficient-language-detector-jsI've been programming for years but this is the first time I publish a package, so I would appreciate any feedback you have on the project's structure, code quality, documentation, or any other aspect you feel could be improved.
I learned a bit, I improved it, and now it has surpassed 1 million downloads per month.
The package is called eld: https://www.npmjs.com/package/eld
I know most of the growth is because of AI agents, but I don't see that as a bad thing, they are smart ;).
r/npm • u/Fillay89 • 4d ago
Hi, I just shipped an updated version of ApiTraffic (apitraffic.io) and I am looking for the honest feedback from node engineers. This was built as a node specific solution to monitor virtually all aspects of your node app - including security vulnerabilities. With AI attacks rapidly increasing, it is just so important to know what is hitting your apps and what they are trying to do. I bet you would be surprised to see what bots are trying to do to your apps.
Feel free to take it for a spin, provide feedback, I will take any and all feedback at this stage - especially usefulness and onboarding friction. I am happy to provide longer trial periods as well.
The install is a single NPM module so I am also interested in the install experience compared to other similar solutions.
Thanks for you time checking out the solution.
r/npm • u/boy-offi9 • 5d ago
r/npm • u/No-Sky3712 • 5d ago
r/npm • u/markSerene • 5d ago
r/npm • u/W1RELESS • 6d ago
r/npm • u/BuildProof_Pini • 6d ago
AI writes more and more of our code, and code review can't keep up. So I built BuildProof: a tool that looks at a code change and tries to PROVE a bug, not just guess one.
How it works:
The AI reads the change and suspects a bug.
It writes a test, and that test runs on the old code AND the new code.
If the test passes on the old code and fails on the new one, that's a real behaviour change.
A separate AI "judge" decides whether that change was intended or a bug.
You only get bugs that come with a failing test as proof.
The test: BugsJS, a public dataset of real bugs from real projects (Express, ESLint, Hexo, Karma, Shields, Bower, hessian.js). I re-introduced each bug and let the hunter look at the change, with no hints.
Results:
- Caught 32 of 44 real bugs.
- In the reverse direction (the actual fix, which is correct code), it raised a false alarm 4 times out of 44.
- Cost: about $0.15 per check.
It also knows when to stay quiet: I ran it on 4 open pull requests in lodash, koa and axios. It found nothing, and it was right not to. It doesn't invent bugs to look busy.
Your code runs in a locked container with no network and is deleted when the check ends. There's also a free mode that uses your own local model (Ollama).
Try it:
- 30-second demo, no project needed: npx buildproof try
- On your own git project: npx buildproof hunt --base main --cloud (3 free cloud checks)
I'd really like feedback, especially on the misses. Which kinds of bugs should it catch that it doesn't?
r/npm • u/Goldziher • 6d ago
r/npm • u/ThatsSoHarshh • 7d ago
Say a user starts a trial and you want to send a follow-up in three days. The job needs to survive deploys and restarts, and you might need to cancel or reschedule it. If your app already uses MongoDB, what would you reach for?
I built MongoSnooze to explore this. It stores the job in MongoDB and uses a separate TTL document as a wakeup signal. When MongoDB deletes that document, a change stream wakes the worker. A periodic sweep looks for due jobs the worker missed.
It needs a MongoDB replica set or Atlas. The scheduled time is when a job becomes eligible, so I’d use it for reminders and cleanup that can run late. Handlers also need to tolerate retries.
I’d like to hear from people running this kind of workload. Do you use Agenda, a cron query, or something else? What would make a small library worth adding over what you have now?
r/npm • u/NegotiationRich1251 • 8d ago
Hi every one please join,test, discuss abut my repo guy
r/npm • u/omert-dev • 8d ago
r/npm • u/mr-havoc • 8d ago
say hello to ascii-waves! its a sea of ascii characters that react when clicked. check it out!
npm: https://www.npmjs.com/package/ascii-waves
install line: npm install ascii-waves
r/npm • u/EstimateBeginning678 • 8d ago
I'm a student and I've been building websites for a while. A recurring problem with clients: they send photos straight from a photographer, often 5–20 MB each. The site gets slow, and I end up manually compressing them one by one before launch. I wanted to automate that.
So I built ViewFit. It opens the site in a headless browser, measures every <img> and CSS background-image, applies the device pixel ratio, and resizes/compresses each image to the size it is actually displayed at. Instead of one global quality setting, each image gets its own target size.
It's an early first version, MIT, and I'm mainly looking for technical feedback. It's a tool I use on my own client work.
GitHub: https://github.com/andrea-bonacci/viewfit
npm: https://www.npmjs.com/package/viewfit
I'd love feedback on:
- Does this fit how you handle client images?
- What would you change in the CLI/UX?
- Any edge cases you'd expect it to handle?
r/npm • u/infinity_gamer_ • 10d ago
r/npm • u/rawand-faraidun • 11d ago
A while ago I shared Linguify, a small tool for managing an app's translation files without hand-editing JSON. I've rebuilt it from scratch for 2.0, and it now works the same way from three places:
- the command line: linguify key add, rename, remove, sync, diff, format, export, import
- a studio in your browser (linguify studio): your translations as a table, on your machine only
- a VS Code extension: the same table in an editor panel
What it does:
- adds, renames and removes keys in every locale at once, descriptions included
- shows what each locale is missing, has extra, or has left empty, and fills the gaps with sync
- exports to CSV, TSV, JSON or Excel for translators, and imports their work back
- checks every change before writing anything, and refuses to write over files that changed since it read them
- prints JSON and exits non-zero on failure, so linguify format --check can gate CI
- handles right-to-left text properly (I write Kurdish Sorani, so this one mattered to me)
It works on plain JSON files: one file per locale or one per namespace. No account, no cloud: nothing leaves your machine.
npm install -D linguify
npx linguify initGitHub: https://github.com/rawand-faraidun/linguify
NPM: https://www.npmjs.com/package/linguify
VS Code: https://marketplace.visualstudio.com/items?itemName=rawand-faraidun.linguify-vs
If you used 1.x, the README has an "Upgrading from v1" section. I'd love to hear what you think, and what's missing for your workflow.