Sign in

Hiroki Osame

@hirok.io
1.4K followers 98 following 69 posts

👤 hirok.io ⚡️ Creator of @tsx.is 📦 Creator of pkg-size.dev 💞 Open Source github.com/privatenumber 💼 SWE @ Square

PostsRepliesMedia
Hiroki Osame @hirok.io · 14/06/2026
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...
0434
Hiroki Osame @hirok.io · 02/03/2026
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.com
GitHub - privatenumber/npm-pkg-settings: Programmatic access to npm package publish settings
Programmatic access to npm package publish settings - privatenumber/npm-pkg-settings
000
Hiroki Osame @hirok.io · 02/03/2026
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.com
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
020
Hiroki Osame @hirok.io · 19/12/2025
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.com
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
021
Reposted by Hiroki Osame
VoidZero @voidzero.dev · 27/04/2025
`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.com
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
2122
Hiroki Osame @hirok.io · 15/03/2025
🤖 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...
151
Hiroki Osame @hirok.io · 17/01/2025
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?
110
Hiroki Osame @hirok.io · 11/01/2025
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
1566
Reposted by Hiroki Osame
tsx | TypeScript Execute @handle.invalid · 31/12/2024
Great end to 2024 🎉 🌟 10k GitHub stars ⬇️ 19.5M downloads a month Thank you everyone ❤️
091
Hiroki Osame @hirok.io · 25/12/2024
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...
0537
Hiroki Osame @hirok.io · 24/12/2024
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...
nodejs.org
Modules: ECMAScript modules | Node.js v23.5.0 Documentation
4100
Hiroki Osame @hirok.io · 22/12/2024
Good year 😊
1240
Hiroki Osame @hirok.io · 19/12/2024
vite-css-modules now supports Vite 6! 👉 github.com/privatenumber/vite-css-modules
github.com
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.
1453
Hiroki Osame @hirok.io · 16/12/2024
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
hirok.io
Think twice before importing package source files
Importing source files from packages during development can cost you more than it saves
161
Reposted by Hiroki Osame
Theo-Steiner @theosteiner.de · 14/12/2024
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.com
GitHub - privatenumber/pkgroll: 📦 Zero-config package bundler for Node.js + TypeScript
📦 Zero-config package bundler for Node.js + TypeScript - privatenumber/pkgroll
261
Reposted by Hiroki Osame
Nicholas C. Zakas @humanwhocodes.com · 11/12/2024
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...
github.com
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 ...
041
Hiroki Osame @hirok.io · 23/11/2024
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
react.dev
Lifecycle of Reactive Effects – React
The library for web and native user interfaces
481
Hiroki Osame @hirok.io · 21/11/2024
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
740
Hiroki Osame @hirok.io · 17/11/2024
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
220
Reposted by Hiroki Osame
Vincent Driessen @nvie.com · 15/11/2024
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 👌
141
Hiroki Osame @hirok.io · 15/11/2024
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
hirok.io
Guide to the Node.js `exports` field
Take control over how your npm package is accessed with the package.json `exports` field
99716
Hiroki Osame @hirok.io · 07/11/2024
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! 👍
220
Hiroki Osame @hirok.io · 06/11/2024
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...
180
Hiroki Osame @hirok.io · 06/11/2024
tsx is now on 🦋 @ts-x.bsky.social
bsky.app
0110
Hiroki Osame @hirok.io · 06/11/2024
New Sponsorkit v0.16 updates! github.com/antfu-collective/sponsorkit/releases/tag/v0.16.0
1122