sindresorhus

sindresorhus

Full-Time Open-Sourcerer. Focuses on Swift & JavaScript. Makes macOS apps, CLI tools, npm packages. Likes unicorns.

Member Since 11 years ago

Experience Points
4.5w
follower
Lessons Completed
52
follow
Lessons Completed
2.9k
stars
Best Reply Awards
1k
repos

4056 contributions in the last year

Pinned
⚡ 🌈 Convert videos to high-quality GIFs on your Mac
⚡ 🎨 The macOS color picker as an app with more features
⚡ 😎 Awesome lists about all kinds of interesting topics
⚡ :zap: Delightful Node.js packages and resources
⚡ :octocat: Browser extension that simplifies the GitHub interface and adds useful features
⚡ ⌨️ Add user-customizable global keyboard shortcuts to your macOS app in minutes
Activity
Oct
23
19 hours ago
Activity icon
published release
createdAt 5 hours ago
Activity icon
published release

sindresorhus in sindresorhus/p-timeout create published release

createdAt 5 hours ago
Activity icon
created tag
createdAt 5 hours ago
Activity icon
published release

sindresorhus in sindresorhus/Plash create published release

createdAt 5 hours ago
Activity icon
created tag
createdAt 5 hours ago
Activity icon
published release
createdAt 5 hours ago
Activity icon
created tag
createdAt 6 hours ago
push

sindresorhus push sindresorhus/p-timeout

sindresorhus
sindresorhus

