If you work with images with text, or scanned documents, here's a small but powerful OCR CLI It leverages Apple's Vision Framework so it's completely local Tip: give it to your agent to save on vision tokens! → npx mac-ocr ./image.png github.com/privatenumbe...
Hiroki Osame
@hirok.io
👤 hirok.io ⚡️ Creator of @tsx.is 📦 Creator of https://pkg-size.dev 💞 Open Source https://github.com/privatenumber 💼 SWE @ Square
Made a JS API & CLI for npm package settings Now you can easily update Trusted Publisher and Publishing Access settings from the CLI or in bulk with a script github.com/privatenumber/npm-pkg-settings
GitHub - privatenumber/npm-pkg-settings: Programmatic access to npm package publish settings
Programmatic access to npm package publish settings - privatenumber/npm-pkg-settings
github.com
New package: doctor-json 👨🏻⚕️ An util to manipulate JSON/JSONC while preserving their formatting and comments The API is so simple—manipulate the parsed object just like you would any plain object, and stringify! github.com/privatenumber/doctor-json
GitHub - privatenumber/doctor-json: Surgically edit JSON & JSONC strings while preserving whitespace, comments, and formatting
Surgically edit JSON & JSONC strings while preserving whitespace, comments, and formatting - privatenumber/doctor-json
github.com
Made a little tool because I've wasted too much time waiting for `rm -rf node_modules` in large repos Now I can just do `poof node_modules` 💨 github.com/privatenumber/poof
GitHub - privatenumber/poof: Fast, non-blocking rm -rf alternative. Deletes files instantly while cleanup runs in the background.
Fast, non-blocking rm -rf alternative. Deletes files instantly while cleanup runs in the background. - privatenumber/poof
github.com
`oxc-minify` is now the recommended minifier when using @rolldown.rs! While continuously tweaking the performance, the minifier is already outperforming `esbuild` in terms of speed and size. Check out the benchmark by @hirok.io for perf comparison. github.com/privatenumbe...
GitHub - privatenumber/minification-benchmarks: 🏃♂️🏃♀️🏃 JS minification benchmarks: babel-minify, esbuild, terser, uglify-js, swc, google closure compiler, tdewolff/minify, oxc-minify
🏃♂️🏃♀️🏃 JS minification benchmarks: babel-minify, esbuild, terser, uglify-js, swc, google closure compiler, tdewolff/minify, oxc-minify - privatenumber/minification-benchmarks
github.com
🤖 Minification Benchmarks now includes an AI analysis with clear recommendations No more manual analysis—read which minifier is best for your needs It's also really entertaining to read: github.com/privatenumbe...
I vaguely remember a TypeScript discussion where they were considering deprecating tsconfig#paths in favor of package.json#imports (but concluded it was too early?) I searched around but couldn't find it... Does this ring a bell for anyone?
dtsroll is a Type Script declaration file (.d.ts) bundler Use it to: - Tree-shake unused types - Bundle in private monorepo deps - Improve type-checking perf 👉 github.com/privatenumber/dtsroll
Great end to 2024 🎉 🌟 10k GitHub stars ⬇️ 19.5M downloads a month Thank you everyone ❤️
In your TS project, enabling verbatimModuleSyntax is highly recommended for predictable compilation If you haven't yet because of the errors it produces, I made an auto-fixer: github.com/privatenumbe...
Why haven't Import Attributes taken off? Seems it stopped at JSON support It would be great to be able to import text files and create a run-time dependency on it: ```ts import fileContent from './file.txt' with { type: 'text' } ``` nodejs.org/api/esm.html...
Modules: ECMAScript modules | Node.js v23.5.0 Documentation
nodejs.org
vite-css-modules now supports Vite 6! 👉 github.com/privatenumber/vite-css-modules
GitHub - privatenumber/vite-css-modules: Vite plugin for correct CSS Modules behavior
Vite plugin for correct CSS Modules behavior. Contribute to privatenumber/vite-css-modules development by creating an account on GitHub.
github.com
Are you using tsx to import source files across workspace packages? You may be making expensive trade-offs without realizing it Here's a breakdown of the risks and better alternatives: 👉 hirok.io/posts/importing-source-files-in-dev
Think twice before importing package source files
Importing source files from packages during development can cost you more than it saves
hirok.io
Do yourself a favor and delete those hacks & brittle build steps you cobbled together, for your library to be consumable from both esm & cjs. Then simply make sure your package.json declares the entrypoints you want & let pkgroll by @hirok.io do the rest! What a delightful little tool ❤️
GitHub - privatenumber/pkgroll: 📦 Zero-config package bundler for Node.js + TypeScript
📦 Zero-config package bundler for Node.js + TypeScript - privatenumber/pkgroll
github.com
Hey PostCSS experts, folks have requested the ability to parse PostCSS-specific syntax in ESLint, but I really don't know how to accomplish that. Your comments on this issue would be appreciated: github.com/eslint/css/i...
Change Request: PostCSS syntax support · Issue #29 · eslint/css
Environment ESLint version: Latest (Possible to include the version on the Code Explorer?) @eslint/css version: Latest (Possible to include the version on the Code Explorer?) Node version: N/A npm ...
github.com
TIL the way you do onMounted in React is useEffect() with no dependencies react.dev/learn/lifecy... I rarely use React, but this feels kind of hacky to me I feel like the framework beginners learn web dev with should set better examples of semantic & readable code
Lifecycle of Reactive Effects – React
The library for web and native user interfaces
react.dev
Does anyone use `npm install --production` in their project? I'm writing a blog post on package.json dependencies, and I can't find a practical use for this feature
Looking for a lightweight on-the-go setup I have a 16” MBP and I’d like something lighter… Has anyone tried something like Mac mini with Tailscale, VNCing in from iPad with keyboard + trackpad? Thinking it would be nice to be able to pick up where I left off at home but worried about battery
Woah, I wish this guide existed when I had to figure this all out about a year ago. If you publish packages to NPM, this is a must-read. Also, check out the `publint` by @bluwy.me. It saved us from so many mistakes 👌
Confused about the `exports` field in package.json? I wrote a guide to break it down and walk you through it! 👉 hirok.io/posts/node-exports-guide
Confused about the `exports` field in package.json? I wrote a guide to break it down and walk you through it! 👉 hirok.io/posts/node-exports-guide
Guide to the Node.js `exports` field
Take control over how your npm package is accessed with the package.json `exports` field
hirok.io
I was excited to see the perf impact for @antfu.me since he has a much bigger output Here are the results: sponsors.svg: 2.94 MB → 1.26 MB sponsors.wide.svg: 2.94 MB → 1.27 MB sponsors.past.svg: 2.15 MB → 919 KB sponsors.circles.svg: 2.99 MB → 1.39 MB More than 50% reductions for every file! 👍
New Sponsorkit v0.16 updates! github.com/antfu-collective/sponsorkit/releases/tag/v0.16.0
I just realized Bluesky's "domain as a handle" feature and it's actually so cool! I get to see so many awesome domains people have that I've never seen brb as I check out everyone's websites...