Hiroki Osame

Hiroki Osame

@hirok.io

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

1.3K followers98 following69 posts

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...

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.comGitHub - privatenumber/doctor-json: Surgically edit JSON & JSONC strings while preserving whitespace, comments, and formattingSurgically edit JSON & JSONC strings while preserving whitespace, comments, and formatting - privatenumber/doctor-json

Hiroki Osame reposted

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?

Hiroki Osame reposted

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.comGitHub - privatenumber/pkgroll: 📦 Zero-config package bundler for Node.js + TypeScript📦 Zero-config package bundler for Node.js + TypeScript - privatenumber/pkgroll

Hiroki Osame reposted

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

Hiroki Osame reposted

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 👌

Hiroki Osame@hirok.io

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

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! 👍

Hiroki Osame@hirok.io

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...

💵 Prorate One-time sponsorships Spread large one-time sponsorships across months 🪶 SVG optimization SVG now embeds WebP instead of PNG (for me: 320 KB → 148 KB) 💠 WebP output Smaller alternative to the PNG format

♻️ Cache reduction Cache size significantly reduced (for me: 9.6 MB → 381 KB) 🧹 Code refactors From cleaner circle SVG cropping, to replacing an unofficial GH endpoint with GH GraphQL, to optimizing image processing

You are up to date.