{"id":18881478,"url":"https://github.com/desktop/desktop-notifications","last_synced_at":"2025-04-14T20:11:46.781Z","repository":{"id":38356367,"uuid":"453924877","full_name":"desktop/desktop-notifications","owner":"desktop","description":"A simple and opinionated library for working with OS notifications","archived":false,"fork":false,"pushed_at":"2023-10-05T18:15:50.000Z","size":2280,"stargazers_count":25,"open_issues_count":10,"forks_count":17,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-10-29T23:10:17.205Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/desktop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-31T08:11:26.000Z","updated_at":"2024-09-07T03:23:57.000Z","dependencies_parsed_at":"2024-06-19T17:41:50.573Z","dependency_job_id":"20b2fdce-3202-4373-9276-08dc6ccad1d6","html_url":"https://github.com/desktop/desktop-notifications","commit_stats":{"total_commits":92,"total_committers":3,"mean_commits":"30.666666666666668","dds":0.05434782608695654,"last_synced_commit":"41d50b6f85e1689f3edc38549613936ad05e2501"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desktop%2Fdesktop-notifications","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desktop%2Fdesktop-notifications/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desktop%2Fdesktop-notifications/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desktop%2Fdesktop-notifications/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/desktop","download_url":"https://codeload.github.com/desktop/desktop-notifications/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223644792,"owners_count":17178765,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T06:49:37.115Z","updated_at":"2024-11-08T06:49:37.761Z","avatar_url":"https://github.com/desktop.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# desktop-notifications\n\n## A simple and opinionated library for working with OS notifications\n\n## Goals\n\n- zero dependencies\n- good support for Windows notifications\n- leverage TypeScript declarations wherever possible\n\n**Note:** This is currently in preview, with support for features that GitHub\nDesktop uses.\n\n## Install\n\n```shellsession\n$ npm install --save desktop-notifications\n# or\n$ yarn add desktop-notifications\n```\n\n## But Why?\n\nThe current set of options for interacting with notifications, especially on\nWindows, have some limitations that meant we couldn't use them easily in GitHub\nDesktop:\n\n- [`electron`](https://www.electronjs.org/) doesn't support Windows\n  notifications when those are hidden away in the Action Center, because it\n  doesn't have a COM activator that could leverage CLSID-based activation. More\n  details about this can be found in\n  [electron/electron#29461](https://github.com/electron/electron/issues/29461).\n- [`node-notifier`](https://www.npmjs.com/package/node-notifier) relies on\n  [`snoretoast`](https://github.com/KDE/snoretoast) to handle notifications on\n  Windows, and the way it's used is only able to detect one event with each\n  notification, and also requires the app to use the same CLSID that is\n  [hardcoded](https://github.com/KDE/snoretoast/blob/17f88b2c757d54581bb7d5aa4d0d4462c3e75a98/CMakeLists.txt#L5)\n  in snoretoast.\n- [`electron-windows-notifications`](https://github.com/felixrieseberg/electron-windows-notifications)\n  has **many** dependencies around [`NodeRT`](https://github.com/NodeRT/NodeRT)\n  which, as of today, also require some\n  [manual steps](https://stackoverflow.com/a/54591996/673745) in order to build\n  them.\n\nAfter exploring all these options, we decided to write our own library to do the\nstuff we require using no dependencies at all and having all the features we\nneed.\n\n## Building and running the sample app\n\nIn order to get the sample app up and running you need to:\n\n1. Build `desktop-notifications`.\n2. Build the sample app.\n3. (macOS only) Sign the Electron binary, so that macOS will allow the sample\n   app to display notifications.\n4. Start the sample app.\n\nThese are the commands to make that happen:\n\n```\n$ yarn install\n$ yarn build\n$ cd sample-app\n$ yarn install\n$ yarn build\n$ /usr/bin/codesign --deep --force --sign - --timestamp\\=none node_modules/electron/dist/Electron.app/Contents/MacOS/Electron # macOS only\n$ yarn start\n```\n\n## Documentation\n\nSee the documentation under the\n[`docs`](https://github.com/desktop/desktop-notifications/tree/master/docs)\nfolder.\n\n## Supported versions\n\nEach release of `desktop-notifications` includes prebuilt binaries based on\n[N-API](https://nodejs.org/api/n-api.html), with support for different versions\nof Node and Electron. Please refer to the\n[N-API version matrix](https://nodejs.org/api/n-api.html#node-api-version-matrix)\nand the release documentation for [Node](https://github.com/nodejs/Release) and\n[Electron](https://electronjs.org/docs/tutorial/support) to see what is\nsupported currently.\n\n## Contributing\n\nRead the\n[Setup](https://github.com/desktop/desktop-notifications/blob/master/docs/index.md#setup)\nsection to ensure your development environment is setup for what you need.\n\nThis project isn't about implementing a 1-1 replication of any other\nnotifications API, but implementing just enough for whatever usage GitHub\nDesktop needs.\n\nIf you want to see something supported, open an issue to start a discussion\nabout it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesktop%2Fdesktop-notifications","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdesktop%2Fdesktop-notifications","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesktop%2Fdesktop-notifications/lists"}