eventsource
npmv5.1.1TypeScriptWhatWG/W3C compliant EventSource client for Node.js and browsers
Safe to adopt
Yes — eventsource scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 20 days ago. 16 releases in the last 2 years.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- AMaintenance: grade A, Excellent.
Last published 20 days ago. 16 releases in the last 2 years.
- AWeight: grade A, Excellent.
Pulls in 1 transitive package, about 194 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 2 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding eventsource to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Licenses in the dependency tree
Every license you inherit by installing eventsource, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- node >=22.12.0
- Module format
- ESM only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the eventsource README.
import {EventSource} from 'eventsource'
const es = new EventSource('https://my-server.com/sse')
/*
* This will listen for events with the field `event: notice`.
*/
es.addEventListener('notice', (event) => {
console.log(event.data)
})
/*
* This will listen for events with the field `event: update`.
*/eventsource vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| eventsourcethis page | 0 | 3 | MIT | 20 days ago |
| eventsource-parser | 0 | 3 | MIT | 1 day ago |
Dependencies
Declared by eventsource v5.1.1. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (1)
Dev (14)
Used by
Popular packages that depend on eventsource.
Cross-platform WebSocket Servers for Node.js, Deno, Bun and Cloudflare Workers
Model Context Protocol implementation for TypeScript
Model Context Protocol implementation for TypeScript - Client package
Relationship graph
Dependencies (left) and dependents (right) of eventsource.
Frequently installed together
TypeScript-first schema declaration and validation library with static type inference
Next generation testing framework powered by Vite
Universal Server.
TypeScript definitions for node
TypeScript definitions for ws
An AST-based pattern checker for JavaScript.
Prettier is an opinionated code formatter
JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes
Generate or verify a Proof Key for Code Exchange (PKCE) challenge pair
Cross platform child_process#spawn and child_process#spawnSync
Streaming, source-agnostic EventSource/Server-Sent Events parser
Create and parse HTTP Content-Type header
Release history
15 releases in the last two years, typically about 11 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 5.1.1latest | 20 days ago | 100 KB | MIT |
| 5.1.0 | 27 days ago | 99 KB | MIT |
| 5.0.0 | 1 month ago | 89 KB | MIT |
| 4.1.1 | 1 month ago | 147 KB | MIT |
| 4.1.0 | 9 months ago | 146 KB | MIT |
| 4.0.0 | 1 year ago | 143 KB | MIT |
| 3.0.7 | 1 year ago | 144 KB | MIT |
| 3.0.6 | 1 year ago | 143 KB | MIT |
| 3.0.5-umd.0 | 1 year ago | 198 KB | MIT |
| 3.0.5 | 1 year ago | 143 KB | MIT |
| 3.0.4 | 1 year ago | 129 KB | MIT |
| 3.0.3 | 1 year ago | 124 KB | MIT |
| 3.0.2 | 1 year ago | 131 KB | MIT |
| 3.0.1 | 1 year ago | 126 KB | MIT |
| 3.0.0 | 1 year ago | 126 KB | MIT |
Overview
eventsource is an npm package that whatWG/W3C compliant EventSource client for Node.js and browsers. It has 3 known dependents in the graph. The latest version is 5.1.1, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need whatWG/W3C compliant EventSource client for Node.js and browsers and value a focused solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Keywords
Frequently asked questions
Should I use eventsource?
Yes — eventsource scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 20 days ago. 16 releases in the last 2 years.
How do I install eventsource?
Run `npm install eventsource` to add eventsource to your npm project.
How many dependencies does eventsource have?
eventsource declares 15 direct dependencies and pulls in 1 packages in total once its runtime tree is resolved totalling about 194 KB on disk.
What license is eventsource released under?
eventsource is distributed under the MIT license.
How popular is eventsource?
npm does not publish download counts. Within PackageGraph's crawl, 3 known packages depend on eventsource.
Is eventsource still maintained?
The most recent release of eventsource (v5.1.1) was published 20 days ago.
Does eventsource run install scripts?
No. eventsource does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.