Ensure milliseconds argument is not NaN (#25)

commit sha: 6b6c4e85c34c5fab21bf3d8fc06ddee7e0dfa88d

push time in 6 hours ago
pull request

sindresorhus pull request sindresorhus/p-timeout

sindresorhus
sindresorhus

Ensure milliseconds argument is not NaN

Because

milliseconds < 0

is not enough since

NaN < 0 // => false
Oct
22
1 day ago
Activity icon
issue

sindresorhus issue comment sindresorhus/cli-spinners

sindresorhus
sindresorhus
sindresorhus
sindresorhus

What I'm afraid of is that createRequire will not work with bundlers. It took bundlers years to add support for JSON required through normal require. And I don't want to deal with the support if it ends up breaking a bundler (I already have enough support to do with just the ESM migration). What I decide to do here is what I will do with all my other packages, I'll need to think this over. I'll get back to you.

Activity icon
issue

sindresorhus issue comment sindresorhus/cli-spinners

sindresorhus
sindresorhus
sindresorhus
sindresorhus

how is this "the same"? with his PR this module is an ES module, not cjs.

But you're using createRequire, so the CommonJS loader is still being used in this package.

Activity icon
issue

sindresorhus issue comment sindresorhus/electron-dl

sindresorhus
sindresorhus

Call the callback when state is cancelled

To prevent the download function from never resolving the callback needs to be called. Today, if you call downloadItem.cancel() on one of the item, the main download(win, options) function will not return.

The fix is using a new CancelError as the callback argument, as proposed in the #115 discussion.

sindresorhus
sindresorhus

The behavior needs to be documented and so does CancelError.

You also need to update https://github.com/sindresorhus/electron-dl/blob/main/index.d.ts

Activity icon
issue

sindresorhus issue comment chalk/chalk

sindresorhus
sindresorhus

4.1.2 has mis-configured Typescript definition

Chalks types are not next to the main entrypoint file and thus TSC fails to compile them.

$ tsc
src/index.ts(3,19): error TS2307: Cannot find module 'chalk' or its corresponding type declarations.

https://codesandbox.io/s/ts-http-chalk-bug-lq2qz?file=/src/index.ts https://unpkg.com/browse/[email protected]/package.json

Workaround

move the index.d.ts to source/

sindresorhus
sindresorhus
Oct
21
2 days ago
open pull request

sindresorhus wants to merge insidegui/WWDC

sindresorhus
sindresorhus

Feature: SharePlay

There's still a lot to be done in order for this to be included in a non-beta version of the app:

Must-haves

  • Starting the playback of a different session than the one that's currently playing after initiating SharePlay should switch all participants to that session
  • The same scenario above should probably warn the user before proceeding, to prevent accidental disturbances to all participants in the session

Nitpicks and nice-to-haves

  • I've noticed that the speed button in the player doesn't reflect speed changes coming from the SharePlay session
  • Could we add the ability for participants to add bookmarks in such a way that they sync to all participants? 🤔

There are probably unknown issues and edge cases that we'll only learn about once this is actually being used by people

sindresorhus
sindresorhus

The Group here is moot as body is implicitly a view builder.

open pull request

sindresorhus wants to merge insidegui/WWDC

sindresorhus
sindresorhus

Feature: SharePlay

There's still a lot to be done in order for this to be included in a non-beta version of the app:

Must-haves

  • Starting the playback of a different session than the one that's currently playing after initiating SharePlay should switch all participants to that session
  • The same scenario above should probably warn the user before proceeding, to prevent accidental disturbances to all participants in the session

Nitpicks and nice-to-haves

  • I've noticed that the speed button in the player doesn't reflect speed changes coming from the SharePlay session
  • Could we add the ability for participants to add bookmarks in such a way that they sync to all participants? 🤔

There are probably unknown issues and edge cases that we'll only learn about once this is actually being used by people

sindresorhus
sindresorhus

Apple recommends making environment/state-type variables private.

pull request

sindresorhus merge to insidegui/WWDC

sindresorhus
sindresorhus

Feature: SharePlay

There's still a lot to be done in order for this to be included in a non-beta version of the app:

Must-haves

  • Starting the playback of a different session than the one that's currently playing after initiating SharePlay should switch all participants to that session
  • The same scenario above should probably warn the user before proceeding, to prevent accidental disturbances to all participants in the session

Nitpicks and nice-to-haves

  • I've noticed that the speed button in the player doesn't reflect speed changes coming from the SharePlay session
  • Could we add the ability for participants to add bookmarks in such a way that they sync to all participants? 🤔

There are probably unknown issues and edge cases that we'll only learn about once this is actually being used by people

open pull request

sindresorhus wants to merge insidegui/WWDC

sindresorhus
sindresorhus

Feature: SharePlay

There's still a lot to be done in order for this to be included in a non-beta version of the app:

Must-haves

  • Starting the playback of a different session than the one that's currently playing after initiating SharePlay should switch all participants to that session
  • The same scenario above should probably warn the user before proceeding, to prevent accidental disturbances to all participants in the session

Nitpicks and nice-to-haves

  • I've noticed that the speed button in the player doesn't reflect speed changes coming from the SharePlay session
  • Could we add the ability for participants to add bookmarks in such a way that they sync to all participants? 🤔

There are probably unknown issues and edge cases that we'll only learn about once this is actually being used by people

sindresorhus
sindresorhus
                        Image(systemName: "person.2")
                            .symbolVariant(.fill)
open pull request

sindresorhus wants to merge insidegui/WWDC

sindresorhus
sindresorhus

Feature: SharePlay

There's still a lot to be done in order for this to be included in a non-beta version of the app:

Must-haves

  • Starting the playback of a different session than the one that's currently playing after initiating SharePlay should switch all participants to that session
  • The same scenario above should probably warn the user before proceeding, to prevent accidental disturbances to all participants in the session

Nitpicks and nice-to-haves

  • I've noticed that the speed button in the player doesn't reflect speed changes coming from the SharePlay session
  • Could we add the ability for participants to add bookmarks in such a way that they sync to all participants? 🤔

There are probably unknown issues and edge cases that we'll only learn about once this is actually being used by people

sindresorhus
sindresorhus
                        let color = viewModel.state == .active ? Color.accentColor : nil
open pull request

sindresorhus wants to merge insidegui/WWDC

sindresorhus
sindresorhus

Feature: SharePlay

There's still a lot to be done in order for this to be included in a non-beta version of the app:

Must-haves

  • Starting the playback of a different session than the one that's currently playing after initiating SharePlay should switch all participants to that session
  • The same scenario above should probably warn the user before proceeding, to prevent accidental disturbances to all participants in the session

Nitpicks and nice-to-haves

  • I've noticed that the speed button in the player doesn't reflect speed changes coming from the SharePlay session
  • Could we add the ability for participants to add bookmarks in such a way that they sync to all participants? 🤔

There are probably unknown issues and edge cases that we'll only learn about once this is actually being used by people

sindresorhus
sindresorhus
                            .progressViewStyle(.circular)
pull request

sindresorhus merge to insidegui/WWDC

sindresorhus
sindresorhus

Feature: SharePlay

There's still a lot to be done in order for this to be included in a non-beta version of the app:

Must-haves

  • Starting the playback of a different session than the one that's currently playing after initiating SharePlay should switch all participants to that session
  • The same scenario above should probably warn the user before proceeding, to prevent accidental disturbances to all participants in the session

Nitpicks and nice-to-haves

  • I've noticed that the speed button in the player doesn't reflect speed changes coming from the SharePlay session
  • Could we add the ability for participants to add bookmarks in such a way that they sync to all participants? 🤔

There are probably unknown issues and edge cases that we'll only learn about once this is actually being used by people

Activity icon
issue

sindresorhus issue comment sindresorhus/electron-better-ipc

sindresorhus
sindresorhus

BetterIpcRenderer on method only gets called once

As the title says the on method of electron-better-ipcs ipcRenderer only gets called once and the original on get called every time a message is sent.

// Renderer
ipcRenderer.on("channel", console.log)

// Main
ipcMain.sendToRenderers("channel", "test")
ipcMain.sendToRenderers("channel", "test")

This example only logs once with the better ipc one and twice with the vanilla version

sindresorhus
sindresorhus

// @t13m In case you have any idea what might cause this.

pull request

sindresorhus pull request sindresorhus/awesome-nodejs

sindresorhus
sindresorhus

Add spect-runner

By submitting this pull request, I promise I have read the contribution guidelines twice and ensured my submission follows it. I realize not doing so wastes the maintainers' time that they could have spent making the world better. 🖖

⬆⬆⬆⬆⬆⬆⬆⬆⬆⬆

Activity icon
issue

sindresorhus issue comment sindresorhus/awesome-nodejs

sindresorhus
sindresorhus

Add spect-runner

By submitting this pull request, I promise I have read the contribution guidelines twice and ensured my submission follows it. I realize not doing so wastes the maintainers' time that they could have spent making the world better. 🖖

⬆⬆⬆⬆⬆⬆⬆⬆⬆⬆

sindresorhus
sindresorhus

The submitted project should be more than 30 days old and the repo should have at least 40 stars. - https://github.com/sindresorhus/awesome-nodejs/blob/main/contributing.md

Previous