-
Notifications
You must be signed in to change notification settings - Fork 9.2k
fix: include oauth2-redirect.js in npm package distribution #10585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: include oauth2-redirect.js in npm package distribution #10585
Conversation
The oauth2-redirect.js file was missing from the npm package distribution because it wasn't included in the .npmignore whitelist. This file is referenced by oauth2-redirect.html and is required for OAuth2 authentication to work properly. Fixes swagger-api#10574
|
Hi @1234-ad, Thanks for the contribution! The fix looks good, but could you please remove the additional |
|
Hi @glowcloud, Thanks for the feedback! I've removed the The change is ready for review. |
glowcloud
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick update @1234-ad! LGTM now!
|
🎉 This PR is included in version 5.29.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
Fix for Issue #10574: Include oauth2-redirect.js in npm package
Problem
The
oauth2-redirect.jsfile was missing from the npm package distribution, causing OAuth2 authentication to fail when using the npm package. The file exists in the repository and is referenced byoauth2-redirect.html, but wasn't being packaged.Root Cause
The
.npmignorefile uses a whitelist approach (excluding everything with*and then including specific files with!). It included!dist/oauth2-redirect.htmlbut was missing!dist/oauth2-redirect.js.Solution
Added
!dist/oauth2-redirect.jsto the.npmignorefile whitelist.Changes Made
.npmignore: Added!dist/oauth2-redirect.jsto ensure the file is included in npm packagesVerification
After this fix,
npm pack swagger-uiwill include both:dist/oauth2-redirect.html(already included)dist/oauth2-redirect.js(now included)Impact
Testing
The fix can be verified by:
npm pack swagger-uioauth2-redirect.jsis now included in the package contentsThis is a critical fix for OAuth2 functionality that was broken due to missing file packaging.
Fixes #10574