Sindre Sorhus

@sindresorhus
7.1K Followers
209 Following
1.7K Posts
Full-time open-sourcerer & indie Mac developer. Swift & Node.js.
Websitehttps://sindresorhus.com/apps
GitHubhttps://github.com/sindresorhus
X (Twitter)https://x.com/sindresorhus
Blueskyhttps://bsky.app/profile/sindresorhus.com

Another thing I have been working on for a couple of months:

Ink 7

New hooks: usePaste, useWindowSize, useBoxMetrics, useAnimation

More props stuff for <Box>: maxWidth/maxHeight, aspectRatio, alignContent, position="static"

Alternative screen support, border background colors, hard text wrapping, and lots of fixes for CJK

Ink lets you build CLIs with React

https://github.com/vadimdemedes/ink/releases/tag/v7.0.0

Release v7.0.0 · vadimdemedes/ink

Breaking Require Node.js 22 19b5316 Require React 19.2+ cfaebbb Ink now uses useEffectEvent internally to avoid re-subscribing input handlers on every render Pressing Backspace now correctly ...

GitHub

Another thing I have been working on for a couple of months:

Ink 7

New hooks: usePaste, useWindowSize, useBoxMetrics, useAnimation

More props stuff for <Box>: maxWidth/maxHeight, aspectRatio, alignContent, position="static"

Alternative screen support, border background colors, hard text wrapping, and lots of fixes for CJK

Ink lets you build CLIs with React

https://github.com/vadimdemedes/ink/releases/tag/v7.0.0

Release v7.0.0 · vadimdemedes/ink

Breaking Require Node.js 22 19b5316 Require React 19.2+ cfaebbb Ink now uses useEffectEvent internally to avoid re-subscribing input handlers on every render Pressing Backspace now correctly ...

GitHub
Now also with JSON schema validation support.

It has everything you will need:

- Retries
- Timeouts
- HTTP error throwing (non-2xx)
- Base URL (resolve relative URLs against a base)
- Default headers
- Auto token refresh on 401
- Client-side rate limiting
- Concurrency limiting
- Request deduplication
- In-memory caching
- Before/after request hooks
- Auto JSON body stringify
- Default search parameters
- Download/upload progress tracking
- Pagination

Build your own HTTP client with fetch-extras

Take only what you need. Tree-shakeable.

Built on Fetch. Works in the browser, Node.js, etc.

https://github.com/sindresorhus/fetch-extras

```js
// baseUrl
ky('users', {baseUrl: '/api/'})
//→ /api/users

ky('/users', {baseUrl: '/api/'})
//→ /users (leading slash = origin-root)

// prefix
ky('users', {prefix: '/api'})
//→ /api/users

ky('/users', {prefix: '/api'})
//→ /api/users (leading slash ignored)
```

baseUrl vs prefix

`baseUrl` uses standard URL resolution: `/users` means origin-root, `users` means relative to the base path.

`prefix` does simple string joining first, so `/users` and `users` both append to the prefix the same way. Use it only when you want that behavior.

For the past two months I have been working hard on Ky 2 and now it's finally out.

All bugs fixed. All GitHub issues resolved. Cleaner API, stricter behavior, fewer footguns.

New `baseUrl` option fixes URL handling, `searchParams` option now merges, retries are now more precise by distinguishing failure types, built-in JSON schema validation.

Ky is a tiny JS HTTP client built on top of the built-in Fetch.

https://github.com/sindresorhus/ky/releases/tag/v2.0.0

Tired of wasting gigabytes of Time Machine storage to node_modules folders?

Time Machine supports setting a sticky extended attribute on folders to exclude them from backups.

It works great, and I believe NPM should support it.

I opened an NPM RFC and would love your comments on it: https://github.com/npm/rfcs/pull/857/changes

In the mean time, you can easily set the bit w/ a command like:

xattr -w com.apple.metadata:com_apple_backup_excludeItem com.apple.backupd /path/to/node_modules/

Let’s do this!

For example, the app icon was generated by the app. Unfortunately, I lost the prompt.