chore: add changeset for cleanup patch (#54, #55)#57
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a changeset to fix log formatting, improve validation for negRisk redemptions, and move the shx dependency to devDependencies. Feedback identifies non-existent version numbers for Node.js types and TypeScript in package.json that require correction, and suggests adding pull request numbers to the changeset for improved traceability.
|
|
||
| - Fix stderr log lines running together due to missing trailing newlines on init/order/market-order logs (server log output is no longer corrupted into one line) | ||
| - Reject invalid `outcomeIndex` for negRisk redemption instead of silently defaulting to outcome 0 — prevents accidentally redeeming the losing side when the caller passes a bad value | ||
| - Move `shx` from `dependencies` to `devDependencies` so npm consumers don't pull it in |
There was a problem hiding this comment.
While moving shx to devDependencies is a correct improvement, I noticed that package.json contains suspicious version numbers for other dependencies. Specifically, @types/node is set to ^24.9.1 (line 45) and typescript to ^5.9.3 (line 48). As of now, these versions do not exist on npm (Node.js types are currently at v22 and TypeScript is at v5.7). This will likely cause installation failures for developers. Please verify and correct these versions in package.json.
| - Fix stderr log lines running together due to missing trailing newlines on init/order/market-order logs (server log output is no longer corrupted into one line) | ||
| - Reject invalid `outcomeIndex` for negRisk redemption instead of silently defaulting to outcome 0 — prevents accidentally redeeming the losing side when the caller passes a bad value |
There was a problem hiding this comment.
It is a best practice to include the pull request numbers (e.g., #54, #55) in the changeset description. This allows the Changesets CLI to automatically link these entries to the corresponding pull requests in the generated CHANGELOG.md file, providing better traceability for users.
| - Fix stderr log lines running together due to missing trailing newlines on init/order/market-order logs (server log output is no longer corrupted into one line) | |
| - Reject invalid `outcomeIndex` for negRisk redemption instead of silently defaulting to outcome 0 — prevents accidentally redeeming the losing side when the caller passes a bad value | |
| - Fix stderr log lines running together due to missing trailing newlines on init/order/market-order logs (#54) (server log output is no longer corrupted into one line) | |
| - Reject invalid `outcomeIndex` for negRisk redemption instead of silently defaulting to outcome 0 (#55) — prevents accidentally redeeming the losing side when the caller passes a bad value |
There was a problem hiding this comment.
Code Review
This pull request introduces a cleanup batch that fixes missing newlines in server logs, implements validation for outcomeIndex in negRisk redemptions to prevent accidental errors, and moves shx to development dependencies. A review comment suggests that the changeset description should be updated to accurately reflect that the logging fix applies globally to the server output rather than just specific log types.
|
|
||
| Cleanup batch: | ||
|
|
||
| - Fix stderr log lines running together due to missing trailing newlines on init/order/market-order logs (server log output is no longer corrupted into one line) |
There was a problem hiding this comment.
The changeset description mentions that the fix for log lines running together applies specifically to init/order/market-order logs. However, the implementation in src/util/log.ts (line 2) adds a newline to the global log utility, which affects all logs in the application. It might be more accurate to describe this as a general fix for server logging to ensure all stderr output is properly delimited.
Summary
Adds a
patchchangeset so the next merge tomainopens a Version Packages PR and publishes the user-visible fixes from #54 and #55 to npm.User-facing notes in the changeset:
outcomeIndexfor negRisk redemption instead of silently defaulting to outcome 0 (prevented accidentally redeeming the losing side)shxfromdependenciestodevDependenciesTest plan
Version PackagesPR bumping@iqai/mcp-polymarketto0.0.180.0.18to npm