Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@wipcomputer/markdown-viewer

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wipcomputer/markdown-viewer - npm Package Compare versions

Comparing version
1.2.4
to
1.2.6
+10
-0
CHANGELOG.md

@@ -6,2 +6,12 @@ # Changelog

## 1.2.6 (2026-03-02)
Republish clean: add .npmignore to prevent ai/ folder from publishing to npm
## 1.2.5 (2026-02-25)
Fix SSE connection pile-up causing blank pages when multiple tabs open in Chrome
## 1.2.4 (2026-02-21)

@@ -8,0 +18,0 @@

+1
-1
{
"name": "@wipcomputer/markdown-viewer",
"version": "1.2.4",
"version": "1.2.6",
"description": "Live markdown viewer for AI pair-editing. Updates render instantly in any browser.",

@@ -5,0 +5,0 @@ "type": "module",

@@ -191,4 +191,6 @@ #!/usr/bin/env node

let evtSource = null;
function connectSSE() {
const evtSource = new EventSource('/api/events?path=' + encodedPath);
if (evtSource) { evtSource.close(); evtSource = null; }
evtSource = new EventSource('/api/events?path=' + encodedPath);
evtSource.onmessage = async function(event) {

@@ -202,2 +204,3 @@ if (event.data === 'reload') {

evtSource.close();
evtSource = null;
setTimeout(connectSSE, 2000);

@@ -207,2 +210,13 @@ };

connectSSE();
// Free SSE connection when tab is hidden (Chrome 6-connection limit).
// Reconnect when tab becomes visible again.
document.addEventListener('visibilitychange', function() {
if (document.hidden) {
if (evtSource) { evtSource.close(); evtSource = null; }
} else {
serverLoad().catch(function(){});
connectSSE();
}
});
})();

@@ -328,3 +342,3 @@ </script>`;

"Content-Type": "text/event-stream",
"Cache-Control": "no-cache",
"Cache-Control": "no-cache, no-store",
Connection: "keep-alive",

@@ -335,2 +349,10 @@ });

req.on("close", () => { removeClient(filePath, res); });
// Auto-close SSE after 5 minutes to prevent connection pile-up.
// Client reconnects automatically via EventSource.onerror.
const maxAge = setTimeout(() => {
try { res.end(); } catch {}
removeClient(filePath, res);
}, 5 * 60 * 1000);
req.on("close", () => clearTimeout(maxAge));
return;

@@ -337,0 +359,0 @@ }