Skip to content

fix(container): close loggers with empty-string ids - #2643

Open
jakezwang wants to merge 1 commit into
winstonjs:masterfrom
jakezwang:fix-container-empty-logger-id
Open

jakezwang wants to merge 1 commit into
winstonjs:masterfrom
jakezwang:fix-container-empty-logger-id

Conversation

@jakezwang

Copy link
Copy Markdown

Container.close('') currently closes every logger because it treats an empty-string ID as an omitted argument. Recognize this ID explicitly so only its logger is closed, or nothing happens if it is absent.

Adds regressions for existing and missing empty-string IDs, plus controls for close() and close(null). Other falsy argument behavior is unchanged.

Validation: 238 unit tests and coverage thresholds pass on Node 22, 24 and 26; each integration run passes 3 tests. Lint, TypeScript and Babel build pass. Both regressions fail before the fix.

On macOS, the full unit suite leaves an existing timer open in tail-file.test.js, reproduced on unmodified source. Node 22/26 runs used --forceExit after all assertions and coverage checks; the focused container suite exits normally.

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.

1 participant