</>PackageGraphPackageGraph

eventsource

npmv5.1.1TypeScript

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

1
Direct dependencies

Runtime packages this one declares itself.

1
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

194 KB
Install size

Unpacked size of this package plus its entire runtime tree.

1
Tree depth

Longest resolved dependency chain below this package.

Licenses in the dependency tree

MIT

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`.
 */
Example truncated — see the full README.

eventsource vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
eventsourcethis page03MIT20 days ago
eventsource-parser03MIT1 day ago

Dependencies

Declared by eventsource v5.1.1. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (14)

@changesets/changelog-github ^1.0.0@changesets/cli ^3.0.0@cloudflare/vitest-pool-workers ^0.21.3@tsconfig/strictest ^2.0.8@types/node ^22.19.19@vitest/browser ^4.1.10@vitest/browser-playwright ^4.1.10eventsource-encoder ^1.0.2happy-dom ^20.11.2oxfmt ^0.52.0oxlint ^1.67.0playwright ^1.60.0typescript ^7.0.0vitest ^4.1.10

Used by

Popular packages that depend on eventsource.

Relationship graph

Dependencies (left) and dependents (right) of eventsource.

Frequently installed together

Release history

15 releases in the last two years, typically about 11 days apart.

Recent versions of eventsource
VersionPublishedSizeLicense
5.1.1latest20 days ago100 KBMIT
5.1.027 days ago99 KBMIT
5.0.01 month ago89 KBMIT
4.1.11 month ago147 KBMIT
4.1.09 months ago146 KBMIT
4.0.01 year ago143 KBMIT
3.0.71 year ago144 KBMIT
3.0.61 year ago143 KBMIT
3.0.5-umd.01 year ago198 KBMIT
3.0.51 year ago143 KBMIT
3.0.41 year ago129 KBMIT
3.0.31 year ago124 KBMIT
3.0.21 year ago131 KBMIT
3.0.11 year ago126 KBMIT
3.0.01 year ago126 KBMIT

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.