Skip to content

fix: make common logger browser safe#1219

Merged
Bushstar merged 5 commits into
mainfrom
bush/browser-cjs-logger
Jun 24, 2026
Merged

fix: make common logger browser safe#1219
Bushstar merged 5 commits into
mainfrom
bush/browser-cjs-logger

Conversation

@Bushstar

@Bushstar Bushstar commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

This PR makes @mdip/common safe to consume from browser builds while preserving the existing Node logger behavior. It adds browser-specific package export entries and a lightweight browser logger implementation that avoids Node-only assumptions such as process.env and pretty-print transports.

It also updates the Node logger to use pino-pretty as a stream instead of a transport for better CommonJS compatibility, and adjusts IPFS CID imports to use the explicit multiformats/cid subpath. A focused logger test was updated to cover the browser-safe environment fallback and the new pretty-stream behavior.

@Bushstar
Bushstar requested a review from jahatch512 June 23, 2026 07:08
@Bushstar
Bushstar merged commit dd4bbd5 into main Jun 24, 2026
17 checks passed
@Bushstar
Bushstar deleted the bush/browser-cjs-logger branch June 24, 2026 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move supporting unrelated changes out of pending PR

2 participants