8000 Allow empty decoder flush and end calls by Aschenbath · Pull Request #164 · kawanet/msgpack-lite · GitHub
[go: up one dir, main page]

Skip to content

Allow empty decoder flush and end calls - #164

Open
Aschenbath wants to merge 1 commit into
kawanet:mainfrom
Aschenbath:fix/oss10-20261124-9130-msgpack-empty-decoder
Open

Aschenbath wants to merge 1 commit into
kawanet:mainfrom
Aschenbath:fix/oss10-20261124-9130-msgpack-empty-decoder

Conversation

@Aschenbath
Copy link
Copy Markdown
Contributor

Calling new Decoder().end() before receiving a chunk throws a TypeError instead of emitting end. Calling decode() to flush before the first chunk fails the same way.

Treat an uninitialized decode buffer as having no values to flush. Regressions verify empty end emits no data and exactly one end event, and repeated empty flushes still allow subsequent input. Both regressions fail on main.

Validation on Node 24 / Windows: 205 Node tests and 191 Chromium tests passed; JSHint, minified bundle size/export checks and silent-import deprecation check passed.

This branch has not been deployed

No deployments
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

0