You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Despite the fix in PR #1989 that was supposed to add support for pnpm catalogs, the functionality is still not working correctly due to a logical error in the conditional check.
🔍 Problem Analysis
The current code in the merged PR has a syntax error in the condition:
❌ Issue:
The variable key represents the package name, not the version. This means the condition key.startsWith('catalog:') will never be true since package names don't start with "catalog:", and the catalog replacement code is never executed.
✅ Proposed Solution
we need to check the value (version) instead of the key (package name):
I have tested this fix locally and confirmed that:
✅ Orval now correctly processes package.json files with pnpm catalog dependencies
✅ The catalog versions are properly resolved and replaced
✅ No errors occur when using dependencies like "@tanstack/react-query": "catalog:"
Invalid argument not valid semver ('catalog:' received)
After (fixed):
Works correctly and resolves catalog references.
🚀 Next Steps
If this analysis is correct and the proposed solution looks good, I'm ready to create a pull request with the fix.
This should be a minimal one-line change that resolves the remaining pnpm catalog compatibility issue.
The text was updated successfully, but these errors were encountered:
📋 Issue Description
Despite the fix in PR #1989 that was supposed to add support for pnpm catalogs, the functionality is still not working correctly due to a logical error in the conditional check.
🔍 Problem Analysis
The current code in the merged PR has a syntax error in the condition:
❌ Issue:
The variable key represents the package name, not the version. This means the condition key.startsWith('catalog:') will never be true since package names don't start with "catalog:", and the catalog replacement code is never executed.
✅ Proposed Solution
we need to check the value (version) instead of the key (package name):
🧪 Testing & Verification
I have tested this fix locally and confirmed that:
✅ Orval now correctly processes package.json files with pnpm catalog dependencies
✅ The catalog versions are properly resolved and replaced
✅ No errors occur when using dependencies like "@tanstack/react-query": "catalog:"
📝 Example
Before (broken):
Results in: Error:
Invalid argument not valid semver ('catalog:' received)
After (fixed):
Works correctly and resolves catalog references.
🚀 Next Steps
If this analysis is correct and the proposed solution looks good, I'm ready to create a pull request with the fix.
This should be a minimal one-line change that resolves the remaining pnpm catalog compatibility issue.
The text was updated successfully, but these errors were encountered: