chore: adding in build validation#1651
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Code Review
This pull request introduces a build validation harness script (scripts/test-build.mjs) along with a new test:build script in package.json to verify exports-path existence, runtime load and export parity, and packaging/types compatibility using publint and @arethetypeswrong/cli. Feedback on the validation script identifies a potential runtime crash (TypeError) if a CommonJS module resolves to null, undefined, or a primitive, as well as a false positive error when a CommonJS module directly exports a function. A code suggestion is provided to safely handle these edge cases.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1651 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 26 26
Lines 2688 2688
Branches 593 595 +2
=========================================
Hits 2688 2688 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Guard the CJS runtime check against modules that resolve to null, undefined, or a primitive (avoiding a TypeError on `Object.keys`/`in`), and correctly treat a bare function export (`module.exports = fn`) as a valid export rather than flagging "exposes no exports". Addresses review feedback on PR #1651. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 013c670ba8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
chore: adding in build validation