test: add package export smoke checks#1406
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new test script, test-package-exports.mjs, and adds a corresponding test:package-exports entry to package.json. The script automates the validation of package exports by packing local workspaces, installing them into a temporary fixture project, and verifying that both ESM and CommonJS outputs compile and execute correctly. I have no feedback to provide as there were no review comments.
44d9480 to
ae506cf
Compare
|
Thanks @Herrtian . I will take a look. |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
Signed-off-by: Herrtian <70463940+Herrtian@users.noreply.github.com>
ae506cf to
a68edf1
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughA new Node.js ESM script ( ChangesPackage exports ESM/CJS integration test
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/test-package-exports.mjs`:
- Around line 14-15: The sdkPackages array is missing the `@openfeature/core`
package, which causes the smoke check test to skip generating and executing
ESM/CJS fixture imports for the core package. Add '`@openfeature/core`' to the
sdkPackages array definition so that the subsequent test logic (which iterates
over this array) will properly generate and execute fixture imports for all
three packages (core, server, and web), ensuring complete coverage of the PR
objective.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: e22b902d-61a3-4b16-9f36-d125f642ad50
📒 Files selected for processing (3)
.github/workflows/pr-checks.yamlpackage.jsonscripts/test-package-exports.mjs
Signed-off-by: Herrtian <70463940+Herrtian@users.noreply.github.com>
26c7e13 to
86e6c1d
Compare
Closes #62
Adds a package export smoke check that packs the core, server, and web packages, installs the tarballs into a temporary fixture, compiles ESM and CJS consumers, and runs both outputs.
Checks: